Posted: Tue Mar 23, 2010 4:36 pm
Joined: 22 Mar 2010
Posts: 2
I'm working on a dust simulation that I think blender would handle very well. For my calculations I need to extract values in 3D space so they can be equated to densities. I need to do this frame by frame as the simulation progresses. Can anyone tell me if this is possible in blender and point me to where to find info about it.
thanks in advance
Posted: Wed Mar 24, 2010 4:19 am
Joined: 12 Oct 2008
Posts: 5
I am also doing frame by frame simulation and calculation. I have my calculations to be done for each frame in a C program. I use the python script in blender to interact by C program after each frame is rendered. You can do the similar thing I guess.
Posted: Thu Mar 25, 2010 5:57 pm
Joined: 22 Mar 2010
Posts: 2
Rgupta, thanks for the reply. That sounds similar to what I'm doing.
First simulate in Blender and then try to use my own code on the data
generated by the simulation.
I am new to blender and I'm just figuring things out as I go. Can you point me to documentation on the python script you are using.
thanks!
Posted: Wed Mar 31, 2010 11:39 am
Joined: 31 Mar 2010
Posts: 1
[quote=
I am new to blender and I'm just figuring things out as I go. Can you point me to documentation on the python script you are using.
thanks![/quote]
If you have a Ipo Curve for every object you want 3D coordinates for:
list_obj= list of objects in the Blender Scene
fr=frame. For example, you're interested in frames between 1 and 100
for fr in range (1,101):
for i in range(len(list_obj)):
ipo = list_obj[i].getIpo() # retrieves an Ipo object
if ipo != None:
icuX = ipo[Ipo.OB_LOCX]
icuY = ipo[Ipo.OB_LOCY]
icuZ = ipo[Ipo.OB_LOCZ]
valx = icux[fr]
valy = icuy[fr]
valz = icuz[fr]
Hope it can be useful
Myrtil