Jump to content

particle attribute to sops problem


masstapro

Recommended Posts

Have an attribute created in POPs called highPos(3)

I can see it in the Point Sop and want to multiply it to my scale under the particle tab of the Point Sop.

It's not working.

I know the attribute is there and works because I can use it in the translation values of the Point Sop like when I replace $TX with $HIGHPOS.

Want $PSCALE * $HIGHPOS.

I've tried using $HIGHPOSX and $HIGHPOS[0].

Can't figure it out. Attached file:

You notice the yellow box is working when displayed, the red box is not because of the pointSop/addScale parameter.

Also, you'll notice the boxes rise, fall and rotate on the way down.

Another question: Why are they rising so much at the beginning and end of the grid?

Exercise is from Peter Class's 3D Buzz dvd.

Thanks

~Shawn

particle_boxflip_test_943.hipnc

Link to comment
Share on other sites

Have an attribute created in POPs called highPos(3)

I can see it in the Point Sop and want to multiply it to my scale under the particle tab of the Point Sop.

It's not working.

I know the attribute is there and works because I can use it in the translation values of the Point Sop like when I replace $TX with $HIGHPOS.

Want $PSCALE * $HIGHPOS.

I've tried using $HIGHPOSX and $HIGHPOS[0].

Can't figure it out. Attached file:

You notice the yellow box is working when displayed, the red box is not because of the pointSop/addScale parameter.

Also, you'll notice the boxes rise, fall and rotate on the way down.

Another question: Why are they rising so much at the beginning and end of the grid?

Exercise is from Peter Class's 3D Buzz dvd.

Thanks

~Shawn

Since the variable is created in POPs, you cannot use the local variable ($HIGHPOSX) in SOPs since its only local to POPs...one way to access the attribute is to use the point() expression.

point("../myPopnet", $ID, "highpos", 0)

"0" access the X value, "1" would access the Y value, etc...

Link to comment
Share on other sites

Since the variable is created in POPs, you cannot use the local variable ($HIGHPOSX) in SOPs since its only local to POPs...one way to access the attribute is to use the point() expression.

point("../myPopnet", $ID, "highpos", 0)

"0" access the X value, "1" would access the Y value, etc...

Yes, thank you.

I just had to be sure it attribute was the right context: highPos

I'm sure there is another way to do this? Can't I bring a POP attribute into SOPs with an Attribute Transfer?

Thanks again.

Link to comment
Share on other sites

Yes, thank you.

I just had to be sure it attribute was the right context: highPos

I'm sure there is another way to do this? Can't I bring a POP attribute into SOPs with an Attribute Transfer?

Thanks again.

Well, you already have the attribute on your points in SOPs so you wouldnt need to transfer the attribute. Im assuming you want the variable, $HIGHPOS. You could create an attrbcreate SOP after your popnet, and name the attribute "highpos" then use the point() expression to access the highpos attribute. This will give you a "detail" attribute which creates the local variable $HIGHPOS which you can use in SOPs.

P.S. I actully just found out an easier way to do this in H9.5. Create an attribCreateSOP and name the attribute "highpos". Uncheck "Write Values". That will assign the existing values of that attribute and you will now have a local variable $HIGHPOS

Edited by SpencerL
Link to comment
Share on other sites

Have an attribute created in POPs called highPos(3)

I can see it in the Point Sop and want to multiply it to my scale under the particle tab of the Point Sop.

It's not working.

I know the attribute is there and works because I can use it in the translation values of the Point Sop like when I replace $TX with $HIGHPOS.

Want $PSCALE * $HIGHPOS.

I've tried using $HIGHPOSX and $HIGHPOS[0].

Thanks

~Shawn

Hi Shawn,

the expressions are correct, but as mentioned above you can't use the attribute directly from pops in sops. You need to "declare" it first.

There is a thread I started a while back that talks about this in specific:

http://forums.odforce.net/index.php?showtopic=6644&hl=

Basically you will need to put an attribCreate sop down first, typing in highypos (and making sure the type corresponds to the pops attribute -> vector)

Also, you'll notice the boxes rise, fall and rotate on the way down.

Another question: Why are they rising so much at the beginning and end of the grid?

Exercise is from Peter Claes' 3D Buzz dvd.

Thanks

~Shawn

That's easy, because your selection bounding box starts at frame 0 over the particles already. If you scope the channel of the transform on the box you will see your animation curve eases in and eases out, which means that on a subframe level your points in the beginning and in the end will be inside of the selection bounding object for a longer period of time. This then results in those particles being affected by the upwards force longer -> the points are pushed higher. If you don't want this, just adjust your animation curve to linear, or move your box a bit further outside of the grid at the start and end.

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