Imposter Baker 1.0 imposters invisible when camera aligns to -Z axis

Hey there.

I have been using Unreal Engines imposter baker plugin for some time now. I decided to uninstall the version I was using as it was quite old and I had seen that the newest version available created much more accurate imposters.

I deleted all my imposters and uninstalled the version I had been using before doing a clean install in 5.3 of the current 1.0 version. It works great but I had to modify quite a few things in the imposter material function to work as there were quite a lot of things that weren’t working correctly. This wasn’t a big deal because I had to make the same fixes in the previous version I was working with so it wasn’t hard to get it working the way it should.

I am however stuck with one final problem that I can’t seem to figure out if its another problem with the material and its functions or if its an actual problem with the imposter baker blueprint and how the thing actually works.

The problem is that when the cameras position starts to align with the -Z axis of the imposter, the texture projected on the imposter begins to shrink rapidly until it is completely invisible when the camera is perfectly aligned. This problem is not tied to the worlds Z axis but the mesh’s local Z axis so most people will never discover this issue until they start rotating their meshes like I have while building cliffs out of one of my boulder meshes.

I believe it is a problem with the capture of the frames as I have noticed the layout of the capture positions for the imposter baker BP are quite different on the top and on the bottom.

Note the 4 cameras very closely grouped at the center of the top side.

and the bottom side that appears to be missing at least 3 capture positions

I think there is a blindspot created in the capture because of these missing capture locations.

Any ideas would be appreciated.

Cheers

Hi, are you creating it as a full sphere or a hemisphere? That problem happens when looking up from close range on hemispheres - full spheres are better (just use a lot more frames).

Generating with full sphere’s. Distance, whether close or far doesn’t change anything. Its always just invisible when looking directly at mesh’s -Z axis.

Also, just installed 4.27 and tested there as well. Same problem.

Do the textures themselves look ok?

Yes the textures are fine and complete and the imposter mesh is also performing correctly.

One thing that is broken in the imposter material function is this

The default setting it comes in when the plugin is installed has the imposter hard coded to always be upper hemisphere only, as seen by the red comment box, where there is a “max” set for the Z axis.

The fix for this is to just remove the Max node and plug the B output straight into the Z input.

I don’t understand why this was done this way but bypassing the max node gives full sphere imposters perfectly with the exception of when looking straight down the center of the Z axis.

This is an example of what it looks like to be underneath an imposter of a boulder. The first photo on the left shows how it looks when slightly to the left of center and the last photo on the right shows how it looks when slightly to the right of center. The photos in between show the transition from left to right, where the imposter starts to shrink and become white, before disappearing when the camera is centered to the -Z axis before it starts to come back again to the full imposter when no longer aligned.

Try putting the Max back in - It does work with it in, but causes problems when taken out - it may be removing a gimbol lock situation.

I’ve tried that. When the max is in all imposters are forced to be upper hemisphere only. Even when full sphere is selected when baking the imposter and MI’s are set to be full sphere. Is there something im missing in regards to getting full sphere imposters other than that?

Cheers

You’re right, my results were the wrong way around.

I think then it must be the shape - I tested first with a tree which works well, but I just tested with a rock and had the same issue. I think impostors (and all billboard type LODs) prefer longer, narrower shapes.

I can’t replicate that. My trees are very tall and narrow and their imposters behave the same.

I’m thinking it must be something in the materials math when blending frames together. It for some reason doesn’t like the camera to be aligned with the -Z vector.

I removed an “abs” node in the “triangleInterpolator” function and managed to replicate the same issue between the frames when rotating around the imposter along the xy axis.

It’s something to do with the Opacity Mask output. When I disconnect the opacity mask output and replace it with just the colour white, the problem goes away, obviously though there is no opacity mask on the textures so it looks garbage. But this confirms that the textures and mesh and everything are displaying correctly, its just the opacity mask that has some issues with the math or something

I was testing in 5.4 so thought I’d try in 5.3. I’m not experiencing any of those issues with the default plugin shaders, even with the Max in there.

image

I get a slight rotation of the texture as it approaches zero - but it’s not affecting the shape or dissapearing.

Hey there. I just tried in 5.4 and it’s doing the exact same thing as 5.3 and 4.27 for me.

I am however closing in on the problem. It’s to do with the opacity mask which is derived from the baseColor input. When disabling the default opacity mask output of the “imposter” material function and replacing it with just the colour white(full opacity) it reveals that the albedo texture and the mesh are behaving as they should. So there’s a problem with the opacity mask math.

The other thing that is strange is that the baseColor texture gets coloured white when it is in position right below the -Z axis, so something is changing a value when in that location that is probably multiplying or saturating the basecolor or something, forcing the incorrect values in the mask.

I haven’t been able to reproduce, it’s not fading to white at -z for me. If you find the problem please let me know in case I ever run into it :smiley:

Just FYI for anyone else lurking this thread experiencing the same problem, the the two photos provided here from top and bottom of the tree imposters aren’t in the position to create the bug. Viewing from the top there is no bug, and to get the bug by viewing from the bottom you have to be pretty much entirely underneath in the dead center of the mesh.

Still working on it but the problem seems to be to do with the scaling of the opacity mask when viewed straight up from the center on the bottom side of the mesh.

If someone knows how to get in contact with the guy that made imposter baker that’d be great because I’ve nearly lost 48 hours on this so far haha.

Wouldn’t that be +Z? :slight_smile:

The authors name is Ryan Brucks, I’m not sure how to get in contact with him though.

Yeah, Its hard to describe haha. The direction the camera is facing would be positive Z in relation to the imposter mesh but the way I think of it is the meshes negative Z is pointing to the cameras position. It’s when the camera is directly in line with the mesh’s negative Local -Z axis.

1 Like

I can reproduce that - same thing with the brightness. I’m not sure I’ve ever seen it not do that.

For something like a rock - perhaps it would be more efficient just to LOD it down to a box or just slightly more polys than a box - I can’t imagine that the extra polys would take more time to render than the calculations going on in the Impostor shader, and it saves a lot on VRAM.

That’s true.

I’ll probably have to look at that as an option. Have been wasting too much time trying to dissect this thing haha.

Cheers

1 Like