• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

MDX/MDL Mysteries

Status
Not open for further replies.
Level 21
Joined
May 29, 2013
Messages
1,567
There are still many things about Warcraft 3 models that are unknown to me; these are the ones I'm particularly interested in:

Sort Primitives Far Z flag and Priority Plane in particle emitters and materials have something to do with which objects are rendered over others, but no one really knows how they work.

What does the Alpha Key flag in particle emitters do?

What does the Camera Anchored node flag do?

What are Attenuation Start and Attenuation End in lights? They're set to 80/200 in almost all lights and changing their values doesn't seem to do anything.

What are ambient lights used for? The only model who has one is Doodads\Cinematic\ArthasIllidanFight\ArthasIllidanFight.mdx

Are Drag footprints (FDLL, FDLR, FDSL, FDSR) used anywhere?

What does the Drop Shadow flag in geoset animations do? It's rumored to reference some function that the shadow generating engine WC3 uses (File > Calculate Shadows in World Editor). I didn't notice any difference when I tested it.

I know that Modulate 2x filter mode exists, but is it even used anywhere?

What does the Constant Color material flag do? I thought that it was supposed to prevent the model from being affected by the DNC coloring, but it doesn't work; even if this flag is checked the models are still more blue at night.

No Depth Test and No Depth Set are only used for Skyboxes to make them always render behind everything else since it seems to disable depth sorting of any kind, but how do they work and what exactly does this mean?
Warcraft III Art Tools Documentation said:
No Depth Set – The object's polygons will not write to the depth buffer. This option is ignored when using Additive, Alpha, Modulate, and Modulate 2X blend modes.

No Depth Test - The object's polygons will not test the sort order from the depth buffer.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Sort primitives and priority planes determine the order of rendering.
Near z - nearer things render first, typically what you'd want for opaque draw calls.
Far z - further things render first, typically what you'd want for translucent (blended) draw calls.
Priority planes - the higher the number is, the later it will get rendered.
Take into consideration that sorting particles is probably quite expensive, and the results will probably not be very noticeable to a player.

Attenuation is a real world lighting term, you can wiki it.
In short, it describes how the intensity of the light falls off as the light gets further away from the light source. Look at a light bulb from 10cm away, it's different than looking at it from 5m away.
In the world of physics this is due to passing via a medium (air, water, ...), but in the world of computer graphics it's generally a simple math equation.
Lights in general are buggy in wc3, so it's hard to say what is working or not.

Modulate 2x is used by the Obsidian Statue model.

No depth set - the draw call does not change the depth buffer.
No depth test - the draw call will not use the depth buffer for culling.
The depth buffer and test are used so that if a pixel is going to be drawn at the same position as another previously drawn pixel on the XY axis (your monitor) but at a higher Z depth (further away from you), it won't get drawn.
This works well for opaque draw calls - it allows the code to not care so much about continuously sorting all of the visible objects every frame - but of course will not allow blending to work on a per-pixel level, which is why it's generally disabled for translucent draw calls.

You can look for additional information in the Art Tools documentation, but it contains some typos and weird wordings and missing terms.
For instance if you look at the particle emitter blending values, it's really not obvious what the values actually are.
 
Last edited:
Status
Not open for further replies.
Top