Isaac Nygaard
Isaac Nygaard
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Get collision normals from collision mask 2014年8月21日13:34
It turns out, the gradient of the SDF gives the normal field. So, if you have a collision/SDF field col and position x, y, z, you can get the normal with:
UT_Vector3 n(
col->getValue(x-1,y,z) - col->getValue(x+1,y,z),
col->getValue(x,y-1,z) - col->getValue(x,y+1,z),
col->getValue(x,y,z-1) - col->getValue(x,y,z+1)
);
n.normalize();
UT_Vector3 n(
col->getValue(x-1,y,z) - col->getValue(x+1,y,z),
col->getValue(x,y-1,z) - col->getValue(x,y+1,z),
col->getValue(x,y,z-1) - col->getValue(x,y,z+1)
);
n.normalize();
Get collision normals from collision mask 2014年7月30日16:20
I am working on collision resolution for a custom solver I am writing. I am using the gas-build-collision-mask node to get the SDF and a velocity field of the collision objects. However, for my collision resolution, I would like to separate the normal and tangential velocity components. What is the best way to do this?
Since my solver is on a grid, I considered just using the gas-enforce-boundary node (since this is pretty much exactly what I am trying to do). However, as far as I know, it will zero out the relative velocity in both normal and tangential directions. I would like to only zero out the relative normal velocity, and optionally, add dynamic friction to the tangential direction.
Any help is much appreciated.
Since my solver is on a grid, I considered just using the gas-enforce-boundary node (since this is pretty much exactly what I am trying to do). However, as far as I know, it will zero out the relative velocity in both normal and tangential directions. I would like to only zero out the relative normal velocity, and optionally, add dynamic friction to the tangential direction.
Any help is much appreciated.
"Add" node grouping problem 2014年3月6日18:31
Okay, thanks. That works.