Jump to content

RBD Rotation - Cracking Road


JamieH

Recommended Posts

Hello,

I'm investigating a solution to crackup a road and have the pieces fall with gravity as if there was nothing under to support it. At the moment I've got an approach working where the cracked pieces are separated enough not to collide with parts of the road not yet "cracked" and therefore free to fall without collision problems. Gravity is added to pieces contained in a dop group who's members are added via red colour:

if(prim($OBJID, 0, "Cd", 0)>0.1,1,0)

if(prim(OBJECT, PRIMNUM, ATTRIBUTE NAME, ATTRIBUTE INDEX) is greater than 0.1, TRUE VALUE, FALSE VALUE)

All this works nicely and the pieces begin to fall when they crack and turn red, however its a bit plain and boring. I'd like to add rotation into the mix but having tried all the forces I'm not getting a nice look at all.

I've tried using a motion node and using an expression something like:

(fit(rand($OBJID),0,1,0,360))+($F*20)

which works nicely in some respects but it obviously doesn't have any correlation to how fast the object is moving. Is there any way of getting something like magnitude(velocity) for each $OBJID so I could multiply the rotation of the object against its speed. i.e; as the object begins to fall the rotation is small, as it speeds up so does the rotation?

Of course this might be the wrong way of going about this especially as i'm new to houdini. The above is a method i've used in Maya before to some degree of success :) If anyone has any better ideas please give me a shout / nudge in the right direction!

Thanks in advanced.

J.

Edit:

Just thinking about it... if I don't want collisions with existing pieces could this be more easily done somehow by copying a particle to the center of each object and then linking the motion to the particle (after adding in some sort of rotation to the particle too)? Again I'm new to houdini and haven't dived into pops properly yet so might be more trouble than its worth given I've gotten this far with dops... but just thinking on my feet.

Edited by JamieH
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...