View Full Version : Using the nParticle color data on a mesh

12 December 2010, 08:26 AM
I'm using nParticles to simulate lava oozing up through a crack. It's looking pretty good, and I've got the mesh working too. How do I use the color/incandescence ramps from the nParticle shape node in my surfacing? I'd like to get the mesh to "cool." I'm a noob, I can't seem to find this anywhere. Thanks --

12 December 2010, 11:34 AM
You can use the particleSampler to query pretty much any value in a particle system. The sampler has some custom attributes (userVector/userScalar) which you can connect a ramp (biased by age normalized,etc) and then connect the output of these to your shader.

12 December 2010, 05:33 PM
I think something got disconnected somehow. When I converted to a mesh, for some reason the particles vanished from the stage, and were replaced by a group icon in the outliner. It still seemed to work, but I thought it was weird. Now when I test render it's throwing errors, like "Error: TypeError: object of type 'NoneType' has no len()" and "polySurfaceShape2: empty UV set map1 detected, ignored" neither of which is encouraging. There doesn't seem to be any input to the particleSampler, I'm wondering how it knows where to get it's data?

12 December 2010, 12:54 AM
If i remember rightly, when converting nParticles to mesh, Maya turns off the visibility of your particles (actually "intermediate object" is turned on which hides the particles). If you want to see them again, turn this option off on the particleShape.

To get the color across to your mesh you have to use colorsets and assign the new color set to it. Check out Maya help docs, I think they have a lava example that explains this well.

here this explains everything you need to know...

CGTalk Moderation
12 December 2010, 12:54 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.