Sebasvideo

03-03-2014, 12:51 PM

I'm having a problem trying to randomize instances of squares (city blocks) in 90° increments but at the same time keeping them in place. Searching for this I found this old thread: http://forums.newtek.com/showthread.php?127274-how-do-i-step-rotations-in-instances in which Dpont suggests this solution:

Connect the Instance ID (Instance Info node)

in the A input of a Math Scalar node, set B to 4,

so for your Instance sequence you will get 0, 1, 2 or 3,

multiply by a Constant Angle node set to 90°,

it converts this angle to radian which is the correct

unit for the node editor, you get 0°, 90°, 180° or 270° angles

for your sequence, connect this result in the X Input

of a Make Vector node (Heading), plug it in Rotation.

You could skip the Math Mod node, just multiplying

the Angle by the Instance ID but not sure with

a huge number of instances, when you reach great

angle values.

So I did that, except that I can't use the Instance Info Node, when I double click on it it gives me an error that it can only be used outside the instance node editor, and to use the input node instead. So I used the Input ID Index instead and connected the rest:

120562

The problem is that it doesn't just rotate heading for each block randomly by 90°, it also distributes the instances at random places, some of which are even occupying the same space:

120564

What I need is something that will look like this, but with the instances rotated randomly by 90°:

120563

Is that possible, and if so, how?

Thanks

Connect the Instance ID (Instance Info node)

in the A input of a Math Scalar node, set B to 4,

so for your Instance sequence you will get 0, 1, 2 or 3,

multiply by a Constant Angle node set to 90°,

it converts this angle to radian which is the correct

unit for the node editor, you get 0°, 90°, 180° or 270° angles

for your sequence, connect this result in the X Input

of a Make Vector node (Heading), plug it in Rotation.

You could skip the Math Mod node, just multiplying

the Angle by the Instance ID but not sure with

a huge number of instances, when you reach great

angle values.

So I did that, except that I can't use the Instance Info Node, when I double click on it it gives me an error that it can only be used outside the instance node editor, and to use the input node instead. So I used the Input ID Index instead and connected the rest:

120562

The problem is that it doesn't just rotate heading for each block randomly by 90°, it also distributes the instances at random places, some of which are even occupying the same space:

120564

What I need is something that will look like this, but with the instances rotated randomly by 90°:

120563

Is that possible, and if so, how?

Thanks