if someone provides me an md2 with this issue, I can look at it.

Fabrice
On May 28, 2011, at 1:22 AM, Choons wrote:

> looking at the code in Broomstick's MD2Parser.as- in the parseUV()
> function I see var j:uint declared but not initialized to 0. Also
> comparing the code in the Broomstick parseUV function with Away3D
> 3.6's Md2.as method, the Broomstick one uses:
> 
> for (var i : uint = 0; i < _numST; i++) {
>                               _uvs[j++] = _byteData.readShort() / _skinWidth;
>                               _uvs[j++] = _byteData.readShort() / _skinHeight;
>                       }
> 
> whereas 3.6 does it this way:
> 
> for (i = 0; i < num_st; i++)
>                _uvs.push(new UV(md2.readShort() / skinwidth, 1 -
> ( md2.readShort() / skinheight) ));
> 
> notice how 3.6 subtracts  (md2.readShort() / skinheight) from 1 but
> Broomstick doesn't. I changed the Broomstick code to do it the way 3.6
> does and the texture looks closer to right but is still no in the
> right orientation. Can the devs comment on this?
> 
> On May 27, 5:34 pm, Choons <[email protected]> wrote:
>> eh no it didn't work, but I'm sure it is something like that. Guess
>> I'm going to have to have a look at the md2 parser code and see if I
>> can figure out how it works
>> 
>> On May 27, 12:05 pm, Leo <[email protected]> wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Hi Choons,
>> 
>>> I ran into a couple of issues exporting .md2 and importing into Away3D
>>> and you may be experiencing something similar with 3DS.
>> 
>>> In my case I had to do this to solve the problem:
>>> 1) invert the normals on the mesh
>>> 2) export to md2
>>> 3) import in Away3D then multiply the z axis scale by -1 in the code.
>> 
>>> I think 3DS and the tool I use have a z axes pointing in opposite
>>> directions so you may only need to invert the normals in your case.
>>> I hope that helps.
>> 
>>> I am in Orange County California by the way and looking to connect
>>> with others interested in collaborating on side/weekends-projects
>>> without deadlines but with real goals.
>>> Where are you located?
>> 
>>> On May 25, 10:24 pm, Choons <[email protected]> wrote:
>> 
>>>> Hi - I've been exporting some animated 3ds max meshes into md2 format
>>>> to use in Broomstick. I can get the models into Broomstick with their
>>>> animations playing, but the UV texture mapping is all messed up. I
>>>> assumed it was a problem with the MaxScript exporter I'm using until I
>>>> loaded the models into Milkshape and they mapped the texture
>>>> perfectly. Is anyone having this problem as well?

Reply via email to