I've probably made a post about this before. Or I thought I did. .. anyway. I only make notes about things as I actually do them :) Repetition is the key to learning !
If you're trying to create constraints between two different objects, say a bunch of bricks and a big big of plaster wall you have to approach your primitive constraints generation a little differently than usual.
Normally you would put a Connect Adjacent Pieces node down and this would draw lines between your closest points. However if you were to merge the bricks and plaster together and do this, you still end up with lines being generated between brick bits and plaster bits..when all you actually want are the lines exclusively between brick & plaster. Whew.
To achieve this you have to hijack the name attribute of your brick and plaster geometry so that Houdini thinks there are only two names to connect between. Instead of having "brick01,brick02,brick03,plaster01,plaster02,plaster03" you will have "brick,plaster". that's it.
In a Point Wrangle(for packed geo) or a Primitive Wrangle(if you are working with unpacked geo) for each of your objects do something like this -
s@original_name=@name;
s@name="objectA";
where objectA might be "brick", object B might be "plaster". Now merge these two mono-named objects together , promote the name attribute to point level (if it isn't already) and apply the Connect Adjacent Pieces node to them. Now you should only see lines being generated between the two seperate groups of objects. Brick to Plaster. Plaster to Brick.
Finally you must bring back your original name, so use an attribute rename node for this..
Plug your nice sparkly constraints into the rest of your network!
Showing posts with label constraints. Show all posts
Showing posts with label constraints. Show all posts
Saturday, 30 March 2019
Friday, 8 March 2019
RBD, Constraints..Glue, fracturing. NAMES
Name attributes are the most important things when making constraints for RBDs.
Create a name attribute for your object/fractured pieces by laying down an Assemble node, without the Packed option enabled. Create your constraints with this geo (it will retain the Primitive Name Attribute, and pass it down to the Point level once you've used Connect Adjacent Pieces)
In another branch, use another Assemble node to follow up the previous Assemble node, this time with Packed enabled, but the others disabled. Now when you add your constraints to your DOP network, they'll be able to find the correct Pieces to attach to.
ALSO make sure your object names are all unique.
Names. Names. Names.
Another "quick" way to make rest lengths for your constraints is to do a Convert Line node just before the Primitive Wrangle (where you do s@constraint_name="thingy"). This is important for Hard Constraints.
A general rule for constraint types - Hard Constraints will provide overall flex between pieces.. Glue Constraints will keep the pieces all together.
Hard Constraints react to Force, Glue Constraints DO NOT.
Glue Constraints react to Strength and Impact. Hard Constraints DO NOT. *
*unless you tell them to in a SOP Solver - eg. if (@force>chf("breakThreshold")*@strength)
But this is you explicitly adding Strength into the mix... Could be any old attribute.
Create a name attribute for your object/fractured pieces by laying down an Assemble node, without the Packed option enabled. Create your constraints with this geo (it will retain the Primitive Name Attribute, and pass it down to the Point level once you've used Connect Adjacent Pieces)
In another branch, use another Assemble node to follow up the previous Assemble node, this time with Packed enabled, but the others disabled. Now when you add your constraints to your DOP network, they'll be able to find the correct Pieces to attach to.
ALSO make sure your object names are all unique.
Names. Names. Names.
Another "quick" way to make rest lengths for your constraints is to do a Convert Line node just before the Primitive Wrangle (where you do s@constraint_name="thingy"). This is important for Hard Constraints.
A general rule for constraint types - Hard Constraints will provide overall flex between pieces.. Glue Constraints will keep the pieces all together.
Hard Constraints react to Force, Glue Constraints DO NOT.
Glue Constraints react to Strength and Impact. Hard Constraints DO NOT. *
*unless you tell them to in a SOP Solver - eg. if (@force>chf("breakThreshold")*@strength)
But this is you explicitly adding Strength into the mix... Could be any old attribute.
Labels:
constraint,
constraints,
convert line,
fracturing,
glue,
hard,
names,
rbd
Subscribe to:
Posts (Atom)