Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Modeling (https://simplymaya.com/forum/forumdisplay.php?f=9)
-   -   help required-urgently (https://simplymaya.com/forum/showthread.php?t=35011)

ymharshe 25-01-2011 04:02 PM

help required-urgently
 
1 Attachment(s)
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

stwert 25-01-2011 05:32 PM

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.

ymharshe 25-01-2011 07:36 PM

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.

stwert 25-01-2011 07:42 PM

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.


All times are GMT. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018