Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 25-01-2011 , 04:02 PM
Registered User
Join Date: Jan 2011
Posts: 2

help required-urgently

Hello Folks,

I am complete newbie to Maya. The question I will putforward might sound very easy for you. But I request you to help me immediately.

I have an output file from a fortran program, which contains coordinates (x,y,z) of particles that I am simulating through the code for settling as a function of time (t).

The output file looks like the following.
t1,x1,y1,z1,x2,y2,z2,x3,....
t2,x1,y1,z1,x2,y2,z2,x3,....
t3,x1,y1,z1,x2,y2,z2,x3,....
t4,x1,y1,z1,x2,y2,z2,x3,....
.......................................
PLEASE SEE THE ATTACHED TXT FILE
I would like to create a movie of motion of these particles using Maya. They are all spherical particles with a uniform size.
Is it at all possible? If yes, how?
Please reply quickly. I have Maya 11. Thanks in advance for your help.
ymharshe

# 2 25-01-2011 , 05:32 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I would create a Python script that reads in the file and parses it, then iterates through the required number of particles, with a series of setAttr functions for translate channels. You can look in the documentation for the exact syntax of setAttr. I hope that helps. A more informative thread title will probably get more help faster FYI.

# 3 25-01-2011 , 07:36 PM
Registered User
Join Date: Jan 2011
Posts: 2
thanks for the reply. But what you have wrote is completely "chinese" for me. What do I do with python? I have no experience in python. moreover, i thought it would as easy as reading the data file through some Maya function and defining the variables. The required number of particles is already decided. I want generate a movie for all particles in the text file e.g. 100 in the attached file. in each row there are 301 columns (1 time + 3(x,y,z)* Nparticles). Each row corresponds to a new time coordinates of 100 particles. I hope I am clear. thanks once again. please see if you could help me further.

# 4 25-01-2011 , 07:42 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Well since you've got output from a fortran program, I assumed you were familiar with the process of making a script/program. Python is a pretty high-level language, by which I mean it is relatively simple to read/understand and write.
To my knowledge, Maya doesn't have any built in "functions" to read particle location data. It is not that type of software. Declaring variables as you say, doesn't happen in Maya either, except if you create a script. Creating 100 particles and setting the location of one particle at one time is pretty simple. I don't have maya here right now, but I can see about that when I get home. However, reading in your data file might be more difficult. I don't know the best way to approach that.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads