SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Modeling / Modeling / help required-urgently
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 25-01-2011, 03:02 PM   #1
ymharshe
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
ymharshe is offline   Reply With Quote
Old 25-01-2011, 04:32 PM   #2
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,373
Thanks: 74
Thanked 710 Times in 642 Posts
Default

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.
stwert is offline   Reply With Quote
Old 25-01-2011, 06:36 PM   #3
ymharshe
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
ymharshe is offline   Reply With Quote
Old 25-01-2011, 06:42 PM   #4
stwert
EduSciVis-er
 
Join Date: Dec 2005
Location: Toronto
Posts: 3,373
Thanks: 74
Thanked 710 Times in 642 Posts
Default

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.
stwert is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.