Jump to content
khalid

RBD Orientation

Recommended Posts

Hi everyone

I have a scene with packed RBD controlled by a POP ATTRACTOR... i want my objects to be align to the velocity (take the vel vector direction)..i tried to manipulate the orient attr inside the Sop Solver but it didnt works for me or maybe i miss something. Thanks in advance for the help

RBD_Orient.hip

Share this post


Link to post
Share on other sites

if you are trying to rotate packed prims you need to modify their intrinsic transform.

I provided a possible solution to what you described and another example of rotating packed primitives in the sop network

 

RBD_Orient_2.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

Hi david

COol .... thanks a lot man .. it works great like that ..i tought that to modify the orientation i have to play with the orient attr.

Share this post


Link to post
Share on other sites

Very cool, David. This was the first major question I had, migrating to Houdini some 1-1/2 years back - and I actually never got it solved, well, not as I would have wanted to solve it. But yeah, this is how I would have wanted to do it.

Now, I did a really crappy smooth function using timeshift and a wrangle, but there's just gotta be an easier/better method to do this, right? And over more frames - 5 would do I imagine. Or perhaps there's another way to get rid of the jitter when velocity is really slow? For a moment I started thinking about doing a velocity based multiplier for the alignment, but then I realized I had nothing to multiply, there's no amount of alignment, it's just aligning. :D

packed.align.to.vel.v1.hiplc

 

Share this post


Link to post
Share on other sites

one thing you could do is interpolate between the new rotation and the rotation from the previous frame, that way you can achieve some sort of blend and that can be based off speed I guess.

The jitter is a product of the sharp changes in the velocity and personally I would rather solve that by modifying the forces acting on the points instead of smoothing out the extreme rotations.

 

 

 

packed.align.to.vel.v02.hipnc

Share this post


Link to post
Share on other sites

Yeah, I played around with forces and drag, trying to balance it out - and sure, it gets better - but smoothing the velocity over three frames makes it a lot calmer, I think upping that to 5 frames would solve the issue completely. I just don't want to have to split it up in two wrangles - or perhaps there's a way to access offset frame attribute values in VEX, though I didn't find anything in the documentation...

I just checked your setup, yeah, it's about the same as I get smoothing it over a couple of frames. Here I tweaked drag and forces too...

track.gif

I gotta ask, though, why are you using a multiple solver for the POP forces? As you already have a multiple solver in the RBD solver, they plug right in. :)

And that VOP, damn, following other people's reasoning in VOPs is always a lot of fun... :D

rwNqqt7.gif

 

Edited by Farmfield
  • Like 1

Share this post


Link to post
Share on other sites

it's mostly just an organizational habit

 

cheers

Edited by dchow1992

Share this post


Link to post
Share on other sites
6 hours ago, dchow1992 said:

it's mostly just an organizational habit

 

cheers

Yeah, I thought that was the likely reason. My mode is almost always to try to minimize the number of nodes, I'm always thinking "how can I simplify this" - because you almost always can. Though I do love to add nulls to keep my node trees looking nice. Sometimes a bit too much. :)

spiderweb2.jpg

The question is if adding a solver like that will create any overhead or if it's redundancy basically makes it a passthrough. Not really relevant in a setup this small, but doing some 2012 type California is crumbling, falling into the Pacific with a trillion RBD objects stuff like that have a tendency to make a huge difference.

And thanks for the scene file, it's a really interesting setup using a slerp to ease out the jitter. I'm at the point where I can understand what a setup like that does, but I've got a bit to go before I can do them myself - sometime, long time in the past, I was supposedly an engineer, hehe, but I'm basically resurrecting my math skills after 20+ years of not really using them, it more or less feels like I'm starting from scratch again. At 45. :D 

4 hours ago, khalid said:

wow !! Thanks Guys for your setups

Don't thank me, I just took Davids great work into a fitting scene setup to show off how well it worked. All credit goes to him. :)

Edited by Farmfield
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×