Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKarsten_

Posted 25 August 2013 - 06:02 AM

To see how the Quake based engines compile a .map file to a .bsp, have a look at the src of q3bsp (or the simpler q2bsp) tool that comes with gtkradiant.

 

Be warned though, I don't think is an easy feat, even though the .map format looks straight forward, you will soon realize that you will need to generate triangles based on the intersections of the points given. You are probably better off exporting it to the much simpler .obj format before you load it into your engine (gtkradiant 1.5 provides a wavefront .obj exporter).

 

Irrlicht has good support for .bsp (and can load in .pak files) so you might be able to borrow some code from there.

 

There is also the XNA Q3 map loader project which I found was a pretty good starting point. http://q3libxna.codeplex.com

 

Hope this helps you with some of your questions.

 

EDIT: Ah I almost forgot. Someone had reimplemented the q3bsp compiler (http://map3bspc.sourceforge.net/). This is really useful because it is much simpler than q3bsp. Be warned though, it overly utilizes boost shared_ptr (not that boost or shared_ptr is bad, but it typedefs *everything* as a shared_ptr! )


#2Karsten_

Posted 25 August 2013 - 06:01 AM

To see how the Quake based engines compile a .map file to a .bsp, have a look at the src of q3bsp (or the simpler q2bsp) tool that comes with gtkradiant.

 

Be warned though, I don't think is an easy feat, even though the .map format looks straight forward, you will soon realize that you will need to generate triangles based on the intersections of the points given. You are probably better off exporting it to the much simpler .obj format before you load it into your engine (gtkradiant 1.5 provides a wavefront .obj exporter).

 

Irrlicht has good support for .bsp (and can load in .pak files) so you might be able to borrow some code from there.

 

There is also the XNA Q3 map loader project which I found was a pretty good starting point. http://q3libxna.codeplex.com

 

Hope this helps you with some of your questions.

 

EDIT: Ah I almost forgot. Someone had reimplemented the q3bsp compiler (http://map3bspc.sourceforge.net/). This is really useful because it is much simpler than q3bsp. Be warned though, it overly utilizes boost shared_ptr (not that boost is bad, but it typedefs everything as a shared_ptr :( )


#1Karsten_

Posted 25 August 2013 - 05:58 AM

To see how the Quake based engines compile a .map file to a .bsp, have a look at the src of q3bsp (or the simpler q2bsp) tool that comes with gtkradiant.

 

Be warned though, I don't think is an easy feat, even though the .map format looks straight forward, you will soon realize that you will need to generate triangles based on the intersections of the points given. You are probably better off exporting it to the much simpler .obj format before you load it into your engine (gtkradiant 1.5 provides a wavefront .obj exporter).

 

Irrlicht has good support for .bsp (and can load in .pak files) so you might be able to borrow some code from there.

 

There is also the XNA Q3 map loader project which I found was a pretty good starting point. http://q3libxna.codeplex.com

 

Hope this helps you with some of your questions.


PARTNERS