Page 3 of 8

Re: Megatextures research

Posted: Sun Apr 16, 2017 8:32 am
by Tosyk
luxox18 wrote:if I remember, there is a command for Brink that allows to dump all textures as a big tile
can you give more information on this?

Re: Megatextures research

Posted: Sun Apr 16, 2017 10:48 am
by luxox18
Tosyk wrote:
luxox18 wrote:if I remember, there is a command for Brink that allows to dump all textures as a big tile
can you give more information on this?
all idtech games with virtualtextures have a command that allows you to dump all textures from a scene in form of a big tile (diffuse, specular and normal) like the Wolfenstein new order tool by m0xf.

In almost all games this command is locked.
In the alpha version of Doom the command was enabled but you only obtain three big back dds tiles.

for Brink the command is writeVirtualPageFile 0 or 1 or 2 , each number is a mip, zero is the highest mip but I think that the game crashes.

also there is other command called writeImage where you can obtain a texture if you know the exact name in game files from materials.

Re: Megatextures research

Posted: Sun Apr 16, 2017 1:22 pm
by zaramot
If you want only characters textures, quickbms script extracting them in small packages (.unknown extension and hash as a name) - each set of textures for character, though they are headerless. I made script for them long ago, can't find it unfortunatelly, only for models.

Here's an example of texture set file.

https://www.sendspace.com/file/n5m0l4

And here's how they comes out

https://www.sendspace.com/file/7il0ji

Re: Megatextures research

Posted: Sun Apr 16, 2017 6:42 pm
by Tosyk
zaramot wrote:If you want only characters textures, quickbms script extracting them in small packages (.unknown extension and hash as a name) - each set of textures for character, though they are headerless. I made script for them long ago, can't find it unfortunatelly, only for models.

Here's an example of texture set file.

https://www.sendspace.com/file/n5m0l4

And here's how they comes out

https://www.sendspace.com/file/7il0ji
thanks, where can I find script for models?

Re: Megatextures research

Posted: Tue Apr 18, 2017 9:56 pm
by daemon1
I was able to pack Megatextures back into the game

https://youtu.be/j98grTHAvns

Image

Re: Megatextures research

Posted: Tue Apr 18, 2017 11:32 pm
by volfin
Now that's even more impressive than decoding them. Nice job. :D

Re: Megatextures research

Posted: Tue Apr 25, 2017 4:46 pm
by volfin
So is it near to release? I look every day to see. :cry:

Re: Megatextures research

Posted: Tue Apr 25, 2017 5:48 pm
by daemon1
volfin wrote:So is it near to release? I look every day to see. :cry:
Must be soon. We still have some issues with normals, and you know I HATE normals, mean vertex normals in a model. They just dont work normally in blender if you know what i mean.

If we can't figure it out any soon, we'll just release it like that.

Re: Megatextures research

Posted: Tue Apr 25, 2017 6:23 pm
by volfin
daemon1 wrote:
volfin wrote:So is it near to release? I look every day to see. :cry:
Must be soon. We still have some issues with normals, and you know I HATE normals, mean vertex normals in a model. They just dont work normally in blender if you know what i mean.

If we can't figure it out any soon, we'll just release it like that.
Yep I can't say I've ever had any success with importing vertex normal in blender. the closest was what I did with Far Cry Primal, and it's still not exactly right. Keep up the good work. :)

Re: Megatextures research

Posted: Tue Apr 25, 2017 6:54 pm
by daemon1

Re: Megatextures research

Posted: Thu Apr 27, 2017 7:27 pm
by daemon1
You can expect the tool release very soon now, maybe even today. And while you wait, here's The brief history of megatexture research.

March 22nd

The first look into mega2 files. I found they contain tons of small pieces - tiles. From xentax thread I got info that's probably HDP or JXR compression. After downloading HDP specs and sources it becomes clear why nobody was able to decode it before. Walls of code. Very complicated algorithm, even having the specs.

March 25th

I found decoding routine in Doom and got the first tile decoded by it from memory.

Image

Making standard headers for the raw data (with all available options tried) surely fails.

Image

March 26-30th

I needed to finish cloth extraction for Hitman 5, and D-Walker animations for MGSV, so nothing was done here.

April 3rd

After some days of studying the format specs and raw data I came to conclusion that it was modified, non standard HDP format. So the only way to decode it was to carefully study their routine step-by-step and find what exactly was changed. But it looked so tangled up even after some debugging and multiple reading through the doc, that I said: "no. its TOO complex. i think i wont be able to do this"

April 7th

After some more debugging and studying, and changing the code, the very first monochrome tile was decoded. I couldn't believe it first, but it couldn't be just by accident. This was correctly decoded tile.

Image

April 8th

More in-depth research showed that most changes were made deep inside of the adaptive variable-length bitstream reading which mostly concerned colored images. Some changes found, and I could decode about half of the image, and then it fails:

Image

April 9th

Lots of hard work to dig into the very core of this crazy algorithm, many more changes were found and at some point I got this:

Image

This was the very first 3-channel tile (not very colorful, but its colored) decoded from megatexture. After that, It was all history. Just some little tweaks and checks, was a little bit different in all games, but the problem was finally solved. You can count, it took 13 days.

Re: Megatextures research

Posted: Sat Apr 29, 2017 6:36 am
by daemon1
Tool released (early beta) http://aviacreations.com/wraith

Re: Megatextures research

Posted: Sat Apr 29, 2017 8:05 am
by volfin
So this looks to support Doom only. When will Evil Within support be coming?

Re: Megatextures research

Posted: Sat Apr 29, 2017 8:22 am
by daemon1
volfin wrote:So this looks to support Doom only. When will Evil Within support be coming?
Yes, Evil Within is also planned. Please understand, we can't support all games at once, we need to do them one by one.

Re: Megatextures research

Posted: Sat Apr 29, 2017 9:31 pm
by volfin
Are you going to support other model formats? I use Blender and 3dsMax, not Maya. :(

Edit: nevermind, I see now you can choose the file format on the file Pane. Derp. :oops: