Forum > Noggit

Black ADTs, made from Taliis, can't seem to fix them

<< < (2/3) > >>

Skarn:
It is not, if the work you mean is saved in the old adts.

Mjollna:
Found it :)

It can be solved.

The problem comes from MCCV chunk values being set to 0, which, as the wiki says :
" uint8_t blue;                 // setting all values to 0x00 makes a chunk completely black."

So to fix : in every MCCV (MCNK subchunk), change 0 to 7F to add lighting again to your vertex painting.

Edit, more detailed manual fix, for people allergic to scripting :
- Backup your existing ADT, you never know.
- You can use 010 Editor, open your black ADT, select the first complete MCCV chunk (letters included) ->Edit > replace (the bytes you've selected should appear on the "select" box of the replace dialog). Don't close the tab.
- Then find an MCCV chunk on any Northrend (3.3.5) ADT, copy as hex bytes the whole chunk, then open your black ADT, paste the content in the "replace" field.
- Replace all.
- If you have 256 replacements, it should be ok.

Skarn:

--- Quote from: "Mjollna" ---Found it :)

It can be solved.

The problem comes from MCCV chunk values being set to 0, which, as the wiki says :
" uint8_t blue;                 // setting all values to 0x00 makes a chunk completely black."

So to fix : in every MCCV (MCNK subchunk), change 0 to 7F to add lighting again to your vertex painting.

Edit, more detailed manual fix, for people allergic to scripting :
- Backup your existing ADT, you never know.
- You can use 010 Editor, open your black ADT, select the first complete MCCV chunk (letters included) ->Edit > replace (the bytes you've selected should appear on the "select" box of the replace dialog). Don't close the tab.
- Then find an MCCV chunk on any Northrend (3.3.5) ADT, copy as hex bytes the whole chunk, then open your black ADT, paste the content in the "replace" field.
- Replace all.
- If you have 256 replacements, it should be ok.
--- End quote ---

Don't know why you revived this dead topic but if someone needs to do this in a quicker way this is a script setting all MCCV values on ADTs to 7Fh

char sFile[];
int sIndex;
int k;
 
TOpenFileNames z = InputOpenFileNames(  "Select .adt files", "(*.adt)" );
 
     for( k = 0; k < z.count; k++ )
     {
        sFile = z.file[k].filename;
        sIndex = FileOpen(sFile);
          if(sIndex < 0)
          return;
        ClearShader();
        FileSave();
        FileClose();
     }

void ClearShader()
    {
      int z, y, a;    
      RunTemplate( "WoWADT.bt" );
       
        for( z = 0; z < 16; z++ )
             {
                for( y = 0; y < 16; y++ )
                    {
                       for( a = 0; a < 580; a++)
                            {
                                ADT_file.MCNKs.row[z].mcnk[y].MCCV.data[a] = 7Fh;
                            }                          
                    }
             }
     
    }

Steff:
thanks for a solution for this problem to mjollna and to skarn for the script.
btw creation adts with taliis is fine.  if you do it right.  my template is also made in taliis but as people can do things wrong it is easyer to just use it.

Mjollna:
Haha, thank you for the script :)

I've revived the topic when I ran into the issue myself and tried to repair my ADT. I'm so used to create it with Taliis that I have to admit, I didn't even try another tool.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version