An open space where people who use Blender in an academic environment can share progress and the typical problems and needs of academic environments.

Moderators: jesterKing, stiv

alfer
Posts: 2
Joined: Mon Mar 22, 2010 7:35 pm

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.

ragupta
Posts: 5
Joined: Sun Oct 12, 2008 7:23 pm
Location: Raleigh, NC

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.

alfer
Posts: 2
Joined: Mon Mar 22, 2010 7:35 pm
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!

myrtil
Posts: 1
Joined: Wed Mar 31, 2010 11:51 am
Location: Pisa

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

### Who is online

Users browsing this forum: No registered users and 1 guest