Megatextures research

Get your graphics formats figures out here! Got details for others? Post here!
User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Re: Megatextures research

Post by Tosyk » Sun Apr 16, 2017 8:32 am

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?
Thank you for all you do here
my blog | my forum

luxox18
mega-veteran
mega-veteran
Posts: 176
Joined: Fri Jul 29, 2011 9:18 pm
Has thanked: 54 times
Been thanked: 42 times

Re: Megatextures research

Post by luxox18 » Sun Apr 16, 2017 10:48 am

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.

User avatar
zaramot
double-veteran
double-veteran
Posts: 767
Joined: Wed Jan 05, 2011 12:41 pm
Has thanked: 39 times
Been thanked: 818 times

Re: Megatextures research

Post by zaramot » Sun Apr 16, 2017 1:22 pm

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
Making model-import scripts, PM

User avatar
Tosyk
double-veteran
double-veteran
Posts: 953
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 227 times
Been thanked: 123 times
Contact:

Re: Megatextures research

Post by Tosyk » Sun Apr 16, 2017 6:42 pm

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?
Thank you for all you do here
my blog | my forum

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Tue Apr 18, 2017 9:56 pm

I was able to pack Megatextures back into the game

https://youtu.be/j98grTHAvns

Image

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 312 times

Re: Megatextures research

Post by volfin » Tue Apr 18, 2017 11:32 pm

Now that's even more impressive than decoding them. Nice job. :D

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 312 times

Re: Megatextures research

Post by volfin » Tue Apr 25, 2017 4:46 pm

So is it near to release? I look every day to see. :cry:

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Tue Apr 25, 2017 5:48 pm

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.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 312 times

Re: Megatextures research

Post by volfin » Tue Apr 25, 2017 6:23 pm

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

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Tue Apr 25, 2017 6:54 pm


daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Thu Apr 27, 2017 7:27 pm

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.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Sat Apr 29, 2017 6:36 am

Tool released (early beta) http://aviacreations.com/wraith

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 312 times

Re: Megatextures research

Post by volfin » Sat Apr 29, 2017 8:05 am

So this looks to support Doom only. When will Evil Within support be coming?

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2343
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 55 times
Been thanked: 2022 times

Re: Megatextures research

Post by daemon1 » Sat Apr 29, 2017 8:22 am

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.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 312 times

Re: Megatextures research

Post by volfin » Sat Apr 29, 2017 9:31 pm

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:

Post Reply