3dbuzz Mech project in trueSpace

User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »

mechSnowFlakes.jpg
Snowing!

Been hard at work on the particle system.

New inputs and controls:
time - value animated to drive the particle simulation
Emitter Mesh - particles can emit from the vertices or from the surface of the mesh, in this case it's a large plane up in the air
FadeIn/FadeOut - control opacity of the particles at the start and end of their lives
ScaleIn/ScaleOut - grow to full size at start and shrink down to zero at the end
SpinRate - each particle spins on it's face
Vortex - simple tornado like effect
WindXYZ - push particles with the wind
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »


Explosion physics simulation

This was a lot more difficult than expected. If you push it you can really see the physics limitations in trueSpace.
Final sim for the fragments used a charge force to propel them apart and upward.
The antenna tower was a grouped object with the break option checked. The sim was run on low res geometry and the higher quality meshes were parented to the low res sim geometry.
Both simulations were run independently and keyframes were baked from the simulations. The fragments were re-timed to fit the falling tower.

Some of the problems encountered:
adding pivots to meshes can mess up the sim
the object navigation widget may mess up the sim
if sim totally messed up may need to manually delete the PhysicsEngine node
sim seems to override values set for mass and electrostatic values - had to write a script to force the start values
a script command for impulse function is the "natural" way to add an explosion but its effect was very weak
fragment pieces touching prevented good behavior - stopped impulse and initial velocity scripts from working
setup ground physics for collision made the sim choke
charge force reduces with each collision even when the checkbox that says don't do that is checked
many crashes

Next and final task explosion particles
Clinton Reese

http://clintons3d.com
User avatar
Finis
Captain
Posts: 5256
Joined: 21 May 2009, 18:26
Type the number ten into the box: 0
Location: North Venezuela or West Korea
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by Finis »

Good work. Makes me nostalgic for the good old days with trueSpace. I did the Splododyne Explodiatory Explodolator back then. It shoved objects around as if effected by an explosion by using physics to fire many small but massive objects from a central form. https://www.youtube.com/watch?v=-ap7-Y4tbmI

Looking forward to seeing the finished animation.
Mice die in traps because they don't know why the cheese is free. -- seen on a bumper sticker
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »

That's a good idea. If I ever do another tS sim I'll give that a try. The only thing that could stop it from working is the tS tendency to assign it's own mass values
Clinton Reese

http://clintons3d.com
User avatar
Finis
Captain
Posts: 5256
Joined: 21 May 2009, 18:26
Type the number ten into the box: 0
Location: North Venezuela or West Korea
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by Finis »

Maybe the mass assignment is a workspace thing. true Space, "model side" and its ancestors, let me change the mass. It was not easy to change for all the projectiles though. So I would change one and use the "find and replace" tool to do it. You could make a script for that. The physics took forever to run but that was on slower machines back then.
Mice die in traps because they don't know why the cheese is free. -- seen on a bumper sticker
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »

Yep, workspace and that's the approach I took. After a sim is run any values you assign to mass are overwritten, but I think if you assign with a script set to run at the start of the sim it will use that script assigned value. Not 100% sure though, it's hard to keep track when things are changing automatically behind the scenes.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »

Final particle simulations.
Various additions and fixes for the particle sim code with fewer and less severe crashes. No more tS suddenly crashing out. At one point any change to the script cased tS to completely crash. I got around it before the final fix by exporting the script then importing it into a fresh jscript object.
Added initial spin range so each card can have a random rotation at birth.
Ramp for opacity control of the smoke.
Math for fading and scaling was wrong and normalized the values entered to match the life of each particle.
Particles always had speed even when it was set to 0.
Fixed the particle recycler. It was failing and extra faces were gathering around the emitter center.
Scaled input values so they make sense with each other. So for example if emitting at a rate of 1 will give 1 particle per second.
Added controls for bounciness, die on collision (with ground) checkbox, frame rate, initial size so particle doesn't have to grow from a size of 0.
MechFireball.jpg
MechSmoke.jpg
Next step is to add the smoke to all the other flying fragments
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: 3dbuzz Mech project in trueSpace

Post by clintonman »



It's done! :bananacool2:

The final render includes particle systems for the snow flakes, explosion fireball and smoke trails.

The final render was cut short when tS started giving errors at frame 863. I disabled bloom and got another 32 frames out of it to end at frame 895. The goal was frame 1000 so almost made it. Additionally there were 250 frames of snow simulation before frame 0, so it was snowing already when the animation started.
The render took about 4 hours including the 250 frame "pre-roll" for an average frame time of about 15 secs at the end. The particles are script based so they can take a long time to calculate.

Notes:
The snow flakes are too big. I had a mistake in the material for the snow flakes that made them dim. After fixing they were much brighter and could have been half the size and still be easily visible.
The sequence was rendered in 2 parts because the laser and fireball glows couldn't be done at the same time. First scene was setup with the laser glow rendered to that point then the glow was changed for the fireball and the render continued from that point onward.

Todo: fix that last major particle system bug. It doesn't crash tS anymore while tS is open, but it did prevent tS from starting with the render file saved into the default context. It gives a predictable error then fails to open tS. After the major bug is fixed there are just a couple of other things I want to add to the particle system.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: 3dbuzz Mech project in trueSpace

Post by trueBlue »

Fantastic!
Well done Clinton, looks very good!
I have been following along watching the "when-mechs-attack" videos.
Post Reply