1
Newcomer's Board / Re: Vagrant Story [PSX] SHP Model Format
« on: May 03, 2013, 02:02:19 pm »
The playstation lacked a floating point unit so all psx games use fixed point in place of floating point. The values are stored as normal signed integers. The Q format used can vary widely but Q16.16 or Q8.8 are the most logical choices. I Just do a straight cast to float so the floats are integers in the range -65535.0 to +65535.0.
Another thing to watch out for is that the polygons index the vertices by a sort of compromise shifted offset. Its one shift left to make it a true offset and two shift rights are reqjired to make it an array index.
There are duplicate polygons no idea why but they are there and if you figure out why some polygons need to be duplicated please let me know.
Some models still don't parse correctly, perhaps these models we works in progress that got cut from the final production.
Any ways I will share my shp / wep model viewer and its source code via PM. It is not animated but you can learn from it.
Please keep in touch with me.
Another thing to watch out for is that the polygons index the vertices by a sort of compromise shifted offset. Its one shift left to make it a true offset and two shift rights are reqjired to make it an array index.
There are duplicate polygons no idea why but they are there and if you figure out why some polygons need to be duplicated please let me know.
Some models still don't parse correctly, perhaps these models we works in progress that got cut from the final production.
Any ways I will share my shp / wep model viewer and its source code via PM. It is not animated but you can learn from it.
Please keep in touch with me.
Home
Help
Login
Register