Initial Velocity

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

benhuryokya
Posts: 4
Joined: Wed Jun 04, 2003 9:40 pm

Initial Velocity

Postby benhuryokya » Wed Jun 04, 2003 9:56 pm

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! :)

kAinStein
Posts: 453
Joined: Wed Oct 16, 2002 3:08 pm

Re: Initial Velocity

Postby kAinStein » Wed Jun 04, 2003 10:31 pm

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.

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.

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).

benhuryokya
Posts: 4
Joined: Wed Jun 04, 2003 9:40 pm

Postby benhuryokya » Wed Jun 04, 2003 10:53 pm

That was very useful. Thank you.

benhuryokya
Posts: 4
Joined: Wed Jun 04, 2003 9:40 pm

Postby benhuryokya » Wed Jun 04, 2003 11:01 pm

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?

benhuryokya
Posts: 4
Joined: Wed Jun 04, 2003 9:40 pm

Postby benhuryokya » Wed Jun 04, 2003 11:12 pm

It turns out the method works as described above, but with the force
imparted on the object, not linV. Once again, thank you.


Return to “Interactive 3d”

Who is online

Users browsing this forum: No registered users and 1 guest