sabato 9 febbraio 2013

Houdini – How to create a “Rigid Body Emitter”


A couple months ago the director asked me to make an effect of rocks falling randomly from the sky: in this case I needed  to build a system that continuosly emits objects (like a POP emitter), but those objects had to behave like rigid bodies. So I had the idea of a "rigid body emitter": you can watch the video below to better understand what I am talking about.



To replicate this effect, just follow these simple steps:

  • Create a POP network with an emitter: the particles generated by this network will be used as instance points. Set a small value for particle life expectancy (something like 0.05).
  • Create a DOP network with a "RBD point" (manually or by using the Point RBD shelf tool); use the particles as template. This powerful operator creates a copy of a given SOP (as rigid body) on each point of another SOP.
  • Here is the trick. :) Using an expression, edit "creation frame" parameter to make the PointRBD generate continuosly new objects: "$F", for example, means that PointRBD creates new objects on each frame (but I strongly recommend to NOT use it, or many rigid bodies will interpenetrate). I used this expression to create new rigid bodies every 2 frames, until frame 100:
if($F<100,if($F%2==0, $F, 0), 0)


After that, you can randomize many things, like phisical properties, size, emitted objects and so on. To do that, you must basically create the corrensponding attributes on particles and transfer them to the PointRBD node.


Download the sample scene from here (password: valeriodinapoli) to better understand this workflow.

Nessun commento:

Posta un commento