Jump to content

Set Point Orientation for copy node


Ultron

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:

Thanks for your help :)

Link to comment
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) :)

 

 

Link to comment
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;
float angle = radians(rotateGrid);
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!!!

RotateByVex.jpg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...