Game Development Community

is there a T3D particle system overview ? plus, a specific question.

by Orion Elenzil · in Torque 3D Professional · 10/05/2009 (1:00 pm) · 3 replies

Howdy Folks -

i've only worked with torque particles minimally, but i think i have the gist.
nonetheless, it would be nice to see an overview of the various settings -
angle min, angle max, spread, softness distance/ambient factor, etc.

then i have a couple Q's:

* in the T3D 1.0 demo, when you fire a rocket, there's a bit of smoke attached to the muzzle for a bit, which sticks there as you move around. looking at the script files i can't quite see where that's coming from. it looks like mSourceObjectSlot is intended for that, but i don't see the hookup.

perhaps it's part of this stateEmitterNode business ? is there an overview of the image state system anywherer ?

* or i can cut to the chase - is there a stock method for attaching a particle emitter to a player node, or would that require a bit of custom code ? something like emitter::onPreRender() { update position }.

tia,
orion

#1
10/05/2009 (2:03 pm)
There used to be a pretty good explanation/tutorial of the differing particle fields on TDN -- haven't seen it in a while though.

These are some of my own observations, possibly incorrect, but works well for my mind.
  • I think of thetaMin/thetaMax (Sread angleMin/angleMax in the Editor) as the verticle spread from the emitter point with 0 being straight up, 90 to the right, 180 as down, and 270 to the left.
  • phiReferenceVel and phiVariance (phiVariance = Depth in the Editor)I see as the horizontal spread around the emitter point, phiReferenceVel being the initial start direction (0 as forward), and phiVariance giving an allowable range of spread.
  • softnessDistance is the range in which the "soft" particles begins to fade out. I think that by default all particles are "soft" now (as in no hard billboard edges when moving into/over shapes) -- but only in Advanced Lighting.
  • ambientFactor appears to be a color tint you can give to the "soft" particles -- haven't played with this one much since I'm colorblind.

  • I don't really care for the headings in the Particle Editor being different from the actual named fields for Emitters and Particles, I also have a few gripes/complaints with the Particle Editor (many of which haven't been fixed), you can read about if interested.

    Each state in the ShapeImage can have a particle emitter set for it -- and yes it is part of the "stateEmitterNode" business ;) I've only ever used it for muzzle smoke, bubbles, flashes, etc since it defaults to the muzzle but maybe it could be used for other things too if you have a named node in a weapon (would be interesting to find out).

    So far as an overview of the image state system goes I pretty much refer to the source (shapeImage.cpp) and slap arrays together until I get something I like ;D

    And I do believe that trying to attach an emitter to a named node on a player will require a small source code mod. I haven't really tried so I'm not sure, but have been getting by with attaching a node through script and then just giving it an offset from shape center.
    #2
    10/05/2009 (2:06 pm)
    Oh yeah, things like the particle alignment, blendstyles, how animated particles are handled, soft particles, are about the only differences from TGE particles. Particle alignment and soft particles are new specifically to Torque3D, everything else carried over from TGEa...

    By the way, how did you end up with no products to your name?
    #3
    10/05/2009 (2:45 pm)
    hey Michael - thanks for the replies; much appreciated.

    i think you could use "ejectPoint", "muzzlePoint", and "retractionPoint", as well, if you wanted. as well as any nodes you added yrself.

    hm, yeah, strange how my little products list is empty. i still have access to all the stuff i ought in the "my products" section tho.