• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

MDX secret's discussion

Status
Not open for further replies.
I would like to use this thread to keep discussing the secrets hidden in the MDX format.

I'm afraid not, or not that I know of.
From what I gather ENB does not communicate with the game directly, hence why it can be used on virtually anything that uses direct 3D 8/9 to render the graphics.
This build has some experimental support for bump and parallax mapping, however I believe this is faked from the diffuse map (and ends up looking hideous as a result) but it does not seem to work in wc3.
These and reflection/water shader seem to be tailored specifically for San Andreas and won't work in other games.

Speaking of which, I noticed magos can add an environment map material tag but this does not seem to do anything in the game.
Heard anything of that ? Sphere mapping is simple but would be amazing to have even that. This is the kind of data that is not used I assume ? What else is there ?

I'm currently making NeoDex export directly to MDX format and i've found some extremely weird shit. There are many unknown flags in materials. Models can have external animation files which I don't really know what they are for or how they are used. There's a type of particle emitter which can emit models and works differently to particle emitters 2, sadly testing it is a pain because magos erase them, a big motivation to make NeoDex export directly to mdx and forget of mago's crap. I also found Animations have an extra value called sync point which I have no idea how it works. There's plenty of unused data in geosets like types of faces (triangles, trianglefans, quads, etc). There's a flag called DropShadow on geosets which I haven't tested. There are more types of colission objects like planes and cylinders.

Material flags:
//#1 - ConstantColor
//#2 - ???
//#4 - ???
//#8 - SortPrimitivesNearZ
//#16 - SortPrimitivesFarZ
//#32 - FullResolution

there are 2 flags that exist and no body knows what they do.

Fascinating. I hope you can figure some of that out. You've already made NeoDex nearly as good as art tools, and better in several aspects. If you can figure some of that out and find some super awesome feature hidden within warcraft 3 NeoDex will go above and beyond art tools.
That drop shadow flag is particularly interesting. Drop shadow usually refers to a type of shadow used in 2d art, but if it's on a 3d geoset I have no idea what it means. Maybe they were trying to make a better shadow system? I have no idea.

Do you know anything about those two ??? flags?

I have no idea what constant color could be for.
I also have no idea what the sorting primitives flags are.
The full resolution flag sounds sort of like it might turn of mipmapping? Who knows.

Maybe some of this stuff was used in the Arthas vs Illidan model. If you open up the model file, you'll notice for one thing it actually has no animations. External animation file?
Also, if you watch the fight, you'll notice that both arthas and illidan have what I think is real time shadows.
http://www.youtube.com/watch?v=eB82pF_64mw Here is a video of the fight.
If you open the model up in the editor and look at arthas's face, you'll notice that although it has no animations, arthas's hair is blowing in the wind with what appears to be real time shadows cast by the hair.
There are several large black planes in the model, which are sort of shown in the fight, and several interesting particle effects, including what looks like snow falling up, and a bunch of smoke coming from the cave entrance.
You can also open up the cinematic illidan model, which appears to be the same or almost the same model used in the pre-rendered illidan cinematic in TFT where he summons nagas. Except the textures are messed up.

Hmm can't find the cinematic models in the mpq, any hints?

Constant color makes your model not be affected by time of the day coloring, like in night models get a little bluer.

Full Resolution, does indeed ignore mipmapping. It's used for loading screen models.
PrimesFarZ and NearZ changes how your model is rendered in the 3d space. They have to do with which objects are rendered over others. Not sure pretty well how the exactly work.

Layers also have more unknown flags:
ShadingFlags;
//#1 - Unshaded
//#2 - SphereEnvironmentMap
//#4 - ???
//#8 - ???
//#16 - TwoSided
//#32 - Unfogged
//#64 - NoDepthTest
//#128 - NoDepthSet

There's also this property which I don't know what it does:
CoordId

There's also this in geosets:
Code:
    DWORD 'UVAS';
    DWORD NrOfTextureVertexGroups;

    DWORD 'UVBS';
    DWORD NrOfVertexTexturePositions;

    struct VertexTexturePosition[NrOfVertexTexturePositions]
    {
      FLOAT2 TexturePosition;
    };

I know that it looks chinese, but I think coordId has to do with it. Geosets appear to be able to handle two or more unwraps.

Here's what I was saying about faces:
Code:
DWORD 'PTYP';
    DWORD NrOfFaceTypeGroups;

    struct FaceTypeGroup[NrOfFaceTypeGroups]
    {
      DWORD FaceType;                  //4   - Triangles
                                       //??? - Triangle fan
                                       //??? - Triangle strip
                                       //??? - Quads
                                       //??? - Quad strip
    };

    DWORD 'PCNT';
    DWORD NrOfFaceGroups;

funny thing is that we only use triangles, but other shit is apparently allowed. The question is what are their numbers.

There are also some unknown flags on geosets:
DWORD MaterialId;
DWORD SelectionGroup;
DWORD SelectionFlags; //0 - None
//#1 - ???
//#2 - ???
//#4 - Unselectable

Sadly if you want to experiment by changing this glags, you require a hex editor: http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

There's also one thing that should be explored which are:
Code:
// Observe properties of an Object.
// EmitterUses___ is a flag that appears only when there is a Path
//   in Particle and their appropriate flag is set.
// Maximum length of path is 256 characters (0x100 bytes)
ParticleEmitter <string_name> {
	ObjectId <long>,
	Parent <long>,
	<EmitterUsesMDL|EmitterUsesTGA>,
	static EmissionRate <float>,
	static Gravity <float>,
	static Longitude <float>,
	static Latitude <float>,
	(Visibility <float>)
	Particle {
		static LifeSpan <float>,
		static InitVelocity <float>,
		Path <string_path>,
	}
	(Translation { <float_x>, <float_y>, <float_z> })
	(Rotation { <float_a>, <float_b>, <float_c>, <float_d> })
	(Scaling { <float_x>, <float_y>, <float_z> })
}

I've only seen them used by models like dragons to drop many bones when they die. This type of emitter, emits models and behaves different to particle emitters 2. Here's a bit of what I know about them:
  • They are based on a type of particle system in 3ds max called SuperSpray.
  • Basicly you use them for emitting models.
  • Emitted models will only play Stand animation.
  • Longitude and Latitude use radians instead of degrees. They say the scope of the emission.
  • Converting them in magos from mdl may erase them.
  • Guesst's MDL-MDX convertor crashes if your model has them.
  • Only Yobsul's MDL/X Convertor can convert them properly.
  • NeoDex, unlike Art Tools, can export them, but they seem to be hard to set.

Things I don't know about them:
  • Can the emitted models have ribbon emitters and/or particle emitters 2?
  • What are the MDX chunk names for animated latitud, longitude, gravity, lifespan, emission?

Their potential:
  • Imagine emitting ribbon emitters, crazy effects could be achieved.
  • Emitting models with other particle systems could be nice for reproducing effects like blood splats or shit.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
The shadows are just pre-rendered shadow maps. You can find them in the TFT undead backdrop model too. (where Arthas stands against the sunlight)
It appears he uses the same shadow map sequence for shadows on his face in the cinematic.
The texture appears completely black but it has an alpha layer that makes portions of it transparent.

Wc3 and TFT were nowhere near the time when dynamic lighting would be feasible, I mean about the first retail game that computed lighting in real-time was doom 3 around 2006, and even that was stencil shadows.
Pretty much everything else before was limited to pre-baked light maps.

What I assume is that DropShadow references some function that the shadow generating engine wc3 uses (the one that can calculate cast shadows onto the terrain in editor).

Also as I mentioned previously, Toby said the art tools could export models with multiple unwraps and the game can read it.
However they would break in all model viewers/converters he tried and hence had to be imported straight from art tools into wc3.

Also one question, does constant color mean that the models would still appear darker during night ? Just not hued ? And they would also get brighter under colored omnidirectional lights but would not get affected by the color ?
 
I don't think any of the cinematic models outside of the illidan one are in the warcraft 3 mpq. The illidan model is in Doodads/Cinematic/IllidanVictoryCinematic and the Arthas vs Illidan is in Doodads/Cinematic/ArthasIllidan Fight.
The MRF files are in the warcraft3xlocal mpq with the path Doodads/Cinematic/Arthas Illidan fight.

Things of interest in the arthas v illidan mdl.

Priority Plane 5 and Priority Plane 10 flag on some of the materials. Also I just found Priority Plane 1.
Some tag like thing that says alpha and then a number on some of the materials.
What looks somewhat like animation data under some materials.
DontInterp flag
Static Alpha under one of the materials

3 tvertex animations

Very strange minimum and maximum extents under geosets

A crapload of geoset animations

Bones that look like they are for arthas's hair

Several Lights including

Light "FDirect01" {
ObjectId 141,
Ambient,
static AttenuationStart 80.000000,
static AttenuationEnd 200.000000,
static Intensity 0.000000,
static Color { 1.000000, 1.000000, 1.000000 },
static AmbIntensity 0.200000,
static AmbColor { 1.000000, 1.000000, 0.811765 },

and

Light "FXOmni04" {
ObjectId 143,
Omnidirectional,
static AttenuationStart 80.000000,
static AttenuationEnd 200.000000,
static Intensity 50.000000,
static Color { 0.290196, 0.823529, 1.000000 },
static AmbIntensity 0.000000,
static AmbColor { 1.000000, 1.000000, 1.000000 },
Visibility 12 {
DontInterp,
667: 0.000000,
10300: 0.000000,
23933: 0.000000,
39400: 0.000000,
44333: 0.000000,
49833: 0.000000,
50067: 1.000000,
50233: 0.000000,
55933: 0.000000,
60633: 0.000000,
72867: 0.000000,
88900: 0.000000,
}

Several helpers, particle emitters 2, and cameras.

Obviously not all of those are new discoveries.

Also, I have never once seen this line of code before that blizzard uses to play the arthas vs illidan fight.

call PlayModelCinematic( "Doodads\\Cinematic\\ArthasIllidanFight\\ArthasIllidanFight.mdl" )

It might be useful. I'm not sure how they got it to play all it's animations in a row though.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
It uses a cinematic camera model I assume. You can setup camera movement in a model file in max for example import it, play it and it will play the camera movement without using camera objects or jass, triggers or anything.
All the anims in that model start with a number before it ranging from 00 to 09, a sequence I guess. Maybe it plays the anims in that order when you run the script.
 
The MRF files are what I don't really get about the model. I know three things about them:
1st They are linked to the cape
2nd The model links to them through Event Objects.
3rd On my investigation these files seem to be "MRF - monochrome recursive format (compressed bitmaps) "

My guess is that they are used for setting the shadow maps on the cape.

Also could you ask your friend if he could make me a simple model of a 3vertices triangle with 3 different unwraps , export it and send me the mdx? I need to study it.

EDIT: the model has one camera peranimation. hard to tell how they relate them.
 
As soon as I saw that line of code I started thinking about how useful it might be for playing in game cinematics in the style of the arthas illidan fight.

I could create a scene and set it up in max and then have really cool interludes in the game that would probably look much better than one made via triggers.

Fun fact: In the map the arthas illidan fight model is not actually placed somewhere. It seems it opens up and plays the model in it's own 3d space.

I have never seen a light called a "FDirect" before. Not sure if they just named the light that or if it is some sort of light that acts differently than regular omni lights.

Also, in the MRF files there looks to be a line referencing the blp texture for arthas's cape.

Sphere mapping is a type of reflection mapping, so if you could get that to work some very cool things could be done. It would really help with water realism.
 
As soon as I saw that line of code I started thinking about how useful it might be for playing in game cinematics in the style of the arthas illidan fight.

I could create a scene and set it up in max and then have really cool interludes in the game that would probably look much better than one made via triggers.

Fun fact: In the map the arthas illidan fight model is not actually placed somewhere. It seems it opens up and plays the model in it's own 3d space.

I have never seen a light called a "FDirect" before. Not sure if they just named the light that or if it is some sort of light that acts differently than regular omni lights.

Also, in the MRF files there looks to be a line referencing the blp texture for arthas's cape.

Yeah the MRF seems to be some kind of animated gif which only adds shadows into the image.
 
Yeah I did ask him, it may take a bit though. Toby doesn't log in too often nowadays.

Actualy ask for both mdx and mdl, exported from Art Tools.

EDIT: I found out that Art Tools models use face groups all the time. That's why if you look into the mdl of an Art tool's exported model, it will have millions of triangle groups instead of a big long one.
 
Last edited:
Level 24
Joined
Mar 29, 2004
Messages
1,991
I have some practical experience with NoDepthTest and NoDepthSet:


  • No Depth Test alone makes things always render on top (it gets confused around things with Blend filtermode, but we all know Blend is flaky). Can almost use it to fake UI elements.
  • No Depth Test and No Depth Set are used for Skyboxes, and makes everything always render behind everything else. This seems to disable depth sorting of any kind, so the geosets render in order down the MDL (i.e. first geoset renders first, second on top of that, and so on). I think PriorityPlanes might be related to this enforced depth sorting, but I never got consistent results of them.
I once tried SphereEnvironmentMap years ago and it just turned the texture into a one-colour smear. I suspect the functionality was never implemented in the WC3 side. (I would trade all my limbs to have sweet sweet spheremapping activated.)

It was previously theorised that TriangleStrip might be used for Ribbon Emitters, but I seem to remember somebody else smashed that theory quite recently.
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
MDL emitters:

I've only seen them used by models like dragons to drop many bones when they die. This type of emitter, emits models and behaves different to particle emitters 2. Here's a bit of what I know about them:
  • They are based on a type of particle system in 3ds max called SuperSpray.
  • Basicly you use them for emitting models.
  • Emitted models will only play Stand animation.
  • Longitude and Latitude use radians instead of degrees. They say the scope of the emission.
  • Converting them in magos from mdl may erase them.
  • Guesst's MDL-MDX convertor crashes if your model has them.
  • Only Yobsul's MDL/X Convertor can convert them properly.
  • NeoDex, unlike Art Tools, can export them, but they seem to be hard to set.

Things I don't know about them:
  • Can the emitted models have ribbon emitters and/or particle emitters 2?
  • What are the MDX chunk names for animated latitud, longitude, gravity, lifespan, emission?

Their potential:
  • Imagine emitting ribbon emitters, crazy effects could be achieved.
  • Emitting models with other particle systems could be nice for reproducing effects like blood splats or shit.

I just tested the dragon model's MDL emitters. They can emit both models with ribbons (ziggurat missile) and with particles (demon hunter missile). I am now making a model from scratch to see if you can freely make them or only modify those that are already in the in-game models.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
I experimented with noDepth and sphere map before, sphere map got an ugly averaged texture smear like RDZ said.
NoDepth flags though can be used for a few neat things however, to fake X-ray vision or some sort of target detection akin to some "perks" in stealth games or even random puzzles.
When you put a no depth material layer on top and an opaque layer underneath (in the list) it won't show but will display when looked at through other geometry.
It won't show if you look at such a model through a model with same no depth settings too (so multiple no depth set models won't give each other away).

If you put some sort of grid texture/wireframe or something similar as the no depth layer it grants cool results, more so if you animate the alpha value to make it glow in and out, animate the texture and whatever you think of.
If the filter mode is alpha compatible, you can make it being able to be switched around by playing an animation in which the layer has 0 alpha and becomes invisible hence it won't be visible through other models any more.
Because no depth models obscure each other you can set their no depth layer as completely transparent dummy texture and make them obscure other no depth models while not showing anything through geometry themselves. Such as you want to see things through wall but you don't want the X-rayed vision to also go through the character himself.
They don't obscure each other when viewed from behind geometry however.
Like so:
185888-albums6426-picture72533.jpg
 
Last edited:
Great job man, I really love that XRay hack you are making there, perhaps with green additives or soemthing it will look nice.

In other news, I found some of the missing information of many documentations of the MDX format by hacking game.dll.

Code:
KPEE -> Particle Emitter 1 Emission Animation
KPEG -> Particle Emitter 1 Gravity Animation
KPLN -> Particle Emitter 1 Longtude Animation
KPLT -> Particle Emitter 1 Latitude Animation
KPEL -> Particle Emitter 1 Life Span Animation
KPES -> Particle Emitter 1 Speed Animation

For Light's I also found the missing keys:
Code:
KLAE -> Light attenuation End Animation
KLAS -> Light attenuation Start Animation

I also found some unknown Tag in geosets: QUVW

The unknown face types are:
TriangleStrip
TriangleFan
Triangles
QuadStrip
Quads
Polygons
Points

There's also something called TFaces.

I found a hidden MDX object called Sound Emitter:
SoundEmitter, NumSoundEmitters, SoundChannel, SoundTrack, SoundFile. Their MDX tag is SNEM or SNDS.

Here's all the MDL Tags:
  • XYQuad
  • WrapWidth
  • WrapHeight
  • Visibility
  • Vertices
  • VertexGroup
  • VertexCount
  • Vertex
  • Variation
  • Unshaded
  • Unselectable
  • Unfogged
  • TwoSided
  • TVertices
  • TVertexAnimId
  • TVertexAnim
  • TriangleStrip
  • TriangleFan
  • Triangles
  • Transparent
  • Translation
  • Time
  • TFaces
  • TextureSlot
  • TextureID
  • TailUVAnim
  • TailDecayUVAnim
  • TailLength
  • Tail
  • SyncPoint
  • static
  • Squirt
  • Speed
  • SoundChannel
  • SoundTrack
  • SoundFile
  • SortPrimsNearZ
  • SortPrimsFarZ
  • SphereEnvMap
  • Sphere
  • MinimumDistance
  • MaximumDistance
  • SelectionGroup
  • SegmentColor
  • Scaling
  • Rotation
  • ReplaceableId
  • Rarity
  • QuadStrip
  • Quads
  • PriorityPlane
  • Position
  • Polygons
  • Points
  • Plane
  • Path
  • ParticleScaling
  • Particle
  • Parent
  • Palette
  • OutTan
  • Opacity
  • Omnidirectional
  • ObjectId
  • NumSoundEmitters
  • NumRibbonEmitters
  • NumParticleEmitters2
  • NumParticleEmitters
  • NumMeshes
  • NumLights
  • NumHelpers
  • NumGeosetAnims
  • NumGeosets
  • NumEvents
  • NumBones
  • NumAttachments
  • Normals
  • NonLooping
  • None
  • NoDepthSet
  • NoDepthTest
  • NearClip
  • Multiple
  • MoveSpeed
  • Modulate2x
  • Modulate
  • ModelSpace
  • MinimumExtent
  • MaximumExtent
  • Matrices
  • MaterialID
  • Material
  • LineStrip
  • LineLoop
  • LineEmitter
  • Lines
  • Linear
  • LifeSpanUVAnim
  • LifeSpan
  • Length
  • Longitude
  • Latitude
  • Interval
  • Intensity
  • InTan
  • InitVelocity
  • Hermite
  • HeightBelow
  • HeightAbove
  • Head
  • Groups
  • Group
  • Gravity
  • GlobalSeqId
  • GeosetAnimId
  • GeosetId
  • FullResolution
  • FormatVersion
  • FilterMode
  • FieldOfView
  • FarClip
  • Faces
  • EventTrack
  • EmitterUsesTGA
  • EmitterUsesMDL
  • EmissionRate
  • Duplicates
  • DropShadow
  • DontInterp
  • DontInherit
  • Directional
  • DecayUVAnim
  • Cylinder
  • CoordId
  • ConstantColor
  • Connect
  • ComponentSkin
  • CameraAnchored
  • Box
  • BoundsRadius
  • Both
  • BlendTime
  • BlendColors
  • Blend
  • Bitmap
  • BillboardedLockZ
  • BillboardedLockY
  • BillboardedLockX
  • Billboarded
  • Bezier
  • AttenuationEnd
  • AttenuationStart
  • Attenuation
  • AttachmentID
  • AnimationFile
  • Anim
  • Ambient
  • AmbIntensity
  • AmbColor
  • AlphaKey
  • AddAlpha
  • Additive
  • RibbonEmitter
  • CollisionShape
  • EventObject
  • ParticleEmitter2
  • ParticleEmitter
  • PivotPoints
  • Attachment
  • SoundEmitter
  • Helper
  • Mesh
  • Bone
  • GeosetAnim
  • Geoset
  • Materials
  • Textures
  • TextureAnims
  • GlobalSequences
  • Sequences
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
Speaking of MDL emitters, the attachments can have models attached to them too (via Magos or tesx editing). The attached model only displays stand animations. (Oddly, the BirthLink attachments display Birth animation)

Also, I tried to make a model with MDL emitters, but Yogbul's converter crashed.

I'd also delve into some of the animation tags, like for example Spin. It is known that Attack Walk Stand Spin is the blademaster's animation for his ultimate ability, but recently, while searching through the beta MPQ, I found an owl scout model that has a Stand Spin animation (it flies in a circle). It looked weird.
 
Here's a little test I made using custom made MDL Emitters with NeoDex 2.2.

Import Paths:
ParticleObject.mdx
RibbonObject.mdx

The Main Models:
PartTestOnribbon
PartTestOnPart2
Shockwave5

in other words remove the path.

Observations:
  • When particles die they are recycled and moved at the start of the emitter. Therefore, Ribbon Emitters are not good to combine with this type of emitter unless you animate the emitter's emission in 3ds max.
  • Combining this kind of emitters with ParticleEmitters2 can achieve very nice effects. Espacialy for fireworks, explossions, etc.
  • if you want to send flying a bunch of rocks/bones/stones or whatever, you can achieve it simply by animating the spread
  • You can make nice Shockwave effects with them.

Btw Shockwave5 won't open in any editor you have except for WE and Game itself.

I added the mdl if you want to look at it.

EDIT IMPORTANT:
I noticed some things of ppl downloding this sources.
1st PartTestOnRibbon and PartTestOnPart2 both require:
ParticleObject.mdx
RibbonObject.mdx

on that same path, or else they won't be visible. Also this kind of particle emitter can only be visible on WE or in-game. No viewers can see them.
 

Attachments

  • PartTestOnRibbon.mdx
    3.5 KB · Views: 90
  • PartTestOnPart2.mdx
    3.5 KB · Views: 152
  • ParticleObject.mdx
    1.1 KB · Views: 85
  • RibbonObject.mdx
    2 KB · Views: 88
  • Shockwave5.mdx
    1.1 KB · Views: 104
  • Shockwave5.mdl
    926 bytes · Views: 99
Last edited:
Level 16
Joined
Sep 19, 2011
Messages
829
Interesting Discussion, story for missing something like this. BlinkBoy, I heard you wanted me to export a model with multi UVW's. I hope you can crack some of the secrets a mdx format holds. The wc3 limitations are in deed frustrating, every solution causing a new problem.
Every time I tried to developed a system I stumbled upon the blight of the wc3 limitations.
Here are some samples and the discussion I had with Travaj (Read the pds it contains the how to do it, ignore the other stuff). I hope this will be quite enough If not I send you a simple triangle as soon as I get home, probably a few days. (Ignore the other irritating information, those are just some first time tests)

Resources!

http://www.hiveworkshop.com/forums/pastebin.php?id=ufj74s
http://www.hiveworkshop.com/forums/pastebin.php?id=gwtkve
http://www.hiveworkshop.com/forums/pastebin.php?id=1wq4ty
 
hmm nice toby, thanks. Sadly I don't have art tools anymore, trying to implement the feuture into neodex. Do you think you could reexport the teaspot multiunwrap model u got as mdl? I already learned how it works for mdx, still need to check how to write it in mdl.

Btw Here's a summary of unknown Mdl words/tags:

Here's all the MDL Tags:
  • TriangleStrip
  • TriangleFan
  • Triangles
  • Time
  • TFaces
  • SyncPoint
  • SoundChannel
  • SoundTrack
  • SoundFile
  • QuadStrip
  • Quads
  • Position (hmm we use translation....)
  • Polygons
  • Points
  • Plane
  • Palette
  • NumSoundEmitters
  • NumMeshes
  • LineStrip
  • LineLoop
  • Lines
  • Group (single group ?)
  • Duplicates
  • Cylinder
  • Connect
  • ComponentSkin
  • BlendColors
  • AnimationFile
  • SoundEmitter
  • Mesh

The question is how they fit the puzzle.
 
Last edited:
Level 16
Joined
Sep 19, 2011
Messages
829
Ok I'l export some models in mdl format for you. Maybe I can get home tonight and send it tomorrow. I'm at some other computer elsewhere if not then you'll have to wait a few more days. This where all the models I could find in the pastebin.
For some reason I don't think it works in mdl format I tried it and the shadows won't display but maybe you can crack it.
 
Ok I'l export some models in mdl format for you. Maybe I can get home tonight and send it tomorrow. I'm at some other computer elsewhere if not then you'll have to wait a few more days. This where all the models I could find in the pastebin.
For some reason I don't think it works in mdl format I tried it and the shadows won't display but maybe you can crack it.

Well there's no urgency for the MDL. I just need it for implementing it into NeoDex I need to be able to export to both formats.
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
How are those map channels read by Warcraft? (If at all). How many can a geoset tolerate? Can each of them carry a material with more than one layers?

Btw, Magos displays some rudimentary form of specularity in the MDX, do you think that hlds some potential?
 
How are those map channels read by Warcraft? (If at all). How many can a geoset tolerate? Can each of them carry a material with more than one layers?

Btw, Magos displays some rudimentary form of specularity in the MDX, do you think that hlds some potential?

As many unwraps as you want, it appears. They are linked to a layer in the material through a parameter called coordId. CoordId 0 means first unwrap, coordId 1 means second unwrap.

Magos does it on it's own, there's nothing (atleast known) within wc3 models that can add specularity. As far as I know magos is a bit imcomplete on it's usage of the mdx format. I doubt it uses anything unknown to us.

I also based my mdx format specification on mago's and KMK's. Both were incomplete so the last of the information I obtained it by hacking into game.dll and look for information I knew and searched near by for more information. That was how I discovered all the hidden MDL Tags we didn't know. This tactic could also work for m3 models. I sadly don't have sc2 installed in this comp, but when I get back i'll try to reverse engineer what's left of the m3 format.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
I assume the resulting multi uvw would be a single material having multiple layers each with different uvw coordinates, correct ?
If it will work fine it will be amazing because it will allow for pre-baked shadow maps to be applied directly over the diffuse layer in the same material without having to duplicate the mesh and without running into clipping and pop up issues.

If so how it will work ? just the way composite materials worked for multiple layers in Dex before ? and you will only specify channel for every map and the unwrap modifier ?
 
I assume the resulting multi uvw would be a single material having multiple layers each with different uvw coordinates, correct ?
If it will work fine it will be amazing because it will allow for pre-baked shadow maps to be applied directly over the diffuse layer in the same material without having to duplicate the mesh and without running into clipping and pop up issues.

If so how it will work ? just the way composite materials worked for multiple layers in Dex before ? and you will only specify channel for every map and the unwrap modifier ?

Yeah that's pretty much how it will work.

I just found out we were rediscovering a lot of thing's. Guesst's convertor 1.04 does convert everything we've talked about, even multiple unwraps. Sadly the tools section has version 1.02.

here's the link get the prophet's build and enjoy: http://www.wc3c.net/showthread.php?t=91130
 
In early version of the game, models had the ability to support changes in textures by using triggers. Maybe some unknown value are for this removed feature?

Interesting thread by the way.

Wish they still had that.

Right now Blizzard has the feature of "Replaceable Textures", but there isn't a means of conveniently accessing that feature for units. Destructables, however, do have such a means (in the object editor).

The way Dron does it on xgm is by using the ability, War Club. It has the ability to change textures. It does this when they grab a tree, in case it is some snowy/felwood/other variant.

http://www.wc3c.net/showthread.php?p=1043980
 
Wish they still had that.

Right now Blizzard has the feature of "Replaceable Textures", but there isn't a means of conveniently accessing that feature for units. Destructables, however, do have such a means (in the object editor).

The way Dron does it on xgm is by using the ability, War Club. It has the ability to change textures. It does this when they grab a tree, in case it is some snowy/felwood/other variant.

http://www.wc3c.net/showthread.php?p=1043980

Thanks for the link, I'll check that.

Edit: It works, I need to test it in deep.

Blizzard made an API to change textures, they admit that is an horrible API but instead of fixing it, they remove the entire feature.

JASS:
native          UnitAddMaterial     takes unit whichUnit, string textureFile, texmapflags tflags, blendmode mode, materialid mat, blendmode modeToAddTo returns nothing
native          UnitRemoveMaterial  takes unit whichUnit, materialid mat, blendmode mode returns nothing
native          UnitShowMaterial    takes unit whichUnit, materialid mat, blendmode mode, boolean show returns nothing
Taken from the common.j in war3Beta.mpq


The beastmaster's pets (the grizzly bear, the quillbeast and the hawk) have textures in every tileset MPQ archive (they are included in the main MPQs and indicated by a single letter).

Well, I think the primary function for this is to changing the cliff, water and ubersplat textures. But if you add textures to that file and then you reference that texture in-game you can see it. So all .mpq tileset files are loaded even if the aren't in use.
 
Last edited:

A.R.

Skin Reviewer
Level 25
Joined
Mar 12, 2008
Messages
347
The beastmaster's pets (the grizzly bear, the quillbeast and the hawk) have textures in every tileset MPQ archive (they are included in the main MPQs and indicated by a single letter).

This is to make the summoned Bear into a Polar Bear in the wintry tilesets. The Ashenvale/Felwood version appears to be a different texture, as well.

It's only in-game; in the editor they're still the brown version.

EDIT: Ashenvale Hawk has its specific texture viewable in the editor
EDIT 2: Scratch that, the textures don't reset upon changing the tileset; seems to be a display bug in the same style as importing textures.
 
Level 16
Joined
Sep 19, 2011
Messages
829
Your neodex is a very useful tool wich I was using parallel to art tools and still am the VA convertor is a must for me as it is the only thing that can bake cloth animation.
For those of you who have never used or seen a multi wvu in wc3, this is how it looks like:
210613-albums6274-picture67847.jpg

210613-albums6274-picture67849.jpg

210613-albums6274-picture67856.jpg

The models work in game!
I was going to keep the technique a secret till after I release my second episode of OVH. Since BlinkBoy is implementing it in neo dex It`s not that secret anymore plus Travaj was using the same technique in a different approach.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
Heh, it means wc3 is pretty in its own hideous way and modding it is a heresy.
But to give it credit, it came out back in 2002 or so and it was one of the few fully 3d strategy games back then and it didn't look half bad.

The only strategy I remember looking better was probably Hegemonia, but then that game looked better than anything I remember playing around that time.
Also, funny I thought doom 3 came out way later. Must have been confused considering neither Half Life 2 nor Far Cry had a lighting engine at around the same time then.

That being said, I have seen a lot of gorgeous games that did not use too advanced technology. Mostly unity games come to mind, notably stuff from Sergei Noskov. His games only really use bump mapping and unity's lighting.
The technical fidelity of his games isn't too high, but they are gorgeous. I want my mod to look close to that.
Frapsed images from his "The Light" and "The Train", they aren't particularly great games but they are real pieces of art.
The most amazing parts are probably the backgrounds, there was a passage in the city at night. It looked sick but the screen was too blurry. I'm trying to come up with similar background and make it into a skysphere.

185888-albums6426-picture72819.jpg

185888-albums6426-picture72818.jpg

185888-albums6426-picture72820.jpg
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Baked shadows look good, but they have the problem of not supporting dynamic lighting very well. By this I mean things like sunrise -> day -> sunset -> night which WC3 used heavily so you ended up with the stupid thing of units and terrain having shadows at night from an imaginary light source that remained in the same spot all the time.

Surprisingly StarCraft II does this perfectly. Sure the shadows are not as nice as baked ones, but for an RTS game they look fantastic.
 
Level 17
Joined
Jan 18, 2010
Messages
1,122
Indeed, there is that. Well you can either make a completely controlled environment (as in change the time of day when or if you want it to change) or simply ditch day-night cycle entirely.
In the most extreme case, you can even bake a shadow map sequence and play different animation of the shadows as the day goes on. But that would be too much effort.

It is really the most useful in cinematics or in maps that are entirely built to support the idea. Because having only some models with baked shadows and most without, can look even more silly.
 
Reverse Engineered two things lacking on the format definition we have:

C:
Sounds {
    SoundFile {
        Path <Sound file path - string>,
        ? { float,float },
        SoundChannel <long>, ?
    }
}

SoundEmitter {
    ObjectId <long>,
    Parent <long>,
	SoundTrack <long_count> {
		<time - long>: <sound id - long>,
		...
	}
	(Translation { <float_x>, <float_y>, <float_z> })
	(Rotation { <float_a>, <float_b>, <float_c>, <float_d> })
	(Scaling { <float_x>, <float_y>, <float_z> })
}

The MDX Tags are: SNDS, SNME, KESK(Sound track animations)

This was very hard to reverse engineer since I had to dissembler game.dll to understand a bit of how they were read, then I compared their reading code to known structures to identify the registers and what they were storing.

until now I can assure Sounds have that structure, I already tested a model in-game with sounds (haven't tested the sound emitter though), yet I'm not sure how Sound Emitters really work. They appear

So what are the benefits of doing this? If you create a custom model and you want it to have it's own death sounds or whatever you want, you can just add the wav file with them. This is useful for advanced mods. You can also use them to protect your models from magos, mdlvis and Guesst's converter xD. I still need to look at the slks which define sounds for Event Objects. This would help me finish my investigation and allow them to be added to neodex.

I believe the floats have to do with pitching and intensity.

it's very hard to know since no existant model in the mpq uses them.
 
Do they even work? There is always the possibility they have been left in as deprecated systems, say from the beta, that are no longer supported.

You also need to check for cross-platform compatibility. Remember that WC3 is on Mac as well.

well there's assembly code for processing them in-game. I'm still not sure if those are the final values. The sound emitter may have more but the assembly is very obfuscated and weirdly optimized (I could definetly generate better code with just g++ without -O2). However, they appear to work almost the same as event objects.

I also found that there are ways to "protect" models or atleast obfuscate them to make editing them hard. however, I don't really see much need for that.

Btw do you know if there's a way to run WE or War3 in debug mode with a console? The assembly shows that they indeed have a console for reporting errors.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Btw do you know if there's a way to run WE or War3 in debug mode with a console? The assembly shows that they indeed have a console for reporting errors.
I think they removed it for the release versions and is probably in there as a compile switch for internal testing. Try and find the routines that start it as you may be able to force the game to show debug by modifying the assembly code.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Triangle strips match ribbon emitters perfectly, so there is probably* a way for them to work in-game.
Can't see a reason for any of the other face types (excluding triangles obviously) to exist.

Multiple texture coordinate sets are indeed supported, but I haven't encountered a model that uses more than one so far while testing the viewer.

I encountered a chunk called MDVI in some model, but I don't remember which one.

* But Blizzard are Blizzard so who knows.
 
Status
Not open for further replies.
Top