Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Megatextures research

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

Re: Megatextures research

Post 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?
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: 46 times

Re: Megatextures research

Post 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.
User avatar
zaramot
double-veteran
double-veteran
Posts: 783
Joined: Wed Jan 05, 2011 12:41 pm
Has thanked: 39 times
Been thanked: 855 times

Re: Megatextures research

Post 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
Making model-import scripts, PM
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: Megatextures research

Post 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?
Thank you for all you do here
my blog | my forum
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post by daemon1 »

I was able to pack Megatextures back into the game

https://youtu.be/j98grTHAvns

Image
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Megatextures research

Post by volfin »

Now that's even more impressive than decoding them. Nice job. :D
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Megatextures research

Post by volfin »

So is it near to release? I look every day to see. :cry:
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post 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.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Megatextures research

Post 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. :)
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post by daemon1 »

daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post 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.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post by daemon1 »

Tool released (early beta) http://aviacreations.com/wraith
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Megatextures research

Post by volfin »

So this looks to support Doom only. When will Evil Within support be coming?
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Megatextures research

Post 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.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Megatextures research

Post 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:
Post Reply