Quake BSP loading

About Monkey 2 Forums Monkey 2 Projects Quake BSP loading

This topic contains 20 replies, has 6 voices, and was last updated by  Hezkore 1 year, 9 months ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #9166

    Hezkore
    Participant

    I’m working on a Quake 1 BSP loader.
    For those of you who don’t know what “BSP” is, it’s basically the map format for Quake 1 (and other Quake games)
    The fun thing about Quake 1’s BSP files is that they contain everything you need!
    Unlike Quake 3 BSP files where you need separate pack files for textures and “shaders” and all that, Quake 1 has all the textures and information you need inside the BSP file itself.

    Sadly, Assimp doesn’t load Quake 1 BSP files.
    So I’ve decided to load them myself!

    I’ve gotten the geometry to work, along with the normals for surfaces.
    And I have all the information for textures, but I’m still figuring out how to apply them properly to the mesh.
    Here’s a shot from the start level of Quake 1.

    #9167

    AdamStrange
    Participant

    a question for you…

    How are you going to support triggers, doors, movable floors, etc?

    Also collision with the map?

    is the map above showing the normals?

    #9168

    Hezkore
    Participant

    I did triggers, doors and all that in BlitzMax and MiniB3D, so I’ll use the same technique as before.
    The BSP splits up movable stuff as their own mesh, so I can move them around easily.
    I would probably make entity related things its own module though.

    I’m not even sure Mojo3D has any sort of collision code outside of the Bullet Physics stuff, so that might be trickier.
    But I do have all the wall and floor information for the “section” the player/camera is in, so I wouldn’t have to check collision against the entire mesh, just the area you’re in.
    It’ll be sorted over time!

    Right now I’m just trying to get textures to work properly.
    They can be animated in different ways, so I’ll have to figure out how to do that in Mojo3D too.

    #9170

    Hezkore
    Participant

    Standard textures are now working.
    Trying to make my own shaders for sky and liquids.

    #9184

    cocon
    Participant

    Looks great!

    #9195

    Hezkore
    Participant

    Thanks cocon! 🙂

    I wonder how I’d add anisotropic filtering…

    A Gif for you guys.

    #9196

    Hezkore
    Participant

    I’ve managed to get material transparency working for the textures that use a mask.
    I also noticed that Mojo3D really doesn’t like a lot of materials per mesh, even if they’re not actually used!
    So I’ve optimized that part quite a bit, I’m now getting solid 60 FPS at places where I used to get 8 FPS heh.

    #9210

    Hezkore
    Participant

    Animated textures are now supported.
    Working on shader for water and sky next.

    #9212

    Pakz
    Participant

    Nice!

    It did not age well though vanilla quake 1 🙂

    #9213

    Mark Sibly
    Keymaster

    Looks very quake-y, love it!

    #9214

    Hezkore
    Participant

    Haha I love the look of Quake 1!
    But don’t let my screenshots fool you, the filtering is awful and there are no lightmaps since Mojo3D doesn’t support multiple texture coords atm.
    I’ve already loaded the Quake 1 maps in BlitzMax with the lightmaps, and this is how it looks there:

    High quality link

    The Monkey 2 version will get there eventually! 🙂
    Maybe even use realtime lights? 😮

    #9215

    Pakz
    Participant

    That looks better 🙂 I was also impressed with Quake works a while ago when I saw a version running on a faster Amiga.

    Had a lot of fun in the later 90’s with quake online. Did cost me a about half a months salary on the phonebill once though 🙂

    #9237

    EdzUp
    Participant

    looking nice might have to fire up Quake 1 it’s been a while 🙂

    #9259

    Hezkore
    Participant

    A friend of mine helped me out with the liquid shader, making it match Quake as much as possible:

    #9260

    Mark Sibly
    Keymaster

    Sweet!

    Also, I added an extra set of texture coords to Vertex3f (now in develop branch). Still not sure how different vertex formats will work, but don’t want to let it hold up any cool stuff either.

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.