PDA

View Full Version : Head rotation control of Dp instance HELLLP!



moussepipi2000
09-05-2011, 07:16 AM
HI Lightwavers!

Big problem here!

I need to rotate many instance ,not randomly, but with a given Degree, So i tried with a texture mapping with Gray scale. My instance Rotate well when the color change But it doesnt behave as i wanted.

If i put pur WHITE 255.255.255 My instance only rotate of 57 Degree.
and If i put middle Gray 128.128.128 My instance Rotate of 12 degree. It seem to be exponential. I dont know why. If possible i want to If i put a PUR white, i will rotate of 360 degree, Gray 128.128.128 will rotate 180 Degree and pur black doesnt rotate at all.

Someone know the solution maybe?

Here my node setup

Thanks in advance!

Mousse

XswampyX
09-05-2011, 07:49 AM
Use a multiply node.

360/57=6.3157894736842105263157894736842

So multiply your scalar by 6.3157894736842105263157894736842

moussepipi2000
09-05-2011, 08:05 AM
i Tried it but the problem is the fact that 50 percent Gray is not 50 percent Rotation of the Pur white. So i thought it was an exponential Curve. But i dont see the reason WHY???!

Here the scene. All settings are in the node editor of the DP instance.

dpont
09-05-2011, 08:16 AM
In a node editor,
except in interface for settings,
rotation angle unit is commonly in radians,
180 = PI = 3.1415
360 = 2xPI = 6.283

Denis.

moussepipi2000
09-05-2011, 08:59 AM
Thanks for the hint Denis, i didnt know that.

I will give another try tomorrow!

erikals
09-05-2011, 02:08 PM
In a node editor,
except in interface for settings,
rotation angle unit is commonly in radians,
180 = PI = 3.1415
360 = 2xPI = 6.283

Denis.

cool, so PIx4 will make it rotate 720 ?

dpont
09-05-2011, 02:41 PM
cool, so PIx4 will make it rotate 720 ?

Yes, unit conversion is always linear,
type 720 in a Constant Angle node,
you will get 4xPI as output.

Denis

erikals
09-05-2011, 02:54 PM
Naaice :]

XswampyX
09-05-2011, 05:43 PM
So we should be looking at a node like this?

http://i465.photobucket.com/albums/rr16/xXswampyXx/DPInstanceRotate.jpg

To give this....

http://www.youtube.com/watch?v=n7-I_1PvKIc

moussepipi2000
09-05-2011, 06:17 PM
Im at office now. I tried your node Swampy, but the problem persist.(same than my node setup)

I tried new approach for the Radian Tips of denis but still doesnt work

I made a new simple scene to be sure no problem was in my scene..

Black and White are correct. it rotate Correctly.

But my Half Gray (128/128/128) doesnt rotate of 180 Degres (see the screen)

I attached new scene. I continue to search for the solution. HOPE i will find it!

moussepipi2000
09-05-2011, 06:19 PM
FUUU/*****K . IT was the COLOR SPACE OF THE IMAGE!!!!!!!!! GO back to Linear And no problem!

THANKS TO ALL!

monovich
09-06-2011, 04:04 PM
boom. color space was my first thought, but it looks like I'm too late. color space has nabbed me more than once as well!

moussepipi2000
09-06-2011, 07:01 PM
Yeap! Also got the problem when using Normal map Image, We need to make the normal map linear before render it, If not, Strange artifact show up.

But with Rotation, Because im really not good im math, i thought it was me...

dwburman
09-06-2011, 08:58 PM
Should there be a ColorSpace conversion node?

moussepipi2000
09-06-2011, 09:13 PM
it would be good to have this kind of nodes.

and If the normal map node can convert automaticly in linear mode would be better.

ivanze
09-14-2011, 02:18 PM
In a node editor,
except in interface for settings,
rotation angle unit is commonly in radians,
180 = PI = 3.1415
360 = 2xPI = 6.283

Denis.

This is one of the best info I have got to understand a lot of things with nodes. It is nice to remember some math stuff long forgotten and funny to test things with DPKit.
I was testing using a gradient to rotate some boxes using the alpha value, so when I use 314.15% for the alpha value now I get 180 degrees rotation. Now it makes sense for me. :)
And again, that free plugin Input spy is a great way to know the values of the outputs.

Thanks Denis.