Jump to content
Ultron

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:

Thanks for your help :)

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×