Archived post by Lorne

@Solitude @nicholas ralabate so I’ve somehow never heard of Gas Velocity Stretch before but it basically takes care of all this rotation business for you

and you can feed p@rot through a 2nd gas velocity stretch node using a different field to drive extra rotation

here’s a curl analysis piped into p@rot

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20203710/29/20/gas_stretch_v001.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20203710/29/20/gas_stretch_v002.mp4

Archived post by WhileRomeBurns

@danmoreno i tried it out, it works okay. to make life painful i did it in one dop and using sparse. i recommend 2 dops for simplicity

find_densitymask on the left looks for the intersection of the rising smoke and the sphere and handles the dissipation inside the sphere. transfer_density on the right side reaches into the other dop object and uses the densitymask as an emission source. because it has collisions on, the smoke stays inside.

warning: this one-dop-sparse setup has all sorts of dumb shit to keep the second solver active and tracking the other one

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20204005/18/20/smokefill.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20204005/18/20/smokeFill.hiplc

Archived post by WhileRomeBurns

the other thing houdini does is accumulate air resistance and target velocity if you have 2 or more wind forces. the function to do that yourself: “`void addWindForce(vector targetv2; float airresist2; vector _targetv; float _airresist) {
float airresist_sum = _airresist + airresist2; _targetv = (_targetv * _airresist + targetv2 * airresist2) / airresist_sum; _airresist = airresist_sum; }“`

Archived post by WhileRomeBurns

if you want to use `targetv`, `airresist`, `drag` you could do the math yourself and store them in custom attributes like `@c_targetv` so bullet doesn’t pick um up and make nans

it’ll be something like this:

“`float imass = 1.0 / @mass;
@c_airresist = @c_airresist * @c_drag; if (@c_airresist > 0) {
    // the relative ang vel     v@v -= v@c_targetv;
    // quadratic drag     v@v *= 1.0 / ( (@c_airresist * imass * @TimeInc * length(v@v)) + 1.0 );
    // restore frame     v@v += v@c_targetv; }“`

i don’t see how that could produce a nan unless c_airresist was negative or mass was zero

which you can add checks for if you like

just skip zero-mass dudes