Forums WoW Modding Discussion Modeling [Archive] [WIP] Machinima Tool

[Archive] [WIP] Machinima Tool

[Archive] [WIP] Machinima Tool

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#1
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 [Image: tongue.gif]

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
[Image: attachment.php?attachmentid=26654&stc=1]

Progress....

[Image: attachment.php?attachmentid=26479&stc=1]



[Image: attachment.php?attachmentid=26480&stc=1]
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:

[Image: attachment.php?attachmentid=26481&stc=1]

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.
[Image: paperclip.svg] Attached Thumbnails
[Image: 26654d1467116396t-wip-machinima-tool-yzqz4vi-jpg]

[Image: 26477d1466422446t-wip-machinima-tool-9f7bba7c6a-jpg]

[Image: 26478d1466422541t-wip-machinima-tool-62d698bed4-jpg]

[Image: 26479d1466422671t-wip-machinima-tool-e6abcb2568-jpg]

[Image: 26480d1466422748t-wip-machinima-tool-e4c9a07e9e-jpg]

[Image: 26481d1466422963t-wip-machinima-tool-7eaaa9a256-jpg]
rektbyfaith
11-04-2025, 12:21 PM #1

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 [Image: tongue.gif]

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
[Image: attachment.php?attachmentid=26654&stc=1]

Progress....

[Image: attachment.php?attachmentid=26479&stc=1]



[Image: attachment.php?attachmentid=26480&stc=1]
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:

[Image: attachment.php?attachmentid=26481&stc=1]

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.
[Image: paperclip.svg] Attached Thumbnails
[Image: 26654d1467116396t-wip-machinima-tool-yzqz4vi-jpg]

[Image: 26477d1466422446t-wip-machinima-tool-9f7bba7c6a-jpg]

[Image: 26478d1466422541t-wip-machinima-tool-62d698bed4-jpg]

[Image: 26479d1466422671t-wip-machinima-tool-e6abcb2568-jpg]

[Image: 26480d1466422748t-wip-machinima-tool-e4c9a07e9e-jpg]

[Image: 26481d1466422963t-wip-machinima-tool-7eaaa9a256-jpg]

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#2
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

rektbyfaith
11-04-2025, 12:21 PM #2

Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#3
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.

[Image: attachment.php?attachmentid=26485&stc=1]

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.

[Image: attachment.php?attachmentid=26486&stc=1]

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?

[Image: attachment.php?attachmentid=26487&stc=1]
[Image: paperclip.svg] Attached Thumbnails
[Image: 26487d1466456562t-wip-machinima-tool-145e908f91-jpg]
rektbyfaith
11-04-2025, 12:21 PM #3

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.

[Image: attachment.php?attachmentid=26485&stc=1]

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.

[Image: attachment.php?attachmentid=26486&stc=1]

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?

[Image: attachment.php?attachmentid=26487&stc=1]
[Image: paperclip.svg] Attached Thumbnails
[Image: 26487d1466456562t-wip-machinima-tool-145e908f91-jpg]

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#4
Archived author: ev0 • Posted: 2025-11-04T13:21:44.331727
Original source

Quote: holy **** this is great work!
rektbyfaith
11-04-2025, 12:21 PM #4

Archived author: ev0 • Posted: 2025-11-04T13:21:44.331727
Original source

Quote: holy **** this is great work!

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#5
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 [Image: tongue.gif]
rektbyfaith
11-04-2025, 12:21 PM #5

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 [Image: tongue.gif]

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#6
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

rektbyfaith
11-04-2025, 12:21 PM #6

Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#7
Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

Quote: Originally Posted by karliky
[Image: lastpost-right.svg]

Join us at #modcraft in irc.quakenet if you need help parsing the terrain files [Image: tongue.gif]

That's a great offer, thanks [Image: smile.png]
rektbyfaith
11-04-2025, 12:21 PM #7

Archived author: Flavius • Posted: 2025-11-04T13:21:44.331727
Original source

Quote: Originally Posted by karliky
[Image: lastpost-right.svg]

Join us at #modcraft in irc.quakenet if you need help parsing the terrain files [Image: tongue.gif]

That's a great offer, thanks [Image: smile.png]

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#8
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 [Image: wink.png]

(Kalimdor) Thunderbluff

[Image: attachment.php?attachmentid=26522&stc=1]

(Outlands) Hellfire Peninsula

[Image: attachment.php?attachmentid=26523&stc=1]

(Northrend) Grizzly Hills

[Image: attachment.php?attachmentid=26524&stc=1]

(Pandaria) Jade Forest

[Image: attachment.php?attachmentid=26525&stc=1]

(Draenor) Gorgrond

[Image: attachment.php?attachmentid=26526&stc=1]

And supports Legion too :>

[Image: attachment.php?attachmentid=26527&stc=1]

(Broken Shores) Stormheim

[Image: attachment.php?attachmentid=26528&stc=1]
rektbyfaith
11-04-2025, 12:21 PM #8

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 [Image: wink.png]

(Kalimdor) Thunderbluff

[Image: attachment.php?attachmentid=26522&stc=1]

(Outlands) Hellfire Peninsula

[Image: attachment.php?attachmentid=26523&stc=1]

(Northrend) Grizzly Hills

[Image: attachment.php?attachmentid=26524&stc=1]

(Pandaria) Jade Forest

[Image: attachment.php?attachmentid=26525&stc=1]

(Draenor) Gorgrond

[Image: attachment.php?attachmentid=26526&stc=1]

And supports Legion too :>

[Image: attachment.php?attachmentid=26527&stc=1]

(Broken Shores) Stormheim

[Image: attachment.php?attachmentid=26528&stc=1]

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#9
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!
rektbyfaith
11-04-2025, 12:21 PM #9

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!

rektbyfaith
Administrator
0
11-04-2025, 12:21 PM
#10
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).
rektbyfaith
11-04-2025, 12:21 PM #10

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).

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)