Reputation: 8661
This is a sphere, with the normals hooked up directly to the output color. I'm using the normals for now, because it's an easy way to test the ouput - this is what I expect to see:
Now, I'm trying to rotate all these normals around some axis. I thought the 'RotateAboutAxis' function would be perfect for this:
But apparently it's not. It seems to have killed the X component - you can see the dark spot, as expected, where all the components are negative, but you can't see a white spot directly opposite. The animation is weird too - it jumps back to the start after only 180 degrees, and the colors fade in and out in the first and last few degrees of rotation. Changing the axis doesn't help, it seems to kill the components of the position that are aligned with the axis. What am I missing?
I'm posting here as well as the Unreal forums, because the forums are horrible to use. My question won't even show up until it has been approved by moderators.
Upvotes: 1
Views: 4980
Reputation: 348
RotateAboutAxis
documentation doesn't states that clearly, but this node is designed to work with World Position Offset
material output. It means that output of this node is rotation 'offset' (vector you need to addd to the current vector in order to get desired rotated vector)
Try to add VertexNormalWS
to the result of RotateAboutAxis
:
Upvotes: 3