A Day of Fun (QIII BSP File Loader)
Written by
on
in
Snaking.
While waiting for a server to get back online today I've been playing with a QIII map (BSP file) loader. Not much to it at the moment, it "parses" the whole file, but the rendering isn't particularly useful.
The loader uses numpy mmap'd files and typed views onto those to do the interpretation of the data. The code doesn't currently render the bezier patches properly (it just renders the patch control points), nor does it load the textures. I'm wondering if the beziers could be nicely handled in a shader to produce really smooth surfaces. The textures should be straightforward to handle, but they'll necessitate a bit of book-keeping wrt what can be rendered together. Current code doesn't handle that.
Anyway, should anyone wish to play with making it useful (or just wishing to play), the code is in OpenGLContext' bzr head as loaders/twitch.py and tests/twitchtest.py. There's nothing much that's OpenGLContext specific, it was just a convenient way to load and explore the models quickly. You have to unpack your pk3 files (and then point twitchtest.py at your maps/*.bsp).
Pingbacks
Pingbacks are closed.
Comments
Comments are closed.