PDA

View Full Version : Instance rotation



Andy Webb
06-19-2014, 06:09 AM
Does anyone know if it's possible to randomly rotate instances but by a fixed amount?

So if you want a set of instances to be randomly rotated by increments of say 90 deg. or 45 deg.

Some instances would not be rotated, some would be rotated 90 deg. some 180 etc. etc.

I'm guessing this will involve using nodes but have no idea where to start. :)

Thomas Leitner
06-19-2014, 07:31 AM
....I'm guessing this will involve using nodes but have no idea where to start. :)

Hi Andy,
try this setup:

122460

Use the ID Index from the "Instance Info" node as input for a gradient. All Keys of the gradient are set to step!

Note: you have to set the Mode for Rotation of your instances to "Uniform" (Instance Generator > Rotation tab) to control the rotation with nodes.

ciao
Thomas

Andy Webb
06-19-2014, 07:43 AM
Thanks Thomas, I'll give that a go. :thumbsup:

Andy Webb
06-19-2014, 08:48 AM
I'm a bit confused, where do I set this up from?

I assumed it was the Use Nodes in the instance generator but it seems not.

Andy Webb
06-19-2014, 09:13 AM
It's ok user error.

The question now is how do I randomise this, the first instance is 0 deg, second 45 deg all the rest 90 deg.
So it's working but not randomly across all the instances.

jeric_synergy
06-19-2014, 09:16 AM
Turn on REPEAT in the Gradient Post behaviour?

(This is the problem with screenies that include Gradients: there's a million settings in there. A MILLION!!!!11!1)

Andy Webb
06-19-2014, 09:26 AM
Turn on REPEAT in the Gradient Post behaviour?

That worked, many thanks :-)

Waves of light
01-29-2016, 06:40 AM
Just wanted to add to this thread and post my nodel setup. I wanted to randomly rotate flooring plank instances (Laminate Flooring) so that they clamped to 0 or 180 degrees and thanks to IRML on the forum, I achieve it.

Angle 1 = 0, Angle = 180
Key one is set to 0 and Key 2 at 0.5
Rotation is set to Uniform in the Instance Generator tab

http://forums.newtek.com/attachment.php?attachmentid=132104&d=1454074761