# Set Point Orientation for copy node

## Recommended Posts

I really tried hard befor writing this.

I do the Rohan Dalvi Rocket Tutorial at the moment wich is nice but it gives me a really hard time cause I have to translate every Variable to the new Vex Standard. Normaly I can do this but not this time cause the whole node is different

The Problem

I have a line with 10 Points.

On each Point i Copy a Grid

every grid should be angled between -14 to ten

Rohan uses the copy node and writes on Rotate Z fit01(\$PT/\$NPT,-14,10)

in VEX I would have to write fit01(@ptnum/@numpt,-14,10); but the copy node doesn´t exist anymore and the copy to points node doesn´t have rotate Fields any more.

1. Question

How do I angle the copy to point Instances indivudally

2. Question

Are there special tutorials on translating old Houdini with variables and nodes to new Houdini with Vex?

this one is good but not enough:

##### Share on other sites

Check out this tutorial, it goes over the new way of doing things with copy to points, attributes, etc.

##### Share on other sites

I did a little writeup about the copy sop and template point attributes here: http://www.toadstorm.com/blog/?p=493

That video by Jeff above is great for a very in-depth rundown, especially with spare parameters and compile blocks.

• 2

##### Share on other sites

Cool!

You gave me the answer to question Number 1 (I have to use the copy stamp node) by answering question Nr 2.

I will really enjoy watching the video and read toadstorms article wich seams to be very promising (hope I can get some more Infos what exactly Matrixis and these mysterious u and vtangents do)

##### Share on other sites

OK now its really solved:

I used this script based on toadstorms one:

```//Initialize Up and N
v@up = set(0,1,0); // Set up Vector
v@N = chv("N_vector"); // select the Axis

//Set the Min and Max Value for the Rotation Range
float MinAngle = ch("MinAngle");
float MaxAngle = ch("MaxAngle");
float rotateGrid = fit01(@ptnum/(@numpt*1.0),MinAngle,MaxAngle);

// create a 3x3 orientation matrix using N and up as
// the principal axes.
matrix3 m = maketransform(@N, v@up);

// now rotate this matrix around the N axis over time.
vector axis = @N;
rotate(m, angle, axis);

// make the orient quaternion from this matrix.
// the copy SOP reads this automatically.
p@orient = quaternion(m);```

It works just fine and i´m quite proud cause this is also compile friendly (just learned in this Thread compiling exists)

THX a looooot - learned so much in this Thread!!!

• 1

## Create an account

Register a new account