A point weight node

   5392   8   0
User Avatar
Member
114 posts
Joined: Oct. 2009
Offline
I have an animated chain (falling getting caught and falling again) but wondering how to effect the weight of the points on the chain ?

Im wanting one end to be heavier so that it falls faster.

Lyonz
User Avatar
Member
8595 posts
Joined: July 2007
Offline
i suppose you are talking about wire DOPs
then you can look in help for supported attributes

http://www.sidefx.com/docs/houdini10.0/nodes/dop/wireobject [sidefx.com]

you can see mass is one of them (or density too)
so simply create float attribute named “mass” with different values per point on source SOP geometry
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
114 posts
Joined: Oct. 2009
Offline
So create a standard attribute in the geometry context before the dop data ? on the attribute do i type in density but how do you set the amount?

Lyonz
User Avatar
Member
8595 posts
Joined: July 2007
Offline
either with expression in attributecreate node or vopsop or for example by painting with paint SOP or by directly editing in spreadsheet(which will lock your geo however)
or in chops according to curve or maybe another way i can't think of right now
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
114 posts
Joined: Oct. 2009
Offline
This is my first try at expressions but im trying to do the weight with a point sop and have entered if( $PT < 1 WEIGHT = 5 ) why is this not working? Also looking at the attribute create and have tried to put WEIGHT as the local varible but would you put the expression in the size bar ?

Lyonz
User Avatar
Member
8595 posts
Joined: July 2007
Offline
if you are creating for example attribute called “density” with attribcreate SOP
then

in name write: density
class: Point
Type: Float
size: 1

and your expression goes to first Value field
if you want first point to have value of 5 and the rest 1 then you can write something similar to your expression:
if($PT<1,5,1)

but if you are not into expression right now you may choose other methods i described above like Paint SOP or directly editing in spreadsheet
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
114 posts
Joined: Oct. 2009
Offline
This is what im creating, its a simple chain and im wanting weight on a few points so it falls faster on one end. After that trying to figure out how to link rbd objects to a wire object.

Lyonz

Attachments:
Chain.hipnc (160.7 KB)

User Avatar
Member
8595 posts
Joined: July 2007
Offline
you need to name that attribute according to attributes in help page i posted before

the idea behind this is that if Wire Object/Solver finds certain attribute on the source geometry, it will use that to override/multiply one of it's parameters
so if it finds float attribute called “mass” it will override mass parameter on wire object per point. if it finds density it'll multiply that attribute value with density parameter on wire object
the same for other mentioned attributes(angvel, orient, width, klinear, …)

you called yours attribute WEIGHT so it'll do nothing since it'll not be recognized by wire object

here is modified file
i also simplified chain_Thickness network, and added some Drag and increased stiffness on wire object

and it's not a good idea to crosspost, especially in case where you already have a live thread with the same topc
od-force and sidefx forums are usually read by the same people so it is easier to follow if the topic is discussed only in one of them rather than split in two

Attachments:
chain_mod.hipnc (147.9 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
114 posts
Joined: Oct. 2009
Offline
Thank you for replying, this method is far simpler than i had. I posted the topic up twice as i assume some people wont be signed up to both forums.

Lyonz
  • Quick Links