gshady Posted June 4, 2003 Share Posted June 4, 2003 Hello, can I import Maya partilces scene in Houdini? Thanks Giuseppe Quote Link to comment Share on other sites More sharing options...
Marc Posted June 4, 2003 Share Posted June 4, 2003 Hi Giuseppe I guess you could write them out as sequential geometry files and read those into Houdini. Will that work for you? Quote Link to comment Share on other sites More sharing options...
Jason Posted June 4, 2003 Share Posted June 4, 2003 Actually I think you need to write some MEL and spit out the particle positions to a text file and then either parse that into a temp Geo format or read them in with a File CHOP and Channel SOP em some points into position et al. This is because Maya does not treat particles as just "special points" the same way that Houdini does. However - be enouraged because I've seen Maya people write such scripts in 20 minutes and have them pretty reliable. But, no, no easy easy way. Quote Link to comment Share on other sites More sharing options...
Marc Posted June 4, 2003 Share Posted June 4, 2003 Yeah,...... er.... that's what I was trying to say. um... Thanks J for clarifying my...um.... point. yeah. um. Marc Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted June 4, 2003 Share Posted June 4, 2003 Actually I think you need to write some MEL and spit out the particle positions to a text file and then either parse that into a temp Geo format or read them in with a File CHOP and Channel SOP em some points into position et al. MEL !?! BAH! Looks like a job for a "Pathologically Eclectic Rubbish Lister". First, to get the PDA files. From inside of maya export out the particles using "dynExport" MAKE SURE YOU EXPORT OUT THE POSITION DATA so something like: dynExport -atr position -atr velocity -atr mass -f pda -mnf 1 -mxf 10 particle1 To run the perl script use something like: cat myparticles.PDA | perl M2Hpart.pl > myparticles.geo or on windows more myparticles.PDA | perl M2Hpart.pl > myparticles.geo The script will convert whatever Maya particle attributes you have into Houdini point attributes. There isn't any error checking because all 3D software outputs perfect data. I did try it with a few different pda files I managed to dig up and it worked on Windows and Linux. I had to send half a dozen emails to one of my less fortunate Maya using friends in order to get few test PDA files. "Dahhh...I animator....what is a paartickle?" I tested it out pretty good, and it works for me, which means it won't work at all for you...just because. #!/usr/bin/perl -wuse strict;# Attribute Namesmy @attributes;# Types of the Attributesmy @types;# Point Datamy @data;# Number of Particlesmy $num = 0;# Index of Position Attributemy $positionIndex = 0;# Lame countermy $var = 0;# Index where Position starts in data linemy $posStart = 0;while (<>) {############## Read Header############# # Get Attributes on second line if ($. == 2) { Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted June 4, 2003 Share Posted June 4, 2003 I've seen Maya people write such scripts in 20 minutes Damn....it takes me an hour just to remember the syntax for whatever language I'm using. jim. Quote Link to comment Share on other sites More sharing options...
Marc Posted June 4, 2003 Share Posted June 4, 2003 Damn....it takes me an hour just to remember the syntax for whatever language I'm using. That's why you learn one really well, and stay with it. I'm a QBasic man and I'm sticking with it, come hell or high water.... aahhh, the sheer beauty of 'run', 'list' and 'goto line #'. I dabbled in PASCAL for a bit, but I didn't like the taint it put on my BASIC knowledge... Cheers Marc P.S. Sorry for hijacking the thread Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted June 4, 2003 Share Posted June 4, 2003 I'm a QBasic man and I'm sticking with it, come hell or high water.... aahhh, the sheer beauty of 'run', 'list' and 'goto line #'. HOLY COW!! I never knew how great QBasic was. For example this amazing program is a hamburger stand simulator! Hamburger Stand And to think people pay for games like the Sims when there are free ones like this. OK, back to work. jim. Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted June 4, 2003 Share Posted June 4, 2003 For some odd reason QBasic kinda reminds me of Logo. TURTLE MOVE! I command you! jim. Quote Link to comment Share on other sites More sharing options...
Marc Posted June 4, 2003 Share Posted June 4, 2003 yip.... old school! . Quote Link to comment Share on other sites More sharing options...
gshady Posted June 5, 2003 Author Share Posted June 5, 2003 Hi, thanks a lot for the good help. Many thanks and sorry for the spamming, I write for the firts time in this forum. Bye Giuseppe Quote Link to comment Share on other sites More sharing options...
Marc Posted June 5, 2003 Share Posted June 5, 2003 Don't worry, we're pretty relaxed over here. Hope the solution works for you... Cheers Marc Quote Link to comment Share on other sites More sharing options...
Jason Posted June 5, 2003 Share Posted June 5, 2003 For some odd reason QBasic kinda reminds me of Logo.TURTLE MOVE! I command you! jim. As Alan Kapler (from DD) says, "Logo is the way of the future. Soon all programs will be written this way." I'm still laughing. Quote Link to comment Share on other sites More sharing options...
gshady Posted June 9, 2003 Author Share Posted June 9, 2003 Hi, the perl script works fine, but I have some question. -- In Maya I use a script to control position, velocity,radiusPP, the exporting works with position,velocity and not with radiusPP, right? I render the particles in Renderman as riSphere. Can I do the same thing in Houdini? Maybe is better to rewrite my expressions directly in Houdini, right? I'm a newbie with Houdini, so can anyone explain me how I can rewrite my expressions particles in Houdini. -- When I import to Gplay the geo file done by perl script I cannot see any particles, why? My mistake? In the geo file I can see the correct info, partilces coord, velocity etc... I work with Houdini 6. -- The perl scritp does or better dynExport does many files, one for each frames, so I have to import a single frame-XXX.geo file then render it, then import next frame file and render it and again and again .... , right? Can I automate all? Sorry for the stupid question. Bye and thx again Giuseppe Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted June 9, 2003 Share Posted June 9, 2003 -- In Maya I use a script to control position, velocity,radiusPP,the exporting works with position,velocity and not with radiusPP, right? Any Per particle attribute should work. If the attribute gets dumbed to the PDA file then it will work. Best way to find out is use dynExport and open the pda file in a text editor. I render the particles in Renderman as riSphere. Can I do the same thing in Houdini?Maybe is better to rewrite my expressions directly in Houdini, right? Use the Copy SOP. Connect a sphere to "Input 1". Connect a File SOP with the particles to "Input 2". Use Copy Stamping in the Copy SOP to set each sphere to a different size based on the radiusPP attribute. When I import to Gplay the geo file done by perl script I cannot see any particles, why? My mistake? In the geo file I can see the correct info, partilces coord, velocity etc... I work with Houdini 6. The particles are only point position. In order to see geometry you need to instance/copy/etc some onto it. Or you could turn on point display. The perl scritp does or better dynExport does many files, one for each frames, so I have to import a single frame-XXX.geo file then render it, then import next frame file and render it and again and again .... , right? Can I automate all? Sorry for the stupid question.Bye and thx again The Perl script is more or less a filter. The best way to do a bunch of frames is to write a little shell script. For example, in Windows, go to the directory with the particles and type for %i in (*.pda) do more %i | perl M2Hpart.pl > %~ni.geo That loops through every .pda file in the directory, prints the contents of each file to stdout via "more". From there the perl scripts filters the output and then stores it as a file with the same name as before but with .geo as the file extentsion. Then with the File SOP use myFilename.$F.geo That should keep you busy for a while. jim. Quote Link to comment Share on other sites More sharing options...
gshady Posted June 10, 2003 Author Share Posted June 10, 2003 Hi, [best way to find out is use dynExport and open the pda file in a text editor.] Done, sure [use the Copy SOP. Connect a sphere to "Input 1". Connect a File SOP with the particles to "Input 2". Use Copy Stamping in the Copy SOP to set each sphere to a different size based on the radiusPP attribute. ] Can I do the same with metaballs? I mean control the metaballs radius too. [That should keep you busy for a while. ] Oh sure and thanks again for the right help! Bye Giuseppe PS_ I'll come back! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.