I turn to you again. Still working on my old water project, and this time I'm having trouble with the following:

I assume that the normal vector emitted by a "spot info" node always has length = 1. So, if I extract the Y component (with a vector -> scalar node) I will get 1 only where the normal points directly upwards.

But that doesn't happen! Has anyone else tried this? I could make a screenshot if you need me to make it more clear.

-Truls

serge

11-24-2009, 07:00 AM

I assume that a normal has rotation values. So, extracting X/Y/Z is extracting heading/pitch/bank values.

I got an unexpected result though. I created a cube, and connected the pitch of the normal to a color gradient input (Spot info Normal > Vector Scalar (Y channel) > Gradient input).

Result: when the normal points upwards it equals 1 on the gradient, which seems correct. When the normal is perpendicular it equals 0, which also seems correct. However, I would have expected a rotation of 45 degrees to equal 0.5 on the gradient, but it doesn't: 0.5 on the gradient equals 30 degrees rotation of the normal.

@Trulsi:
As you could read in my post above, I do get a result of 1 when I extract the Y component of a normal pointing directly upwards. Not sure why that doesn't happen with you. (I used "Tools > Vector Scalar, Y channel mode")

Trulsi

11-25-2009, 12:07 AM

Hi guys!

Thanks for checking it out! :) The normal must have XYZ values, as sensei said... And somehow I arrived at a more correct result when I made my displacement taller. Now it seems like it does indeed give 1 when it points exactly upwards. But I want my displacements to be a bit smaller than this, I'm looking to make medium sized waves...