Community
Maya Dynamics
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya dynamics topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

isolate RGB PP red channel and drived by force attributes from n particles

3 REPLIES 3
Reply
Message 1 of 4
mx51
324 Views, 3 Replies

isolate RGB PP red channel and drived by force attributes from n particles

Hi everyone

 

This is my first time here and It's my first time dealing with vector.

 

I would like some help please. Here what I trying to do.

 

In n particles I want to connect force attributes to RGB PP to display the force inside the particle.

It can be done in node editor and works but I need some extra.

 

I would like to assigned the force to the R channel only of RGB PP but I can't get the correct expression

for example I tried -> nParticleGenTurbShape.rgbPP = {nParticleGenTurbShape.force, 0, 0}
but I get // Error: Line 0.67: Cannot cast data of type vector[] to vector.

 

Someone can help me with that. i will have another problem but this is my main issue currently.

 

Thanks in advance

Labels (4)
3 REPLIES 3
Message 2 of 4
hamsterHamster
in reply to: mx51

Curly brackets {} are for the arrays, while your PP attribute is a vector.. use <<R,G,B>> instead. And then, the .force seems to be an array of several vectors, while the R component you want will be most likely a single float type number.

hamsterHamster_0-1618185013240.png


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Message 3 of 4
mx51
in reply to: hamsterHamster

Thanks for the reply. Yeah that's make sense. Do you have an idea to write this expression  ?

Message 4 of 4
hamsterHamster
in reply to: mx51

No, I have no particular idea, because it is unclear what force did you mean; there are many, depending of the dynamics setup, and you want to put them under one float, like compressing Mona Lisa painting to a line. 😄 If I were you, I'd start by learning/printing out what is within that .force array, then decide just one thing which will drive the R channel.


,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti

If the post was helpful, click the
 ACCEPT SOLUTION  button, so others might find it much more easily.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report