- Unreal Engine
TripleOneGames wrote:Okay, so this question is probably a bit advanced. I'm looking for a way to rotate a mesh around the object origin's Y axis using vertex offset while preserving normals. I need to preserve normals so that the metallic object reflects the environment accurately.
The reason is for optimized performance. I have quite a few coins in my scene in Unity that are always rotating. I'm not sure if I would get a performance boost by using the shader instead of just rotating the objects transforms. Is there a node for this, or am I going to have to do some trigonometry (I'm only "pretty good" at math at math)? I've searched the internet and found nothing really useful. Any help or tips are appreciated.
TripleOneGames wrote:This does what I need, thanks! I did manage to get the normals working. Or at least I was able to achieve the desired effect. I did a similar thing to what was done in an Unreal forum:
https://answers.unrealengine.com/questi ... norma.html
I just plugged the vertex normal into the same node structure instead of the vertex position and didn't subtract it from the final product. Which inverts it I guess. Anyway, here is the shader in case anyone is interested:
Thanks again for the help and great customer service! Cheers!
Users browsing this forum: Google [Bot] and 1 guest