Posted: Wed Jun 04, 2003 8:56 pm
Joined: 04 Jun 2003
Posts: 4
I would like to create a simulation of a number of spheres bouncing
around within a confined space, in an attempt to emulate gas molecules
diffusing. I need to give each sphere an initial velocity and let them
loose in that space, and I am wondering what the easiest (and/or the best) way to do that would be. Can I do this using the game engine?
Also, is it possible to render AVI animations from Blender games? Is
it possible to create stand-alone, java-applet-like programs from
Blender games?
Thanks!
Posted: Wed Jun 04, 2003 9:31 pm
Joined: 16 Oct 2002
Posts: 453
Before I answer the question: You should direct this kind of question to the elysiun realtime engine forum
http://www.elysiun.com/forum/viewforum.php?f=6 - it's more appropriate for questions how to use/ how to do something in Blender.
| benhuryokya wrote: |
I would like to create a simulation of a number of spheres bouncing
around within a confined space, in an attempt to emulate gas molecules
diffusing. I need to give each sphere an initial velocity and let them
loose in that space, and I am wondering what the easiest (and/or the best) way to do that would be. Can I do this using the game engine? |
The simplest way to do that would be:
Create the object, add an integer property and call it init, assign 0 to it, add a property sensor for the property init that fires pulse when init is 0, add an and controller, connect it to the sensor, create a motion actuator (here you can assign a linear velocity linv), connect it to the controller, add a property actuator for the property init and assign 1 as the value. That should work. Play around with the material settings and maybe with the world settings to get the desired effect.
| Quote: |
| Also, is it possible to render AVI animations from Blender games? |
Not directly, no. But you can use the python function Rasterizer.makeScreenshot(file) to save screenshots of the game engine. So a small script should be able to store a series of screenshots and convert it then to a movie. Perhaps you've got to "enable all frames" to get a good series. Maybe someone has already done something like this. Ask at elysiun.com.
| Quote: |
Is it possible to create stand-alone, java-applet-like programs from
Blender games? |
Kinda. You'll need the browser plugin for it. Look at http://www.blender3d.org/About/?sub=Gallery3dwebplugin to see interactive demos (a link to the instructions are at the bottom).
Posted: Wed Jun 04, 2003 9:53 pm
Joined: 04 Jun 2003
Posts: 4
That was very useful. Thank you.
Posted: Wed Jun 04, 2003 10:01 pm
Joined: 04 Jun 2003
Posts: 4
Actually, that works, but now the spheres do not bounce off the walls
or off each other, even with the material property restitution is set
to 1 with no Fh friction. Any ideas?
Posted: Wed Jun 04, 2003 10:12 pm
Joined: 04 Jun 2003
Posts: 4
It turns out the method works as described above, but with the force
imparted on the object, not linV. Once again, thank you.