Yes, bring in the point data to maya as a particle cache..way more efficient.
There is a python script on highend3d to get you started. http://www.highend3d.com/downloads/tools/3d_converters/pdc-to-bin-5168.html (Read Maya pdc files and write out RealFlow bin (particle bin format) files) Also check the maya docs. Yes I remember the plug that you wrote, really cool. Cheers, -d On Thu, Jul 2, 2009 at 12:22 PM, Justin Rosen <[email protected]> wrote: > The data is already outside of Maya, I'm trying to bring it into Maya. > When you say "cache out to disk" I assume you mean in maya's pdc format? > That's not a bad idea, hadn't thought of doing it that way. Anything else > would have to be either imported and a particle system created/modified. > Or, a plugin, like the one I wrote for Molecules to the Max!, remember all > those molecular dynamics? ps the movies finished, they're working on the 3d > portion of it. > > So far, this is my best attempt at keeping it simple > > pShape = particle() > mel.eval('addAttr -ln "rgbPP" -dt vectorArray %s' % pShape[1].name()) > mel.eval('addAttr -ln "rgbPP0" -dt vectorArray %s' % pShape[1].name()) > > # pos and color for each particle, lists are the same size > points = [ ... ] > colors = [ ... ] > > emit(object=pShape[0].name(), pos=points) > > for index, color in enumerate(colors): > particle(pShape[1].name(), edit=True, attribute='rgbPP', order=index, > vectorValue=color) > > Again, this is extremely slow... > > > > > On Thu, Jul 2, 2009 at 8:22 AM, Dave Nunez <[email protected]> wrote: > >> Doing good man, still in Toronto. Is the point data being generated >> outside of Maya ? Since you are dealing with so much data why don't you >> just write a parser to cache the stuff out to disk. (I think there is >> already is something that handles particle caches written in python out >> there) I will be faster to do it outside of maya. >> >> hth, -d >> >> >> On Wed, Jul 1, 2009 at 12:15 PM, Justin Rosen <[email protected]>wrote: >> >>> Heyo! >>> >>> Yeah, still in Vancouver. Been here a year now. You? >>> >>> I don't think the particle command can set the color of every particle at >>> once given a different color for each particle. I was hoping not to >>> iterate over the entire system setting each particle individually, I'm >>> handling 4+million particles. >>> >>> -- iPhoneJustin Rosen >>> >>> On Jul 1, 2009, at 8:26 AM, Dave Nunez <[email protected]> wrote: >>> >>> Hey dude, whats going on.. long time. >>> >>> >>> you can set the pt colours using the particle command. check the docs. >>> >>> ie >>> >>> particle -e -or 2 -at rgbPP -vv 1 0 0 particleShape1 ; >>> >>> add your attrs first of course. >>> >>> hth, -d >>> >>> Are you still in Vancouver btw ? >>> >>> >>> On Tue, Jun 30, 2009 at 9:20 PM, Justin Rosen < <[email protected]> >>> [email protected]> wrote: >>> >>>> Hey everyone, >>>> >>>> I'm having a bit of trouble trying to create and modify the rgbPP of a >>>> particle system. I've tried every way possible, but can't seem to get the >>>> result I'm looking for. >>>> >>>> I have a list of positions and colors that I'd like to create a particle >>>> object with. I'm having no trouble with the positions, it's the rgbPP that >>>> seems to be a pain. Is it possible to do this via the emit command? >>>> >>>> points = [(0,0,0), (1,1,1), (2,2,2)] >>>> colors = [(0,1,0), (0,0,1), (1,1,1)] >>>> pShape = particle() >>>> mel.eval('addAttr -ln "rgbPP" -dt vectorArray %s' % pShape[1].name()) >>>> mel.eval('addAttr -ln "rgbPP0" -dt vectorArray %s' % pShape[1].name()) >>>> emit(object=pShape[0].name(), pos=points, attribute=('rgbPP'), >>>> vectorValue=colors) >>>> >>>> Also, I finally fell back onto mel for adding the rgbPP, I couldn't seem >>>> to get the maya stuff working. >>>> >>>> I know that I could iterate over all of the particle and set their >>>> rgbPP, but I'm trying to do it in 1 shot. Do I need to use the API to >>>> accomplish this? >>>> >>>> Thanks, >>>> Justin >>>> >>>> >>>> >>> >>> >>> -- >>> When things get too complicated, it sometimes makes sense to stop and >>> wonder: Have I asked the right question? >>> -Enrico Bombieri >>> >>> >>> >>> >>> >> >> >> -- >> When things get too complicated, it sometimes makes sense to stop and >> wonder: Have I asked the right question? >> -Enrico Bombieri >> >> >> > > > > -- When things get too complicated, it sometimes makes sense to stop and wonder: Have I asked the right question? -Enrico Bombieri --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
