Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: spik96 on June 04, 2015, 07:22:19 pm

Title: [SOLVED] Questions about skin files
Post by: spik96 on June 04, 2015, 07:22:19 pm
Hi !
I was tinkering with submeshes when something strange showed up :
On the wiki page for .skins, http://www.pxr.dk/wowdev/wiki/index.php ... otLK/.skin (http://www.pxr.dk/wowdev/wiki/index.php?title=M2/WotLK/.skin" onclick="window.open(this.href);return false;) ,
You can see the Submesh structure has a "Level", an unsigned 16 bits integer. So far, that's fine. I don't know what |ed means but that's not my main problem.

I use the binary templates with 010 Editor like a lot of people here, but they don't show this integer.

Who's right ? Who's wrong ?

Also, in the Skin header, what are Indices supposed to be ? They can't refer to vertices in the model. In my model (the classic Frog.m2), there are 250 vertices. Values in Indices are up to 2548... I really don't get it. I would expect them to be between 0 and 249...
Title: Re: Questions about skin files
Post by: schlumpf on June 04, 2015, 10:50:29 pm
wiki is right.

binary or-ed. (or level*(2^16)+start).

indices are into the m2's list of vertices.
Title: Re: Questions about skin files
Post by: spik96 on June 04, 2015, 11:00:11 pm
Thanks.
Do you mean Indices don't refer to some kind of index in the global vertex list but to an other list of indices ?
Do you speak about the BoneIndices arrays there is in each Vertex in the global vertex list ?
BTW, startThings look already big to me, I must have failed somewhere in my reading because if they are also increased due to the level they will become gigantic.
I try to convert these to TBC where there is no "level", so I guess I'll have to compute it and put it directly in the startThings.
Title: Re: Questions about skin files
Post by: schlumpf on June 04, 2015, 11:12:18 pm
the indices at skin.ofsIndices refer to vertices at m2.ofsVertices.

for small models, level is usually 0, especially with models prior to mop.

the wiki is outdated for tbc, so there might be a "level" field there as well. I wouldn't think so, though.

you can't put it directly into start* as level exists due to start* not being large enough to hold that big values in the first place. Any model with level != 0 will not be properly convertible.
Title: Re: Questions about skin files
Post by: spik96 on June 04, 2015, 11:27:45 pm
According to the ID was 32 bits in TBC and 16 bits in LK so maybe it was in fact ID 16 bits + level 16 bits already at the time. I will investigate.
My values for indices, anyway, are numbers from 1 to 2548 while I have only 250 vertices in the M2 which is pretty strange, I must have made a mistake somewhere.

It's still Black Magic how TBC had 4 views for every model while, one expansion later, they went with 1-4 views. Blizzard are expert at data witchcraft.
Title: Re: Questions about skin files
Post by: schlumpf on June 04, 2015, 11:44:35 pm
It never had values above 16 bit, for sure. If there was a level field, I can't guarantee. You can probably just copy that block and try.

Surely a mistake.

The number of views was always dynamic and not forced to 4. If you want to fill up to four, just duplicate the last.
Title: Re: Questions about skin files
Post by: spik96 on June 05, 2015, 03:09:37 pm
Quote from: "schlumpf"
It never had values above 16 bit, for sure. If there was a level field, I can't guarantee. You can probably just copy that block and try.

Surely a mistake.

The number of views was always dynamic and not forced to 4. If you want to fill up to four, just duplicate the last.

Thanks a lot. The TBC wiki is pretty old but really useful anyway.
My problems about this are now solved.