Page 1 of 1

[SOLVED] Porting another model format...

Posted: Wed Mar 04, 2009 8:16 pm
by Linaxys
Hello,
I would like to port Renderware model format into my project,
here's a sample RWX model, a floor :

Code: Select all

ModelBegin
#stone3
Surface .5 .3 0
Color .6 .6 .6
  ClumpBegin
    Vertex -.4 0 .4 UV 0 0
    Vertex .4 0 .4 UV 4 0
    Vertex .4 0 -.4 UV 4 4
    Vertex -.4 0 -.4 UV 0 4
    Quad 4 3 2 1
    Texture stone3
    TextureModes Foreshorten 
    Quad 1 2 3 4
  ClumpEnd
ModelEnd
Could you please where I should look to create a mesh, create a surface on it, set the surface's vertices, set it's texture and how to make a Quad from the vertices ?

Thanks !

Posted: Wed Mar 04, 2009 8:39 pm
by hybrid
Use the code from the STL loader. It's the most simple format we support, but it should have all the stuff you use. Just make sure that you flip the indices, because you have counter-clockwise orientation of faces 8)

Posted: Wed Mar 04, 2009 8:41 pm
by Linaxys
Thank you for your suggestion, it's indeed easier to understand than 3DS and Collada :)