Camera facing foliage for trees via material

@brisck1 @Quittzer Hmm… the thing that makes this so tough is the tex coord to world position translation, since each billboard location needs to be evaluated individually. While I’m not sure of the method for that, I might have an idea for a workaround.

Most billboard shaders do a comparison between the object position and the world position, and this is where something like leaves on a tree will fail, since the object position will be the tree base. Using instances for the leaves could solve this issue, since then you can use instance position instead.

OR… what if you store the leaf offset from object position in the vertex color of the 4 vertices of the leaf billboard? This will localize the rotation values and should give you the desired result- admittedly with a lot of setup. I believe vertex colors clamp the floats though, so you’d have to set the location/1000 or some similar number.

What that logic might look like:

Replacing the object position in a shader such as this:

And in your DCC, a leaf billboard with a pivot location of -300,500,150 would have its vertices saved as vertex color -.3,.5,.15. If you have the coding skills, a process like this should be very easy to automate through Python or Houdini.