View Full Version : converting coord sytems

01-16-2004, 02:36 AM
hey all i could use a little help with a problem I'm having

i emailed valve and ask about the hl coord system

the response i got was hl uses x,y,z = pitch,yaw,roll

so i thought OK LW is x,y,z yaw,pitch,roll

should be a simple swap of data on the output correct

so i swapped the x and y data on the output well that didn't do exactly what i had hoped for

so now i need to figure out how to flip all the polys in lscript
as the models come out turned inside out

or they look like they would if i go into LW and hit f in modeler to flip all the polys around

now there is also as far as i can tell a 90 degree change as well in hl the z+ is up and not depth like in LW

so I'm looking for any suggestions as to an easy or simple way to convert all this

01-16-2004, 04:56 AM
well after playing around all night i just discovered many things that i was not aware of
and i now understand why lightwave is not used as much as it could be for game dev

it is a very stressfull thing trying to get model and animation data out of lightwave and into format whatever

the docs and info for plugins and lscript is very very lacking

end rant


01-17-2004, 04:31 PM
Ok were you refering about rotation values or just convert base coordinates of the original mesh to HL coord system?

Well if z is in HL what y is in LW and vice versa, just switch y and z values...
If polys are flipped you need to reverse the vertex order of the polys i guess.

For the rotation system, that's not as trivial to convert if it uses different order of axis. I can only tell you how to convert it when you create a rotation matrix and then "extract" the values for the new coord system.

01-19-2004, 05:59 AM
well lynx3d you were right i swapped the z and y on output and the revesed the point order now it is all a ok

well for the models anyway not onto the bones hehe

thanks for the tips the point order was the one that had me really stump
didnt even think about that