PDA

View Full Version : Node help. Instance rotation



monovich
01-22-2013, 04:33 PM
Hi Guys,

I wonder if I might solicit some help.

I have a grid of instances who's rotation is driven by a texture map. White makes the instance rotate 180 degrees, black rotates 0 degrees.

What I'd like to do is randomize the grid of instances more so that some of them rotate 180 degrees and some rotate -180 degrees. I don't care to control which rotate which way, I just want to randomize it.

Can someone help me with this node flow? How would I assign the negative value to random instances?

Make sense? Thanks for reading.

SF

Sensei
01-22-2013, 05:01 PM
TrueArt's Node Library has couple Random nodes.
Also LW has some and other 3rd party also.

monovich
01-22-2013, 05:10 PM
Thanks. I tried to figure it out for myself and I ended up plugging the ID index into a logic node. "If A greater than B". B was exactly half of the number of instances so I figured half would be greater than and half would be less then.

If true = 1
If false = -1

I plugged that into a multiply node that either multiplied the existing rotation by 1 or -1.

I'm not even sure of this is doing exactly the effect I want, but the results look cool and random so I'm going to roll /w it.

110548

ncr100
01-23-2013, 12:22 AM
Cool!