[Archive] [WIP] Machinima Tool
[Archive] [WIP] Machinima Tool
Quote: Hello everyone.
I began working on my very own WoW machinima tool about a week ago, and I wanted to make a thread here to get some feedback and questions answered at the same time.
Keep in mind that I'm more of an artist than a programmer, I'm learning on the go, so I will most likely end up staring with my jaw open if I don't understand your "expert" replies
Decided to use the Unity 3D engine for this because I'm familiar with it, and it also provides access to all the dot net goodies. But also minor useful things, like the ability to auto decompress a DXT1-DXT5 byte array into a texture.
I'm reading the data from an unpacked WoW, so I don't have to deal with extracting from CASC just yet in order to improve debugging speed.
Updated:
What it can do so far:
- Read BLP Textures (need to fix an issue with DXT1 alpha)
- Read Terrain data: Terrain Mesh, Textures, Vertex Color (No water yet, Vertex normals are recalculated in Unity. Need to import them)
- Read WMO models with simple shader (need to fix texture assignment, some meshes don't get the correct textures)
- Read M2 models (Mesh with Material, no bones and animation yet. Same texture assignment issue for some models.)
- A minimap viewer to help choose the terrain block to load, it will load the terrain with all models.
Latest Preview
Progress....
Minimap Viewer
Now I've started working on loading the next texture layers, but for that I need to read all of the different alpha maps that tell the shader how to compose each layer.
As some of you know the alpha maps come in 4 different types: compressed, uncompressed etc.
At the moment I'm working on the 2048 byte uncompressed version, I found that Outlands uses that format, and here's what I have so far:
I'm recording the second layer alpha into an RGB24 for debugging purpose atm.
As you can see there are a few errors I'm trying to figure out, some of the small map chunks (16x16) seem to have the texture attributed wrongly (sharp edges), trying to figure out what's up with those.
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Hello everyone.
I began working on my very own WoW machinima tool about a week ago, and I wanted to make a thread here to get some feedback and questions answered at the same time.
Keep in mind that I'm more of an artist than a programmer, I'm learning on the go, so I will most likely end up staring with my jaw open if I don't understand your "expert" replies
Decided to use the Unity 3D engine for this because I'm familiar with it, and it also provides access to all the dot net goodies. But also minor useful things, like the ability to auto decompress a DXT1-DXT5 byte array into a texture.
I'm reading the data from an unpacked WoW, so I don't have to deal with extracting from CASC just yet in order to improve debugging speed.
Updated:
What it can do so far:
- Read BLP Textures (need to fix an issue with DXT1 alpha)
- Read Terrain data: Terrain Mesh, Textures, Vertex Color (No water yet, Vertex normals are recalculated in Unity. Need to import them)
- Read WMO models with simple shader (need to fix texture assignment, some meshes don't get the correct textures)
- Read M2 models (Mesh with Material, no bones and animation yet. Same texture assignment issue for some models.)
- A minimap viewer to help choose the terrain block to load, it will load the terrain with all models.
Latest Preview
Progress....
Minimap Viewer
Now I've started working on loading the next texture layers, but for that I need to read all of the different alpha maps that tell the shader how to compose each layer.
As some of you know the alpha maps come in 4 different types: compressed, uncompressed etc.
At the moment I'm working on the 2048 byte uncompressed version, I found that Outlands uses that format, and here's what I have so far:
I'm recording the second layer alpha into an RGB24 for debugging purpose atm.
As you can see there are a few errors I'm trying to figure out, some of the small map chunks (16x16) seem to have the texture attributed wrongly (sharp edges), trying to figure out what's up with those.
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Turns out the sharp edges is the alpha maps are alright, they just look like that because a different texture will be mixed there.
Anyway managed to write a CG surface shader that can layer 1-4 textures using the black and white alpha channels provided. Also can set different tiling/texture. Still needs work.
I am still having some bugs with the alpha channels though, it looks as if I'm reading wrong MCAL(alphas) offsets from the ADT, however they're all 2048 bytes in size and follow each other, so no clue why these artifacts appear in random chunks.
I believe this is the error that's causing the texture bug.
One of the alpha layers isn't read properly, and I'm noticing the texture has a repeating pattern on the right side, like it's mipmaps (although these alpha maps don't have mipmaps)
Any ideas?
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Turns out the sharp edges is the alpha maps are alright, they just look like that because a different texture will be mixed there.
Anyway managed to write a CG surface shader that can layer 1-4 textures using the black and white alpha channels provided. Also can set different tiling/texture. Still needs work.
I am still having some bugs with the alpha channels though, it looks as if I'm reading wrong MCAL(alphas) offsets from the ADT, however they're all 2048 bytes in size and follow each other, so no clue why these artifacts appear in random chunks.
I believe this is the error that's causing the texture bug.
One of the alpha layers isn't read properly, and I'm noticing the texture has a repeating pattern on the right side, like it's mipmaps (although these alpha maps don't have mipmaps)
Any ideas?
Quote: holy **** this is great work!
Archived author: ev0 • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: holy **** this is great work!
Quote: Join us at #modcraft in irc.quakenet if you need help parsing the terrain files
Archived author: karliky • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Join us at #modcraft in irc.quakenet if you need help parsing the terrain files
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Originally Posted by karliky
Join us at #modcraft in irc.quakenet if you need help parsing the terrain files
That's a great offer, thanks
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Originally Posted by karliky
Join us at #modcraft in irc.quakenet if you need help parsing the terrain files
That's a great offer, thanks
Quote: After a very long day I've come to realise the stupid mistakes I was making.
Apparently the terrain alpha map can vary in compression from layer to layer, so I had to move the code around and check flags each time.
That and I should have payed more attention to wowdev wiki instead of parsing stuff with info I get from the hex editor ( I wasn't skipping shadow map chunks properly ).
I got all terrain textures loading perfectly now, there are a few things that I still need to fix like stretching the UV's properly, and importing the normals instead of recalculating them.
Anyway it takes 2-3 seconds to load a chunk of terrain with textures (minimap square sized mesh), with my terrible coding I'm surprised I managed to push it to that speed. Like seriously your eyes would bleed if you saw how I code.
Here's a galery of a few chunks I loaded to test the textures working
(Kalimdor) Thunderbluff
(Outlands) Hellfire Peninsula
(Northrend) Grizzly Hills
(Pandaria) Jade Forest
(Draenor) Gorgrond
And supports Legion too :>
(Broken Shores) Stormheim
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: After a very long day I've come to realise the stupid mistakes I was making.
Apparently the terrain alpha map can vary in compression from layer to layer, so I had to move the code around and check flags each time.
That and I should have payed more attention to wowdev wiki instead of parsing stuff with info I get from the hex editor ( I wasn't skipping shadow map chunks properly ).
I got all terrain textures loading perfectly now, there are a few things that I still need to fix like stretching the UV's properly, and importing the normals instead of recalculating them.
Anyway it takes 2-3 seconds to load a chunk of terrain with textures (minimap square sized mesh), with my terrible coding I'm surprised I managed to push it to that speed. Like seriously your eyes would bleed if you saw how I code.
Here's a galery of a few chunks I loaded to test the textures working
(Kalimdor) Thunderbluff
(Outlands) Hellfire Peninsula
(Northrend) Grizzly Hills
(Pandaria) Jade Forest
(Draenor) Gorgrond
And supports Legion too :>
(Broken Shores) Stormheim
Quote: Hey,
Nice work, keep it on!
You use some subversion control I could have a look at? (like GitHub)
Thanks a lot!
Archived author: trineon89 • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: Hey,
Nice work, keep it on!
You use some subversion control I could have a look at? (like GitHub)
Thanks a lot!
Quote: This looks fantastic (though half of the attachments doesn't seem to be working).
Archived author: Fadelol • Posted: 2025-11-04T13:21:44.331727
Original source
Quote: This looks fantastic (though half of the attachments doesn't seem to be working).