Assistance requested: Coding Project
I’ve been pottering around with programming for a while, especially making use of the Qt framework. Qt is a powerful cross-platform toolkit used for developing GUI-based software, command-line tools, consoles, operating systems, and some other stuff.
The program I’m posting about here is a simple (and dreadfully incomplete) model viewer. It started off as a desire to look at the models from one of my favourite games, Anachronox, for which I was unable to find a viewer at all (let alone one that worked on Linux). Based on Quake 2’s MD2 model format, it’s old and relatively straightforward, and probably not of much interest to most people, but the supported formats can be expanded, and I plan to add more in the future.
Why post this? I would like some input that I can’t necessarily manage myself, and am not ready to release it to the world at large. I have no idea if it works on Windows (or OSX), so someone would need to test that. While it should be pretty easy to use, I need to see if it actually is easy to use. I need to know if it requires more necessary features. I need to see if it can be crashed. I need a name for it, too.
So what can it actually do?
- Load meshes from Quake 2, Anachronox (provisionally) and Kingpin.
- View with or without texture.
- Load external textures onto these meshes.
- View in wireframe mode.
- View animations from Quake 2 models.
- Show and hide docks (docks don’t function yet, they’re there for show).
The viewer has basic camera functionality; use the LMB to spin model around, RMB to spin a different way, mouse wheel to zoom, arrow keys to pan model. See if there are any other keys that currently work.
Ok, to get it running…. at this very moment, I don’t have any compiled binaries to distribute other than Linux (64-bit). Until I figure out how to make cross-releases, if you want to help test this out you will need the Qt SDK to be installed, and I highly recommend using the Qt Creator IDE to open and compile the project (and see my ugly code to boot!). The SDK and Qt Creator can be found here. The viewer code (and some example models) can be found here.
Try not to distribute this around too much, as I said it is woefully dreadfully incomplete, currently contains no README or licensing information, and generally isn’t ready for release.
Thanks for looking.
Comments
Windows
So do you want us to try and build a windows version and let you know what works / doesn’t?
Yes please
If it’s not too much trouble; while the framework is cross-platform, I’m not sure if there will be anything extra required to install the SDK, or for it to run in Windows.
Comments
One thing to mention is that loading the model doesn’t necessarily automatically load a texture. This depends on how the original game itself handled texture management. If a model e.g. jorg doesn’t show up with a texture, you can use the “Load Texture…” menu option to load the actual texture file (jorg.pcx).
The second thing you may notice when toggling the texture and wireframe options. With texturing enabled, the wireframe will also load the texture, meaning that the lines don’t necessarily show up clearly. Would it be a good idea to ensure that wireframe mode always shows up in white regardless of texturing being on or off?
So confused
Im so confused WtF you’re talking about… And my brain hurts. Sorry I can’t be of any assistance… Kazashi probably knew that already!
One or the other (wireframe or texture)
I can’t see the use case for both at once. Make it either/or.
Jorg PCX texture fails to load for me. I can load the dog texture on top of Jorg, but the Jorg texture just causes a “failed to load texture” error (or something like that).
Cool
I’ve fixed the wireframe so it’s not textured. In future I think I’ll make the menu options similar to what is given in CAD/modelling programs i.e. bounding box, wireframe, solid, textured.
Interesting that the PCX file isn’t loading for you ltmon…. I’ll look and see if I can add some extra output that can tell me what exactly it is that Qt can’t load (e.g. whether certain image formats aren’t automatically supported). Would you be able to convert that PCX to a TGA and see if it loads? I’m guessing it should, but I am curious :)
New Version
I’ve made a few changes to the viewer and uploaded a copy, grab it at the same link as above.
Changes:
Apparently Qt is not necessarily compiled/installed with a few image formats by default, hence the reason some textures may fail to load. Failure to load a texture file will now result in a debug description of what formats are supported. If I have to, in future I may write a PCX image loader to ensure that such files are loaded (given their common use during game development at that time).
Thanks to anyone who has decided to take a look, it’s very helpful to see things from a different perspective other than mine.
Post new comment