| 02-16-2003, 02:13 AM | #1 |
Edited 6/7/03 This isn't a tutorial per se, but more of a reference. If you're trying to actually learn how to MAKE an emitter for a unit, or move an already existing emitter from one unit to another, I'd refer you to Chobo's excellent tutorial: http://chobo.wc3campaigns.com/tut/basic.html I've been screwing around with the various parameters of the particle emitter, and I'd love to share what I've found with anyone who tries to do this, and at the same time, fill in the gaps in my knowledge. Here's a list of parameters that I've worked with, and their functions. Feel free to fill in the blanks (the original post was some time ago, but I *think* most of these example are taken from the dryad model): ObjectId 85 - this is the number of the emitter in the mdl file - when copying and pasting emitters to a new model, you must make sure that there are no gaps in the objectID sequence, or the model won't compile properly. Keep in mind that you usually need a pivot point for each new object. Emitters are after bones, so you probably won't mess anything drasticaly up if you simply ignore pivot points, but you may mess up the objects that are *below* the emitter in the mdl file. If this seems to be the case, try adding the emitter at the emd of the mdl file. This may help. Parent 76, - in many cases, this seems to indicate where the attachment point is for the emitter. It seems to be absent in other cases, though, (in which case I *think* it simply lies at the origin) and providing it doesn't always seem to work properly. SortPrimsFarZ - ????? Unshaded - turns off shading of the emitter. Shading tends to add a shadow "perspective" to a model. XYQuad - firearro mentions below that this may make the emitter flat to create a "shockwave" effect LineEmitter - this seems to confine particle emission to a plane, instead of a cone. static Speed - how fast the particles move static Variation 0 - firearro mentions below that this refers to variations in the speed of the particles. static Latitude - this seems to define a cone (2d or 3d depending on "LineEmitter") which the particles are emitted from. Low values give narrow cones or fans, while high values give circles or spheres. static Gravity - seems to indicate whether there is a "pull" on particles, or if they travel in straight lines after creation. Visibility nn { DontInterp, nnn: 0, nnnn: 1, } This indicates which animations this emitter will be visible during (1 = visible, 0 = not drawn during an animation nnn is animation index). LifeSpan 0.655 - indicates how long (in seconds) the particles "live." This indirectly, therefore, controls how far they travel. static EmissionRate 17 - seems to indicate the number of particles emitted (per second) static Width 40, - static Length 10, - These two parameters determine the area from which particles emerge. When both are low, the particles all appear to come from a single point. When they are higher, particles appear to come from a much larger square/rectangle. Now if one is high, and the other is low, perhaps you'd get a "line" of emitters - interesting.... Blend, - has to do with how the particle is drawn (similar to the filters). Many of the filter modes don't seem to work for emitters. Additive and blend seem to make for translucent particles, while omitting this line makes for opaque particles (useful for smoke or solid objects) Rows 1, Columns 1, these both refer to the texture being used. Some textures (like clouds 8x8.blp)come with multiple frames, or variations. This tells the computer how many rows and columns of separate images there are in a given blp. Think of an 8x8 parameter as an image having 64 frames that the emitter is being told to animate the emitter with. Head, - ???? Acceptable values here are "head" "tail" and "both" Head seems to create "normal" particles Tail seems to make tails (duh :) ) Both, needless to say, uses both "modes" Head is pretty straightforward, but "tail" seems a bit harder to get a grasp on. TailLength 1, - I *think* this has to do particles leaving trails behind them as they travel. This may or may not need the "tail"/"both" mode to work. Time 0.5, - this determines how quickily color cycling, scaling, and alpha go from the start to middle to end values. The number is a percentage of the life of the particle. SegmentColor { Color { 1, 1, 1 }, Color { 1, 1, 1 }, Color { 1, 1, 1 }, }, I don't know if this applies to the tail, the particle, both or neither. The three fields refer to the start, middle, and end colors of the particle (and tail?) Alpha {0, 198, 0}, - determines the alpha of the particles. This is start, middle, end. ParticleScaling {14.6, 21.1, 23.1}, - this is the start, middle and end values for a particles scaling. LifeSpanUVAnim {0, 32, 1}, DecayUVAnim {33, 62, 1}, TailUVAnim {0, 0, 1}, TailDecayUVAnim {0, 0, 1}, Think kdub has these figured out. These refer to textures that are broken into sections so as to use the "rows" and and/or "columns" parameters (like clouds 8 x8). The first two parameters indicate the start, and stop "frame" (in the example above, it the particle starts at frame 0 (upper left) and goes to 32 (middle right) during life, and finishes the animation as it dies) The final parameter refers to the number of times it cycles through the frames. The four lines refer to head start, stop, tail start, stop, respectively. TextureID 2, - this indicates which texture (defined at the top of the mdl file) is used for this emitter. Keep in mind that the first texture listed is "0" not "1." } Anyway, this is what I've gleaned in my hours of screwing around with the mdl to make an emitter. I hope this is of some use to somebody, but even more, I hope somebody can help me fill in some of the blanks I've left in. |
| 02-16-2003, 02:34 AM | #2 |
here is another guide: Code:
ParticleEmitter2 "Violet" {
ObjectId 72, // the object number in the mdl file
Parent 15, // parent. if the parent moves it follows.
SortPrimsFarZ, // i have no idea
Unshaded, // not shaded by midnight and stuff like that
static Speed 53.8, // how fast it goes when it's ejected, i dunno if it has to be static
static Variation 0, // speed variation
static Latitude 180, // particle spray spread methinks. not sure.
static Gravity 0, // self explanatory
Visibility 4 {
DontInterp, // see note 1 at bottom
1500: 1,
16333: 0,
78667: 1,
159767: 0,
}
LifeSpan 0.605, // how long in seconds particle lives
static EmissionRate 30.6, // how many particles per second i believe
static Width 0, // how wide the emitter is, not the particle
static Length 0, // see above but with length not width
Additive, // some sort of filtermode
Rows 1, // how many rows to divide the image into
Columns 1, // how many columns to divide image into
Both, // dunno
TailLength 0.8, // forgot
Time 0.5, //dunno this too
SegmentColor {
Color { 1, 0, 1 },
Color { 1, 0, 1 },
Color { 1, 0, 1 },
}, // see note 2 at bottom
Alpha {255, 255, 0}, // 255 is opaque and 0 is transparent though not sure how it works o_O
ParticleScaling {7.4, 8.4, 0.1}, // see note 3 at bottom
LifeSpanUVAnim {0, 0, 1}, // dunno
DecayUVAnim {0, 0, 1}, // dunno
TailUVAnim {0, 0, 1}, // dunno
TailDecayUVAnim {0, 0, 1}, // dunno
TextureID 4, // the number of the texture it uses. keep in mind it starts from 0.
}1. DontInterp is a setting that means hide the emitter when 0 is shown and show the emitter when 1 is shown. this is also used for the alpha bit in geosetanims and stuff. 2. i think color changes from top color to middle color to bottom color. KEEP IN MIND THAT COLORS ARE BLUE GREEN RED NOT RED GREEN BLUE 3. i think particle scaling isn't X Y Z, but start middle end. not sure though, but that is what i come up with after a lot of experimenting. btw: XYQuad - makes it flat i think, for a shockwave effect. well, that's what i think, XYQuad was in the shockwave particle emitters. As in radial shockwave, not spell shockwave. |
| 06-07-2003, 03:16 PM | #3 |
Ari, plz complete that thread and write down ur further experiences about MDL-Particle-Emitters, because thats a very interesting point in tha Wc3 Modelling Scene. So plz write down! That should be interesting for everybody who wants to model for Wc3. ;) And i want to update that thread so that it is on tha top again. Cookie tha MDL-Particle-Emitters-Master could add some things too. :) ~Buster |
| 06-09-2003, 10:23 AM | #4 |
Guest | well Ill write a mdl editing guide someday in the future...perhaps...if I had time =P |
| 06-09-2003, 04:10 PM | #5 | |
Quote:
My best guess is that it's the alpha for each channel, in BGR mode, and 0 is transparent, 255 is opaque, and the other values inbetween are different transparency levels. |
| 07-11-2003, 09:37 AM | #6 |
How to add particle emitter is not hard. step1 - copy the emitter you want and past it in the buttom of the mdl file(if you have a collision sphere then past it above the collision sphere) step2 - copy or make a new pivot point for it(pivot points is the coordinate for an object - it begins with the world pivot, also 0,0,0. the world pivot is also called origin). NOTE: in war3 its y,x,z not x,y,z. step3a - change the object id(if your last object in the model have object id 12, then the emitter shall have id 13). NOTE:If there is a collision sphere change the id to the collision sphere's ID and add 1 to the collision sphere's ID. step3b - change the DontInterp, Bezier and Hermite tot he correct frame of ur model. if you dont know what those is, read the first and second post.There is no hermite and bezier here, but just change the time of hermite and bezier to the same as DontInterp(you have to figure this our your self). step4 - add the texture for the particle(or u will get error), of course u need to change the material ID for the emitter to the texture you want. now check if you the correct amount of } at the end and { at beginning of the emitter. if you miss a { or a }, then the emitter wont work. Now check it again, then convert it to mdx. NOTE: remember to add NumParticleEmitters2 #, to the amount of emitters you have in your model. I am not super good with mdl editing, but this will work. |
| 07-14-2003, 04:04 AM | #7 |
Updated to reflect a few new additions. Kudos to kbub for finally figuring out how the *anim parameters work. |
| 07-17-2003, 04:02 PM | #8 |
if so requested i could write a small tutorial on how animation specific sounds and splats work. I've been doing alot of work with them recently and believe i have figured them out |
| 07-18-2003, 12:10 AM | #9 |
how would i atach a partical emiter on the arrow of an archer. and how would i make it last forever? |
| 07-18-2003, 06:56 AM | #10 |
This should probably be moved to a separate post, but I'll answer here. Find the arrow model, convert to mdl format, and add the emitter of your choice (obtained from a different model, or from scratch). The arrow has "stand" "birth" and "death" animations. You should adjust your "visibility" parameter to make the emitter only visible during the stand animation, probably, though this isn't neccessary. If you have more specific questions, let me know. |
| 08-02-2003, 12:55 PM | #11 |
I have made the pre2 Emitter in my engine. Ari is right! I update FireAarro‘s notation. -------------------------------------------------------------------------------- ParticleEmitter2 "Violet" { ObjectId 72, // the object number in the mdl file Parent 15, // parent. if the parent moves it follows. SortPrimsFarZ, // *Sort by position.z Unshaded, // not shaded by midnight and stuff like that static Speed 53.8, // how fast it goes when it's ejected, i dunno if it has to be static static Variation 0, // speed variation static Latitude 180, // particle spray spread methinks. not sure. * yes, it is like super sprite emitter! static Gravity 0, // self explanatory Visibility 4 { DontInterp, // see note 1 at bottom 1500: 1, 16333: 0, 78667: 1, 159767: 0, } LifeSpan 0.605, // how long in seconds particle lives static EmissionRate 30.6, // how many particles per second i believe static Width 0, // how wide the emitter is, not the particle static Length 0, // see above but with length not width Additive, // some sort of filtermode Rows 1, // how many rows to divide the image into Columns 1, // how many columns to divide image into Both, // * Acceptable values here are "head" "tail" and "both". Head seems to create "normal" particles. Tail seems to make tails . Both, needless to say, uses both "modes". * Tail is a rectangle particle not square partilce, for example rain. TailLength 0.8, // the tail length, , for example rain. Time 0.5, // *the mid time, the time first segment to secend segment. SegmentColor { Color { 1, 0, 1 }, // *start color Color { 1, 0, 1 }, // *mid color Color { 1, 0, 1 }, // *end color }, // see note 2 at bottom Alpha {255, 255, 0}, // 255 is opaque and 0 is transparent though not sure how it works o_O ParticleScaling {7.4, 8.4, 0.1}, // see note 3 at bottom LifeSpanUVAnim {0, 0, 1}, // *the head uv anim, 0 to 0 DecayUVAnim {0, 0, 1}, // *the head decay uv anim, 0 to 0 TailUVAnim {0, 0, 1}, // *the tail uv anim, 0 to 0 TailDecayUVAnim {0, 0, 1}, // *the tail decay uv anim, 0 to 0 TextureID 4, // the number of the texture it uses. keep in mind it starts from 0. } -------------------------------------------------------------------------------- |
| 08-30-2003, 01:08 AM | #12 |
Kudos to Jul for correcting a few mistakes in my post, and defining how the "time" parameter works. Also, I discovered (though many people already knew) that scaling is start, middle, end, and not a 3d parameter as I had implied. |
| 10-26-2003, 11:57 AM | #13 |
Thanks for the pointers; I was trying to get rid of the weapon flames (and weapon) off the Doom guard model, and nothing I was doing was helping. Oddly, it seems that changing Visibility, Static Width and Static Length have *no* effect on the particles whatsoever; I 0'ed them out before trying to alpha them, and I still got the same ol' flames. Also, changing the value of NumParticleEmitters2 4, to 0 ALSO had no effect (yes, I was pawing at the .MDL in a clumsy, shotgun effort). Wonder why the line exists if the .MDL proceeds to ignore it as soon as it encounters a particle emitting object declaration? |
| 10-27-2003, 06:15 PM | #14 |
As far as I can tell, the parameter " NumParticleEmitters2" (and other similar censuses at the top of the mdl) have no relevence whatsoever tot he functioning of the model. I'm going to guess that they are generated by Blizzard's converter merely for the reference of the artist himself. If you want to delete the flames, your best best would be to go to the emitter at the bottom and delete it outright. If you're unfamiliar with mdl's in general, a safer method may be to change the line in the emitter that deals with the alpha ("Alpha {255, 255, 0}" in the example above) to read "Alpha {0, 0, 0}" which should make the emitter invisible (for a single emitter, the cpu usage is insignificant, so you can get away with this less elegant solution). WIthout knowing exactly how you were altering width, height and visibility, I'm not sure what you were doing wrong, but changing all alphas in the emitter to zero should do the trick. If you still have no lluck, double check to make sure you're altering the right emitter (often there's more than one, even for units where there is no obvious emitters). If you still aren't having luck, paste here (or in a new post) and maybe I or someone else can point out the mistake. |
| 10-28-2003, 04:54 AM | #15 |
Oh, no need, Ari; changing the alphas to zilch got rid of the flames. I'm just surprised by all the miscellaneous bits in .MDLs which are essentially non-functional. |
