GUIDED SCENE
Parking flood

Download Sample Scene


Vid1:Holy Coders!!!
This simulation takes less than 9min
in a mono processor 2Ghz machine, 1gb RAM, GUI mode!




Well, first think out this guided scene. We don´t want you to follow our steps exactly, I mean this a conceptual workarround about the scene, so don´t expect a step-by-step-you-know-how-to-make-that-scene-but-don`t-try-with-another-one.

Ok then, now we are going to split our explanations into different main parts:

Part 1 : Dynamics Scene Setup



Fig1: Our scene . The car model has been downloaded from 3DCAFE

As you can see, our scene is full of rigid body behavior objects. The car, the barrels, the column and the parking. We need all of them to interact with each other.
Whats more, in some cases we need objects to be constrained with others. Our car is divided into different components. Doors should rotate according to its restrictions to the chassis, as does the trunk and the bumper that should be fixed to the chassis.

First of all, select all the objects in scene and activate its dynamics.
To do that, go to the Objects Tab ( the empty circle one) and check Dymanics to Yes under Dynamics panel.

Create a gravity and assign it to all the objects within the scene tree window.

If you are coming from RF2.5, you will notice that we have changed a couple of things when working with imported .sd scenes.
First of all, the Lock Animation feature has changed into a new concept, now you can edit the animation curves of imported objects just pressing the SD<>Curve button. That's independet from dynamics, I mean you can perform dynamics either with curve or with sd objects, but if you want to move an object within RF3 viewports by hand, you need to Curve it.

Ok. In this scene we don´t need to curve our imported data, beacuse we want RF3 to perform all movement using dynamics.
Take a look to the new Dynamics Tab. As you can see, now there are two main dynamics behaviors :

  • Dyn Motion Yes/no: Objects performs dynamics/objects performs Curve or SD animation.
  • Collision Yes/no : Objects performs Collision/ Objects don't collide.
This system has allowed us to introduce a new workflow with dynamics behaviors. Objects can now be moved by dynamics, but cannot perform collisions against each other. We can also maintain our imported animation or the handmade one within RF and make the objects collide. As you can see, this is a huge step in our dynamics solver and a new way of working for you.

So, If we want an object to just recieve collisions, not moving, just check its dynamics to yes, Dyn motion to no, and Collision to Yes. That´s the setup we are going to use with our entire parking and our column objects.

For the rest of the objects in our our scene, check out Dyn motion too, cos we want them to be moved by dynamics as explained above.

When working with dynamics, you have to take really special care about the objects mass. The object mass is a property that only objects that are going to be moved by dinamics will display. You can either use real mass (cos' it is given in kg) or just related mass. With related mass I mean that if the car is set to 100kg, the door could be more or less like 10.
For this scene I have used the second method, I´ve turned arround with diferent mass values (even real ones) but It was difficult to make the car turn when hit the wall.

By default, the collision method is set to Box to all the Objects. The collision method is the proxy geometry that the dynamics solver will use to perform Dyn motion and collisions.
As you can imagine, a Box proxy is not the best way to work with all the objects of our scene :).

In our scene, we need to change the collision method for all the object except column one.
We are going to use the Mesh collision method for the parking stage. The collision side should be set to Outward because our object has its normals facing the inside.
The Mesh collision method will use an optimized version of the object`s geometry , keeping all the Convex and Concaves zones active.

For the car and its elements, choose ConvexHull method instead of mesh. Convex Hull perfoms a geometry wrapping optimization based only on the Correct collision agiants Convex Parts.


TIP
If you want a box type object to perform collisions inside of it, you have to use mesh primitive instead of the Box one. The Box primitive doesn`t allow you to choose between the faces orientation, it will always use Outward.


What type of collision primitive would you choose for the barrels?...

Yep!, Convex Hull is the answer.

Now we are going to focus on the car and its elements.
If you take a look to the new RF3 tech-spech, you will notice that we are including rigid body constrains now. We are going to use a couple of them. The fixed and the Hinge ones.

Reminder about constraints


Fig2: Fixed Constraint

Fixed Constraint
A Fixed constraint forces objects to share the same relative position and orientation in space as if they were glued together. Its utility comes from the fact that it can be breakable, therefore you can represent bodies that break at some point of the simulation loop.


Fig3: Hinge Constraint

Hinge Constraint
This constraint allows you to simulate a hinge-like action between two bodies. When no parent body is present. It is also well suited for representing fixed rotation axis in space.

Take a look to image Fig2. We are going to use the Hinge Constraint with the wheels, the doors and the trunk. The bumper should be fixed to the Chassis.


Fig2: Conceptual Car Constraints setup

I´m going to show you how to place and setup the hinge constraint of one of the doors, the front wheels and the fixed of the bumper. I'll let you to place the others.

The Constraints are located in the Constraints Tab (A circle with tree arrows inside). Go through the drop down list and choose Hinge. Remember that your objects must have dynamics set to Yes.


Fig3: Door Constraint setup

Select the door as the child,and the chassis as the father. Now move and rotate the constraint helper trying to match the length and the position of the constrainted region as close as possible.
The Helper's size and position determines how the father and the child will interact. So, spend time getting an accuarate setup.

The door shouldn`t open more than 90 degrees. That's what we have introduced in the MinR and MaxR parameters. The rotation orientation is taken from the helper`s position. You can test your restrictions setup within the viewports.
The Restitucion factor performs a rebound effect when the minR or the maxR is reached. The default value returns no rebound other than the inertia.

You can use the breakable frame or the breakable force to deactivate both the constraint and the inherit linked. The Door will blast away!

Turn self collision to yes if you want, but with a rotation limit like the one we have, you won´t get noticable results.


Fig4: Wheels Hinge

Repeat the process for the front wheels. Notice how we have tried to match the rotation axis position and size (Fig 4). I wont get tired of saying that, it's really, really important.
We dont want the wheels to have limited rotations, so don´t check the limited tab.


Fig5: Fixed Constraint

The Bumper will be fixed to the chassis, forcing it to share the same relative position and orientation in space as if they were glued together. Fixed constraints have a special trick.

Upon first glance, you won't notice the difference between placing the helper in one position or another, even changing its scale could give you very similar results. But numericaly, what the fixed constraint do is to match the position of the tree points of the helper and and keep the offset between the father and the child. So to help the fixed constraint to work in a more stable way, try to match a correct position as much as posible; in between and touching the constrainted objects.

You can also brake the constraint, like in the hinge one, at a desired frame or when a determinated force value is reached.


Ok, now Constraint the rest of the car...

...or you can also open the parking_flood_contrainted.flw wich is included in the downloaded scene.

Part2: Particles Setup

As shown in Vid1, what we want is the car to be coiled by the incoming water flood, hit the wall and turn onto its side.


Fig6: Stage Setup


Fig7: Hiding the emitter

We have modeled our stage thinking of where we can hide our particle emitters. In this example, that is very evident, but in some cases it can be tricky.
This part's gonna be very, very simple. Much more than you think, I'm sure.

Go to the emitters tab and choose a square emitter. Try to place it in a similar way as Fig7 shows, trying to hide it from camera.
But for testing porposes you can use the default particles resolution, 1 or even less. I have set the particle resolution to 5, to get the more detailed flood.

Well, now go to the scene tree and assign all the objects to the emitter (we want particles to colide with everything). Assign the gravity too.

Just one more thing. I have changed the particle force value of all the objects that are going to be coiled to 2 . I wanted a more violent reaction against particle, but keeping obejct mass intact, I like its heavy look.

Reminder about Particle Force

Particle force

The particles that collide with an object can move it . This value controls the strength of the collision with the objects.


Fig8 and Fig9 shows you the difference between a value of 1 and a value of 10 in the particle force parameter of the orange sphere.

The mass of the sphere is the same for both images.


Fig8: Particle Force set to 1


Fig9: Particle Force set to 10

And that's all. Hope you have enjoyed it!!


 

Errr... It would be cool to have a render of that... ummm... but we are really busy at the moment... ol' buddy, ol' pal...