HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A weird emitter property?

06-08-2003, 06:13 AM#1
Ari
I've encountered an emitter with a strange property - it seems to run in reverse - particles are created at its periphery, and are sucked towards the origin of the emitter. I've taken this from the undead building cancel model, UCancelDeath.mdx. The emitter code is as follows:

ParticleEmitter2 "BlizParticle03suckin" {
ObjectId 58,
SortPrimsFarZ,
Unshaded,
static Speed 200,
static Variation 0.02,
static Latitude 180,
static Gravity 0,
Visibility 3 {
DontInterp,
3333: 0,
4300: 1,
5167: 0,
}
LifeSpan 0.37,
static EmissionRate 64.8,
static Width 0,
static Length 0,
Additive,
Rows 1,
Columns 1,
Tail,
TailLength 1.35,
Time 0.5,
SegmentColor {
Color { 0.0901961, 1, 0.34902 },
Color { 0.105882, 0.984314, 0.705882 },
Color { 1, 1, 1 },
},
Alpha {255, 255, 0},
ParticleScaling {20, 20, 1},
LifeSpanUVAnim {0, 0, 1},
DecayUVAnim {0, 0, 1},
TailUVAnim {0, 0, 1},
TailDecayUVAnim {0, 0, 1},
TextureID 3,
}

The texture refers to Textures\pixies1.blp, which consists of several stars on a black background. I can't seem to duplicate this effect with other textures, although since I don't understand what's going on in the first place, take that with a grain of salt.

If this "reverse emitter" effect makes sense to anyobdy, could they please explain what's going on here?
06-09-2003, 10:17 AM#2
Guest
I dont get your point..its just a regular particle with a certain values that makes a 'inverse" effect of particle emitter...and besides..cant recalll undead cancel has a inversed particle effect...only one that Im 100% sure is inversed is the old earthbind mdx from the wc3 beta.

the settings you should keep in mind are:

SortPrimsFarZ,
static Speed 200,
static Variation 0.02,
static Latitude 180,
static Gravity 0,


changing these settings will change how the particle will look eventaully =)

ps: im currently not able to test this out...ill test this on wednesday...then Ill be able to tell you more about this kind...but imo its nothing special...
06-09-2003, 10:57 PM#3
Ari
Cookie, I understand that it's a "regular particle with a certain values that makes a 'inverse" effect of particle emitter." Hence my post. I'm trying to find out *which* values are important in making an emitter have this inverted property. Of the ones you listed:

SortPrimsFarZ, - I'll be the first to say that I don't know what this does, but adding it to other emitters and removing it from this one don't seem to toggle normal/reverse emitters.

static Speed 200, - even assuming that negative speeds create an inverse effect (which I don't, in fact, suspect is the case), in *this* emitter, it is a positive value. Unless speed is governed by a really weird, non-linear function, high values of speed simply make particles move away from the center faster.

static Variation 0.02, - though I could be wrong, I was under the impression that variation was simply a random +/- amount that was added to speed.

static Latitude 180, - I can say with very high certainty that latitude governs the width of the "cone" from which particles emerge; very low values create a "line" of particles, 90 creates a "hemisphere" of particles, and 180 creates a "globe" of particles.

static Gravity 0, - I don't understand how gravity could create a reverse emitter - especially the absence of gravity.

Perhaps I'm missing the obvious (ok, quite likely I'm missing the obvious :) ) but I don't see how any of the parameters you mentioned could be the ones responsible for this effect.

I agree with you that it's nothing special, in the sense that there's no "inverse" parameter or a "negative bone" or somethng magical like that - clearly this is some unusual combination of perfectly normal values that is creating this effect. I'm just trying to isolate how the effect itself is created.
06-09-2003, 11:58 PM#4
Guest
problem is that the rest is not quite related to what it makes it going inverse =P

anyway it seems its related to the
static Latitude X,

value.

To make it a inversed effect this value must be set higher then 200, as at 100 it goes in a up-side-down bowl shape

if the latitude is a low value it goes verticle, aka from bottom to up. Because of the fact that :

static Width 0,
static Length 0,

both were zero values, it would generate the effect of one verticle concentrated particle....so this means to ahve the particle being "spread out" so it looks like fire you must have some values inserted n those other then 0...


anyway, the way to make a inversed particle effect is:

Change =>[ static Latitude 200,]
Change =>[ static Width 0,
static Length 0,]

ps: it works with any textures...try switching the textureid to the one of the ghost2.blp...then it shows you more detailed view of it
06-10-2003, 12:39 AM#5
Guest
Here is a examinationmdl file, which you can try it out and see for yourself...its a basic mdl file with the Inversed particle (glow from ucancel) and a fire particle (from the steamtank/warwagon).

try changing its altitude of the warwagons particle to 200, with height and width to 0 and see what happens...

feel free to do the same with the ucancel death mdl
06-10-2003, 04:07 AM#6
Ari
doh, I clicked on this just before going to bed :)
I'll check that out tomorrow afternoon. Thanks for the help!
06-23-2003, 06:42 AM#7
Ari
First chance I've gotten to look at that file.

I'm going to have to disagree with you about what drives this emitter. In my experiments, my goal has been to convert a "normal" emitter into a "reverse" emitter, and try to figure out what the crucial element is.

Making latitude 200 is not the key. I'm not 100% sure what latitudes over 180 do, but I'm very sure that that is not sufficient to convert a normal emitter into this "reverse" emitter, nor does changing this back to a lower number affect the "reverse" properties of your example. The length/width is definitely not the key. Making those both zero merely confines all particles to being emmited from a single point, as opposed to a larger area.

Here's what I think is going on:
When in "tail" mode (as opposed to "head") particles are emitted from their edge, instead of from their center. This means that there is a ver short amount of time between when a particle is created, and when the non-transparent parts of the texture reach the origin. In 2D, imagine that this is a texture:

| . . . . . x . . . . . . | <--- right edge

if the particle's right edge starts at the origin, and moves to the right, then the "x" will appear to move towards the origin briefly rather than away from it. I think that is what is going on in your example. If you increase the particle lifetime or speed, then you can see the particles pass through the origin and be emitted normally.

ok, so what if I want to create this effect from a greater distance then? Well, I've done some experiments. Turning off "additive" makes it much easier to see what's going on, if you decide to fool around with this stuff, since you can see the entire texture, including otherwise transparent parts.

First off, in "tail" mode, the width of a particle depends on its speed. Making particles faster also makes them *wider.* "TailLength" seems to modify this effect. Very low speeds (like 1) make for extremely thin particles unless taillength is raised. I'm not sure about the relationship between the two though. My first hunch is that particle width = speed * TailLength, but I'm not at all sure about that.

Second, ParticleScaling seems to affect the actual length somehow, but not in any obvious way. Upping the first two values seems to increase size, while upping the third seems to have no effect at all.

Third, in "tail" mode, the left side of a particle's texture points in the direction of motion. So the more black space between your desired visible part and the left side, the better.

I'm currently trying out a texture that consists of a circle at the far right edge, and trying to make it "suck" in from varying distances. Since you're limited to the size of the particle in how far it can travel towards the origin, the solution seems to be to scale up the particle as large as you can, and compensate by making your desired image extremely small in the initial texture.

If you could confirm any of what I'm saying, or provide any info about "head" "tail" "both" "taillength" "particlescaling" or "time" (which may also play a role) I'd be extremely grateful.


ps - more by trial and error than anything else, I've gotten a larger scale version of this working:

[IMG]http:\\wct.wc3campaigns.com\reverse.jpg[/IMG]