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:WotlK] ADT MH2O - how to manage the uvmap  (Read 2806 times)

sigmur

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
[QUESTION:WotlK] ADT MH2O - how to manage the uvmap
« on: October 17, 2015, 10:14:07 am »
Hi, i made a little tool to set water on an adt.

As of now, everything i expected works fine, you can set liquid & liquid type chunk by chunk, define the subchunks where you want to set liquids and even specify the height of your liquid to make non planes rivers, like the waterfals in the grizzly hills and set liquid transparency.

There is still one thins i do not manage with this, it's the UV map.

According to http://www.wowdev.wiki/index.php ... Depth_data

In some case, the chunks can have an uv map, defined like so :

struct uv_map_entry {
  uint16_t x;
  uint16_t y;
};

I found it using 010 editor, and it match the description, an uv map is a set of two coordinates, u and v, to place a 2d texture on a 3d object.

But i do not see how uint16 can be used for the job. I've joined the 010 template updated with the right water structures since it wasn't mine in the first place.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION:WotlK] ADT MH2O - how to manage the uvmap
« Reply #1 on: October 17, 2015, 04:21:24 pm »
I think uint16 match the actual px position, but I might be wrong. Probably need schlumpf or cromon, however, others might also be able to help.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION:WotlK] ADT MH2O - how to manage the uvmap
« Reply #2 on: October 17, 2015, 05:03:36 pm »
How could they not be used? A uint16_t is a value. you need two values. you have two values. The wiki states that you need to divide them by 8 before using, which you should obviously do as floats to not lose data.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

sigmur

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [QUESTION:WotlK] ADT MH2O - how to manage the uvmap
« Reply #3 on: October 17, 2015, 05:11:57 pm »
Ok ty that's exactly what i wanted to know.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »