HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding a particle generator.

09-13-2002, 10:46 PM#1
Nozdormu
How could I add a particle generator like the ice archer someone (Cookie?) made a while back (which I can't find, if it was even released). What I want to do is add a blue foggy effect as well as snowflakes to a model.
09-13-2002, 11:17 PM#2
Nub
Couple of ways, I'll only talk about the easiest. Find a model that has the desired effect or a very similar effect and convert it to .mdl. Open up the .mdl and look for the "ParticleEmitter2" section that looks like it applies to that particle. Copy it and paste it into the .mdl of the model you want. Search upwards from the top of your new particle emitter for "ObjectID" and get that number. Change the ObjectID of the particle emitter to that number +1. Now find the bone in the 'Bones' section of the .mdl that you want to put the particle near, get it's "ObjectID" number. Change the "Parent" value in the particle emitter to that ObjectID number. Go up to the top of the file to where it has things like "NumBones" "NumGeosets" etc. If there is already an entry for NumParticleEmitters2, increase that number by one, if not, add a new line with "NumParticleEmitters2 1," on it.

This is the trickier part. Most particle use a texture and chances are that the texture you like is not included in the Textures entry of the .mdl file. So find the path and create an entry in the Textures list for your particle's texture. You'll have to increment the number of Textures beside the word "Textures." So if you have 4 old textures and 4 texture entries, add your new texture entry and increment that number to 5. Now go back to the particle emitter. At the very bottom of the particleemitter block there should be a line called "TextureID" followed by a number. You'll want to change the number beside it the index for your texture. Since WC3 uses 0 as the index of the 1st texture, you will use 4 as the index to the 5th texture, your new texture. Change your TextureID to 4.

When you convert the model back to .mdx and load it, the particle should be there in all it's wonderful glory. The other method involves hex-editing the MDX, which I don't think anybody but me likes.

There are more complex issues to, if you want to get really into editing particle emitters, check out the PRE2 block in the "MDX Format" thread in the Tools section, it gives you a byte-by-byte account of the PRE2 block. The meaning of each variable is pretty self-explanitory.

That's all I have to say about that.
09-14-2002, 12:24 AM#3
Nozdormu
Wow, thanks! You've helped a ton. One last question, how exactly do I change the color of the particles? I'm using the Burning Archer as an example, and I can gather that Color{ red, greed, blue} is probably how the colors are changed, but they are decimal values less than 1. I suppose these are some sort of percentages? How exactly does it work? There are 3 Color statements in a row, whats the deal there?
Here's the block:
SegmentColor {
Color { 0.0509804, 0.639216, 0.980392 },
Color { 0, 0.329412, 1 },
Color { 0, 0, 0.592157 },
},


Thanks in advance.
09-14-2002, 12:53 AM#4
Nub
in the MDL for some reason, it's Blue, Green, Red, and yes percentages. I don't know what the 3 entries are for, but I just change them all to the desired color trio.
09-14-2002, 01:35 AM#5
Nozdormu
Thanks again! Well, I've got my icy mist working, now for the snowflakes. I just wish the bones were closer to the actual body. IE. For dragon wings, the generator ends up way out there. I looked at the PRE format, but couldn't really tell from it if there was any sort of value for what part of a bone it is attached to.
09-14-2002, 01:52 AM#6
Nub
Naw, unfortunately there isn't anything that does that. You kinda have to design a model in the context that it would be used, that's why some models don't even have bones anywhere near their verts, they just didn't imagine the need for it.
09-14-2002, 02:03 AM#7
Nozdormu
That's ok anyway. One thing though, when I add a second generator for the flakes, they appear as weird white boxes instead of flakes. Is there some other settings I would need to take care of in order for a particle to appear basically just as it does in the .blp? I know there's an Alpha value, but I don't know the specifics or if that would even have anything to do with it.
09-14-2002, 03:29 AM#8
Guest
wow finaly i can change my particles
09-15-2002, 10:41 AM#9
Guest
an example...

ParticleEmitter2 "BlizParticle_Breath02" {
ObjectId 66,
SortPrimsFarZ,
static Speed 160,
static Variation 0.02,
static Latitude 22,
static Gravity 0,
Visibility 8 {
DontInterp,
667: 0,
2500: 0,
5033: 0,
9700: 0,
11600: 0,
12933: 1,
13267: 0,
19600: 0,
}
LifeSpan 1,
static EmissionRate 50,
static Width 6.22013,
static Length 6.69182,
Additive,
Rows 8,
Columns 8,
Head,
TailLength 1,

See the rows and Columns? They are the XxY coordinates of the blp. If the blp has 8 rows and 8 columns (X and Y) then this is the current setting. If your blp consists only of one image (In other words, doesnt exists out of more then 1), then you have t change

Rows 1,
Columns 1,

Simple as that, Now if we could only fix the weird attaching to the bones error everything should be great
09-16-2002, 03:30 AM#10
Nozdormu
Cookie, you're the MAN! Thanks for the help. And yeah, I wish there was a way to specify placement more exactly.