Blender Underground

Away from the watchful eye of The Man
It is currently Wed May 22, 2013 11:18 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SMASH! Interacting rigid body sims with f-curve animations
PostPosted: Mon Sep 06, 2010 9:17 am 
Offline
Specialist
User avatar

Joined: Thu Jul 24, 2008 10:43 am
Posts: 1911
subtitle: how to smash into stuff

I've ignored the game engine because If I'm going to make a game it will most likely be with the UDK.

That is a mistake because in Blender 2.5x the game engine is where rigid body physics sims are done. Here is a quick synopsis of what I've picked up: First you animate your object as normal using f-curves. Next, with the animated object selected you go to the logic panel (which controls the game engine) and add an "always" sensor, linked to an 'and' controller linked to an 'f-curve' actuator. Now go up to the top line and change render type from blender render to game engine. {The animated object must have physics type static applied to it and the objects that you want to simulate need rigid body type physics - all must be set as actors}. Now if you hit P (or select start game engine from the game tabs, your animation should go and then rigid body fun begins (smash , pow, bouncy- bouncy). Once you get it all working properly, go to the game tab and click on record animation. Run your sim and wait and wait because its making ipo curves for each object set to rigid body. NOTE this will run until you press the esc key! The only hard part is that the timing for the sim doesn't seem to line up properly, so you have to select all the sim f-curves (good luck it will lag your machine guaranteed) then hit 'x' so that you only move them along the x-axis and move them to the proper frame. NOW you can switch back to the regular render and rend away - you can also play back using alt-A to check it out from different positions. Its interesting that even with all these crazy f-curves (there are 6 for each object!) the render is very fast.

So here is the blend file (modified by me, made by Richard Marklew)

and here is my smashemup vid ( number of smashable cubes cut down to a more manageable number)


Top
 Profile  
 
 Post subject: Re: SMASH! Interacting rigid body sims with f-curve animations
PostPosted: Mon Sep 06, 2010 9:46 am 
Offline
Agent
User avatar

Joined: Thu Feb 12, 2009 9:18 am
Posts: 961
Location: Germany
Thanks for the info, walsh! Nice animation, looks like a lot of calculations had to be done. How long did the simulation take?

_________________
Learn from the past, plan for tomorrow, but live in today!

My deviantART


Top
 Profile  
 
 Post subject: Re: SMASH! Interacting rigid body sims with f-curve animations
PostPosted: Mon Sep 06, 2010 12:47 pm 
Offline
Specialist
User avatar

Joined: Thu Jul 24, 2008 10:43 am
Posts: 1911
the sim really didn't take long, it was about 1/4 speed so about a minute! What took the longest was trying to run the curve simplifier addon! To make a long story short it is of NO benefit in a case like this, only useful for smoothing out jittery curves, LOL, joke was on me. Second longest was to figure out how to select all 270 curves for the little blocks, but not for any other objects and moving them was a bit of trial and error due to lag. Each frame was rendered in HD with 5x motion blur and still only took 11-16 seconds to animate with ray traced shadows and atmosphere! I was rather suprised but all those curves didn't seem to add more thatn 10% to overhead.


Top
 Profile  
 
 Post subject: Re: SMASH! Interacting rigid body sims with f-curve animations
PostPosted: Tue Sep 07, 2010 1:16 pm 
Offline
Agent
User avatar

Joined: Thu Feb 12, 2009 9:18 am
Posts: 961
Location: Germany
Sounds great! Is the 2.5x-renderer really that much faster than the older one? Maybe I'll have to get 2.53 for rendering purposes only.

_________________
Learn from the past, plan for tomorrow, but live in today!

My deviantART


Top
 Profile  
 
 Post subject: Re: SMASH! Interacting rigid body sims with f-curve animations
PostPosted: Thu Sep 09, 2010 6:15 pm 
Offline
Specialist
User avatar

Joined: Thu Jul 24, 2008 10:43 am
Posts: 1911
i've not really compared them. I decided that it was inevitable to switch so might as well just jump in and start swimming! I now hate 2.49, no kidding. Once you get used to it you will appreciate the improved integration, it just makes more sense in most things now, imho


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr