Foliage instance position in Material editor
Hi there :)
I want to obtain the global position of an instanced mesh from a Procedural Foliage Volume in the material editor. This is already possible with a hand dropped mesh using the "ObjectPosition" node, but not with a PFV as it returns the PFV's position instead of the mesh's.
Question is: How can I achieve this, or perhaps cheat it around, or even just know if it'll be implemented some day.
There already are many similar threads about this since UE4.9 in 2015 but none seem to get any love or attention :'( If you're interested in this, you may follow these other threads as well as upvote (the UP arrow to the left of the question).
https://answers.unrealengine.com/questions/384539/get-foliage-instance-mesh-position.html https://answers.unrealengine.com/questions/192240/instance-foliage-mesh-position.html https://answers.unrealengine.com/questions/449701/foliage-instance-position.html https://answers.unrealengine.com/questions/321400/how-can-i-get-the-properties-of-instance-in-foliag.html
To give an idea, I'm trying to achieve this effect on all instances of a PFV. Basically im trying to cheat lighting depth on tree leaves using the distance of the texel from the mesh's origin.You can notice it works well on hand placed meshes but not on the PFVs placed behind.
If I scale up the values in my SphereMask node it gives this: (the trees way behind are lods with a different material)
And this the basic node operations to get the distance
asked Sep 08 '16 at 10:42 AM in Rendering
Try passing object position through custom UVs. It should return per-instance position that way If i'm not mistaken.
answered Sep 08 '16 at 03:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here