This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] 1024x512 skin texture?  (Read 1023 times)

Chase

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 116
    • View Profile
[QUESTION] 1024x512 skin texture?
« on: August 10, 2014, 05:22:26 am »
When I use the new skin textures that are 1024x512, the game crashes.

Scaling the texture down will make it more blurry, and will need major re-uv mapping.
Moving the face to the bottom left will override other assets that space uses, and still need major re-uv mapping.

What can I do to get it working?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] 1024x512 skin texture?
« Reply #1 on: August 10, 2014, 11:34:47 am »
Afaik, the only way to fix it is to scale it. You may do that automated, though: Just _enlarge_ the texture to 1024x1024 by adding white space below, then write a little script to halfen all texture coordinates in y direction:

Untested:

Code: [Select]
#include <cstdio>
#include <vector>
#include <stdint.h>

int main (int, char** argv)
{
  FILE* file_in (fopen (argv[1], "r"));
  FILE* file_out (fopen (argv[2], "w+"));

  fseek (file_in, 0, SEEK_END);
  std::vector<char> data (ftell (file_in));

  fseek (file_in, 0, SEEK_SET);
  fread (&data[0], data.size(), 1, file_in);

  uint32_t* nVertices (reinterpret_cast<uint32_t*> (&data[0x3c]));
  uint32_t* ofsVertices (reinterpret_cast<uint32_t*> (&data[0x40]));

  float* tex_coord_y
    (reinterpret_cast<float*> (&data[*ofsVertices + 0x24]));
  for (uint32_t i (0); i < *nVertices; ++i)
  {
    *tex_coord_y = *tex_coord_y * 0.5;
    tex_coord_y += 0x30;
  }

  fwrite (&data[0], data.size(), 1, file_out);

  fclose (file_out);
  fclose (file_in);

  return 0;
}
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Chase

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 116
    • View Profile
Re: [QUESTION] 1024x512 skin texture?
« Reply #2 on: August 10, 2014, 04:37:13 pm »
What is this script for? 010 Editor?

Also thinking that this will still mess up the armor textures, as stuff like chest and legs will cover the face, which is on the right side.
I tried finding a patch that brought pandas to wotlk to see how they did the skins, but now that I'm actually trying to look for them I can't find any.

And Another little problem is that I can convert the MoP male panda with M2Mod4, but the female panda gives me:

Quote
Assertion failed: IndexOut < SubsetVertexCountOut, file .CM2.cpp, line 307

This application has requested the Runtime to terminate it in an unusual way.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] 1024x512 skin texture?
« Reply #3 on: August 10, 2014, 06:26:53 pm »
That's c++. You would need to compile it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »