Havok Physic-Engine @ Enemy teritory -pimpage inside-


(system) #1

Finally i found some time to do an idea i had for several months.
I wanted to use animated models for physical correct flying debris using the havok-physik engine shipped with max5 (reactor).
The best is: it worked :slight_smile:

Here a small how-to-do:

[b]1. Get used to max or a similar app that delivers physics-simulations.

  1. Build your model and set it up for the reactor simulations.

  2. run the simulation.

  3. now export two models:

    4.1. All Animationframes as .md3 . (our mainmodel)

    4.2. One model with only the last frame for our clipping.

  4. Add the model to radiant using a props_decoration entity (the text is in the rtcw.def ).

  5. Trigger the props_decoration with your prefered and fitting trigger ( see the P.S at the buttom)

  6. Insert the model again, but this time as a misc_model and clip it.

  7. Delete the model from 7 and insert your “last-frame-model”. clip it too. Then delete.

  8. Make all Clip-brushes from point 8 to a func_static and make sure they are triggered, too then the animation starts.
    Maybe you have to put in a target_delay to avoid that the cli-brush appears bevore the last frame was played.

  9. compile and enjoy. ;)[/b]

Some pics:

Rendermovie from max5 witch shows the simulation (save as…). -> divx5.04 <-
The grey stuff simulates the Panzerfaust impact (sorry I’m a reactor newbie.)
http://home.arcor.de/fieslings-place/temp/sandbags_render.avi



Disatvantage: You are limited to the .md3 format polycount. :frowning:

Conclusion:
It’s a lot of work, but i think it pushes the limit. Imagine tanks breaking through house-walls or aircrafts blowing away stuff.
This props_decoration stuff is nothing new but using it this way is better then the good old falling grandclock in wolfie. :wink:
I hope i could inspire some uf you using it in your maps. :banana:
Maybe it would have been a better idea to show another Demo. A blowing bridge or something. The sandbags are not spectacular. :wink:

P.S:

  • script for objective stuff (not tested)
  • a func_button if you want to blow up a bomb / door or some stuff
  • a trigger_multiple if you are running over the open fields and a plane is
    attacking you and maybe destroys houses around you. :wink:

(damocles) #2

Good idea. Although with the spline paths etc in ET you could do it using brushwork models too and faking the physics - this would be easier for when you want to bounce the debris off of walls.

side question - has anyone played around with func_debris? Does it merely shoot debrus fragments or does it send a brushwork model flying out with basic physics?


(digibob) #3

Do NOT use props_decoration, it is incredibly network in-efficient. Instead, use a misc_gamemodel, and just trigger the animation with a simple script command.


(Fluffy_gIMp) #4

What you could do is use a number of animated tags for the movement of the rocks, break the rocks into different models with no animation frames and script it so they were attached to the tag animations. This is the same way the 1st person weapon animations work, it cuts down the amount of animation data you need to store, as all you are animating is a tag (3 verts) and attaching to it, a bigger model.

-Fluffy_gIMp


(G0-Gerbil) #5

How do you trigger animations by script? I’ve not looked into it myself yet so a RTFM might be on it’s way - it’s just I’ve been thinking about animations for a future map…


(chavo_one) #6

From the LDR: :wink:

startanimation <startframe> <framecount> <fps> [norandom|nolerp|noloop]
Make an entity animate. (Used with misc_gamemodel.)


(G0-Gerbil) #7

Cheers :slight_smile:

Isn’t LDR spelt RTFM though? :drink:


(sock) #8

The best example is the radar dishes in the map radar. The radar dish open/close sequence is played once with an entity rotation for the spin sequence. The best bit about the animation system is the “nolerp” function so the open/close of the dish is perfectly smooth with the overall rotation of the dish.

Sock
:moo:


(system) #9

Cool thx guys for the advice. I’m not a script-guru so i didn’t know, but your way is definitly better. :slight_smile: