Showing posts with label velocity. Show all posts
Showing posts with label velocity. Show all posts

Tuesday 30 April 2019

recalculating velocity

Nicked from Walter..

Velocity is a vector..
Velocity=speed x direction.
I was using this because some of my POPs had too much speed and were going through my collision objects.

If you store the normalised version of your velocity, this is the direction. Then you can multiply it by a new speed.. Perhaps you want to make it 85% of it's velocity until it reaches your max target?

So...in VEX:


vector direction=normalize(@v);

float speed=length(@v);

if(speed>chf("maxSpeed")){

speed*=chf("dampMultiplier");
}


Friday 5 April 2019

Monday 17 July 2017

pyro - "custom wind volumes"

Sometimes you want to have pyro behave a certain way in a certain area. Eg.  the smoke should go from left to right, then suddenly shoot upwards after a few seconds.

Instead of fiddling with the advection or velocity updates, it's a bit simpler to create a separate pyro source that only emits velocity.
Simply create a source as you normally do, but remove it's density & temperature. Remember to scale these to zero in the DOP area too!

Saturday 3 December 2016

FLIP volume velocity field (again)

Create a VDB with desired turbulence/noise in whichever way you fancy. Make sure the vdb is called "vel". Keeps things neater..

Inside the FLIP autodopnetwork, use a Source Volume node to bring in your velocity vdb. Scale & Temperature can be ignored. Be sure to uncheck the velocity "mask" and set the volume operation to "add".


Tuesday 4 October 2016

velocity volume fields like Maya

It's possible to make a piece of geometry, pump it through a PointVOP and give it some velocity, using constants, curl noise or whatever method you like.
Then convert the polygon to a VDB, using the V point attribute. Name the field "vel".

Within POPs/dynamic network use an advect with volume operator. The defaults should keep the velocity's affect within the volume created.

If this doesn't work as expected you might need to use a Geometry Wrangle (within the POP/Flip/dynamics)
Using the code below, you'll want to set the 2nd input (in the input tabs) to the velocity volume created earlier.

vector vel = volumesamplev(1,0,@P);

v@force += vel * ch("scale");

v@a = vel;

Basically we're affecting the velocity via a force, rather than adding directly to it - to avoid overly strong changes in velocity. We also have extra control with a scale slider & the "a" attribute is a little debug value to watch out for in the Geometry Spreadsheet.
Note - you might have to really crank up the velocity values, depending on the current velocity of the existing particles/fluid/whatever.

*NOTE* The Geometry Wrangle should be plugged into the particles tab of the solver! (2nd one)