Grasshopper

algorithmic modeling for Rhino

<UPDATE> The component has been updated for Grasshopper 0.8. also new option to allow you to not inport the rgbPP attribute.

I have created a new definition for grasshopper that will import particle animations from Maya into grasshopper. The importer works in realtime, so if you have maya and grasshopper opened at the same time any changes to the particles in maya will be reflected in Grasshopper. Right now I only import two attributes, position as point and velocity as a vector. The script is open and easy to add any property you want to carry over. The idea behind the function is to use Maya ability to create “smarter” point cloud using forces and AI. the definition is in the download section at

www.cerver.org


how to use

1. In Maya create a particle system and add a new expression using the dynExport option.

dynExport -atr position -atr velocity -atr rgbPP -f pda NameOfParticle

or

dynExport -atr position -atr velocity -f pda NameOfParticle

Look at the Maya docs if you are not familiar with the command or expressions

2. Maya will write out the particles in real-time usually to a folder named “particles” in you Maya project directory. The file names will be the same name as the particle system name. input the name of the path and the name of the file into Ploc and Pname. For example.

Ploc = C:\Users\robert\Documents\maya\projects\particleTest\particles\test\

Pname= nParticleShape1

3. FRAME will control the frame number of the particle animation in maya

4. SCALE will scale the particle system 5. SWAPY will flip the Y and Z axis

5. UseRGB - if True will try to import the rgbPP attribute.

Views: 4768

Comment

You need to be a member of Grasshopper to add comments!

Comment by Avishek Das on June 17, 2011 at 10:29pm

oh,thanks

Comment by robert cervellione on June 17, 2011 at 5:51pm
Avishek, it is just a Proximity 3D component that generates the connections
Comment by Avishek Das on June 16, 2011 at 10:08pm
how is this struts are evolvong between the points?
Comment by robert cervellione on June 16, 2011 at 1:46pm
I am glad you figured out rgbpp. Since this is a grasshopper forum I did not get deep into it but per particle attractive are very powerfully. I use rgbpp because in essence it is just 3 numbers r g b. So you can assign many things to it. Say life to r . Age to g. And a hit test b ( 0 for no 1 for yes) and so on. Then in grasshopper you can break the color into its 3 parts and use it for stuff. But you can assign almost anything to a pp attribute
Comment by Avishek Das on June 16, 2011 at 1:24pm

actually add both...add per particle and add per object

 


Comment by Avishek Das on June 16, 2011 at 1:04pm

Robert, I have figured out a way..

We can use still use legacy particle system with rgbPP atr

1.make a particle grid 

2.set render apperance as sphere

3.now go to ''add dynamic attributes'' and select ''color''

4.now select all the particles and select'' add per particle'' from the dialogue box just appeared

 

now u can use ''dynExport -atr position -atr velocity -atr rgbPP -f pda NameOfParticle'' command without any error and robert's code does accept it without any error..

 

if u have any problem mail me @ colors1990@gmail.com

Comment by robert cervellione on June 16, 2011 at 12:07pm
also would everyone please use the new group "cerver tools" for help
Comment by robert cervellione on June 16, 2011 at 12:07pm

Alex,

 

the update is on my site www.cerver.org. and if you using legacy particles then omit the rgbpp part of the expression

Comment by robert cervellione on June 16, 2011 at 12:05pm

take a  look above at the how to use,  you can omit rgbPP and it will work fine. 

 

dynExport -atr position -atr velocity -atr rgbPP -f pda NameOfParticle

or

dynExport -atr position -atr velocity -f pda NameOfParticle

 

Comment by Avishek Das on June 16, 2011 at 10:57am
is there any way to bypass th rgbPP part and continue using legacy particles

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service