Imposters not working with foliage (no rotation)

Engine version: 4.22.3

I have a imposter material that works fine with static meshes actors, but not with foliage: it does not rotate based on camera location.

I’m assuming the issue is in the Position input pin of the ImposterUVs node. I tried to use the “TransformPosition - Local Space to Absolute World Space” node and connect it’s output to the input pin, but it doesn’t seem to work. I found many people saying to do that, but only in posts or threads that are a few years old, so maybe it worked in older engine versions.

Fun fact: it works only if the foliage instance is located at 0,0,0 (world location).

If this is the case, how do I get the foliage instance location in a material?

This is the full graph:

And these are two gifs demonstrating the problem:

The first one looks ok, it’s working as intended. But only because the foliage is at 0,0,0 (world location of the foliage instance).…ew?usp=sharing

The second one doesn’t work because the foliage instance is not at 0,0,0:…ew?usp=sharing

One thing that is weird: if I plug the TransformPosition node into the base color pin, it works as expected:

Why did “TransformPosition” returns the position of the foliage instance when plugged in the base color, but appears to be returning the location of the entire foliage actor when plugged in the ImposterUVs?

I would like to know how to actually use these, would be really helpful for fast but good looking graphics at the cost of vram

Edit: Also, does the old octahedral impostors plugin from ryan brucks still work, if anyone is using it by chance?
(Found here Post Page )

Another edit: Im on engine version 4.24.3, fortnite is on latest and can use impostors, it should be able to work on other 4.24 users’s computers too.

It doesnt work, as you load the map, you only get an small plane and it seems like it has material issues,

I have the same problems as the original post described, no idea how to keep the Impostor in-place, I followed the documentation but it doesn’t work.

It requires some minor fixes but I got it to work in 4.25.

I believe it required the fixes in these two threads (as I recall):

There’s also a few people who have forked the project on github with fixes, though I didn’t try them.

I was really hoping Epic would integrate this into the engine at some point because it’s a beautiful solution.

In case someone is still wondering:

The issue is caused by the “Transform Position” node. It works fine in vertex shader (uses the transform of the foliage instance), but not in the pixel shader (in which it is using the transform of the whole actor, not the foliage instance). A simple solution for this would be using a “Vertex Interpolator” node between the “Transform Position” and the “Position” input pin of the ImposterUVs function. However, it will lead to a compiler error because the “Position” input is being used by both vertex AND pixel shader, and the “Vertex Interpolator” can only be used in pixel shaders.

So, there are two possible solutions to this issue:

  1. Do not use the ImposterUVs function; instead, create your own custom solution (that’s what I made)

  2. Modify the ImposterUVs function and include the “Vertex Interpolator” inside the function, where the Position input is being used

@Marcio Rosa

Would you be able to share your fix/solution to this problem? I haven’t had much luck in fixing this issue.

Here it is. But my implementation is simplier - it only rotates around Z, and don’t allow custom rotation (all billboards will have the same orientation). It uses the SubUV function to get the cell from the textures. Since my shader have some other stuff, I took a printscreen containing only the imposters the part:



The setup of the normals should be the same specified in the official documentation, so the Tangent Space Normals should be disabled.