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.
Thanks!
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).
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.
For Object Orientation is just a vector, that is constant through the whole instance. You can just transform (1,0,0) from local to world to get Instance X axis in world space. In case of object bound, it is not really applicable to individual instances.
I came across this problem recently and didn’t quite get what you meant because UVs are only 2-dimensinal, so I only had the X and Y position. But after I set the “Num custom UVs” to 2 (in the Material settings) I was able to get the Z axis as well.