Jump to content

get into point channels


Recommended Posts

Hi, 

I want to have more control in my setup and I've been trying many things. But the further I go I can see that the best thing would be just to be able to get some control from the actual points.

So for example I have 2 points. They have some positions, velocities and additional channels.

Then I want to reuse some o those channels to steer my sim in DOPs, eg. use vel to control velocity.

So the esies way I see it is just to get their channels with expression, no SOPs. but how can I get into the specific point channels? This is what I mean:

point[0].pos.y

len.point[0].vel

ofcourse this is a made up code, im not very familiar in vex. but you get the idea

P.S. And when I finally get each points channels, can I use them in DOPs? For example:

Each point have different velocity. So inherit diferent velocity for each point emitter

Edited by Juzwa
Link to comment
Share on other sites

Ok sorry I'm not expressing my issue the right way. So this is what I got:

Two points, point A [0,0,0] and point B[0, animated y, 0]. Thanks to animated P.y of point B I can calculate the velocity vector, which is just P.y. And now I want in DOPs to make emission but only from point A using the vel on B.

So the only thing I need is just to transfer vel atrib from point B to point A, and delete B. Easy.

And I'm guessing this is just oneline of code in vex. I'm trying to figure it out in Attribute Wrangle with this: int test = pointattrib(0, "P.y", 1, 0);   but it errors out

In help it says: type pointattrib(int opinput, string attribute_name, int pointnumber, int &success)

success: Set to 1 if the import was successful, 0 if it failed due to no matching attribute or invalid number.

So I dont get this success at all. I mean how do I set it to success or fail on import? Its like asking wheather you want the expression to evaluate or not

I have also tried point(0, "P.y", 0); and it works, but does not return anything else than 0. Which means it fails on import. And it does not make sense why

Edited by Juzwa
Link to comment
Share on other sites

Hi Juzwa.

 

I'm not sure if i understood your doubt. I attach a hip file that does the following:

- Two points, one of them is moving, the other is still.

- I transfer speed from the moving pt to the still one using point expression in point wrangle.

- Then, in a popnet, still point emits particles based on moving point's speed.

I hope that's useful. Sorry if it's not what you needed! =D

emitPtBspeed.hiplc

Link to comment
Share on other sites

Thx for the file :) This is kind of close to what I was looking for. 

Actually it's my fault, I cannot express my issues sometimes. Especially since you can do the same thing in Houdini in many different ways. Sometimes I tend to loop myself over one singe way :) 

I fixed the issue with this expression:

vector test = point(0,"P",1);
@v.y = test.y;

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...