Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Dynamics / have 2 nparticles to 1 polygon mesh?
  RSS 2.0 ATOM  

have 2 nparticles to 1 polygon mesh?
Rate this thread
 
38560
 
Permlink of this thread  
avatar
  • Total Posts: 2
  • Joined: 16 November 2006 12:42 AM

Hi,

I have a problem where I want two nParticles to in one polymesh. The only thing I can figure out now is that one nParticle can be converted to poly through ‘convert->nParticles to Polygons’. I was hoping selecting both nParticles and doing the convert can make one polymesh.

Another solution is to have both emitters be connect to one Nparticle but I don’t want to take that route as I want one emitter to have one particle radius size different from the other.

If you look at the hypergraph, the nParticle.outmesh is connected to the Polygon.inmesh. You think there’s a way to have 2 nParticles outmeshs be combined to the Polygon.inmesh? Thanks.



Replies: 0
avatar

While it may be possible to merge two nparticles into one mesh...but I can’t help you with that.

But I can make a suggestion to solve the issue that you said is keeping you from just using one particleShape in the first place.

When a particle is emitted it has an attribute called emitterId. This can be used as an easy way to use a single particleShape but give it different attributes based on which emitter it came from.

To see the emitterId of your particle just change the ‘Particle Render Type’ to ‘Numeric’ under the Shading Tab of the particleShape. Then just type ‘emitterId’ into the Attribute Name box that becomes active.
If you have two emitters in your scene there should be a bunch of 1s and 2s.

Now to create an expression to drive the radius of the particles based on this.
Since you mentioned these are nparticles you are working with you first need to break the connection to the ramp that drives the particle radiusPP by default...found under the ‘Per Particle (Array) Attributes’ tab on the nparticleShape.
Once that connection is broken, right click the radiusPP box and select ‘Creation Expression’
A simple if/else expression could get you started...give this a try, replacing ‘nParticleShape1’ with whatever the name of you particle is...and of course change the numbers as you like.
Just click ‘Create’ when you are done and ‘Edit’ every time you make a change to the expression.

if (nParticleShape1.emitterId == 1)
{
nParticleShape1.radiusPP = 1;
}
else
{
nParticleShape1.radiusPP = .5;
}

If you had the radiusPP change over time with that great default ramp that was connected by default, you can create the same effect with a simple Runtime before dynamics expression.
Just click that button in the expression editor and try something like this.

nParticleShape1.radiusPP *= .98;

Hopefully this helps more than it hurts.
I’ll attach a simple scene just in case that helps.
Feel free to post if you need any clarification.
All the best.
~Ben



Attachment Attachment
Replies: 1
/img/forum/dark/default_avatar.png

Hi,

This is excellent help. I’ve being doing tests and wondering bout the possibilities of nParticles and this can solve my current problem. I just realized my posted message looks incomplete but hitting ‘edit’ showed a complete transcript of my post. Sorry if it was confusing but you pretty much understood my problem.

Even if I’ve gone through tutorials of dynamic expressions, I still have a hard time figuring out or self-coding my own line of codes to solve my current situations. :(

Thanks.

Author: bossanova

Replied: 10 January 2010 05:17 PM