Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

This is long, so the short question is: What's the best/right/standard set of technologies for creating 3D models and incorporating them into a game such that the complexity for the artist is kept to a minimum while also keeping things relatively sane for the game authors?

The long story:

I am a developer for an open source space game called Pioneer. We currently have a custom 3D model format based around a Lua script that defines how the various objects in the model hang together.

The existing format has a lot of flexibility. It can load Wavefront objects or build its own from polygon primitives. It has a dynamic function that can emit tailored geometry each frame based on game state. It can also define various attributes and properties such as special collision surfaces, simple waypoints (use for automated docking with a space station), and so forth.

The feature set is more than enough for what we need right now, but its implementation leaves a lot to be desired. The actual script reader is almost 3000 lines of spaghetti. Model scripts are messy and require too much knowledge of the game engine. Matters are made worse by that fact that the original author is not readily available at the moment, so its left to others with little understanding of this system to fix things. We're also hearing some of our users say they can drive a modelling program just fine, but find the required Lua script to be completely incomprehensible. We don't want to turn these contributors away, so we need to find a way to help them.

(Some examples of model scripts, for the interested, can be found in our models repository).

As a result, I'm looking for a replacement. Ideally, I'd like to be able to point interested parties at something like Blender, tell them to draw a ship, define a few special properties and then export it, and that'd be that. On the code side, I'd very much like to be able to integrate a good third-party library that I can hand one of these files and just poke an object to get the necessary data back out. Anything that we can shift on to other, more competent projects is a win.

My question then, is what to use? I've done some searching and the best approach at this point appears to be to require artists to export their model in COLLADA format and then write a utilty based on FCollada to convert the export to some internal format. That's a little heavier than I think I want, but keeps things as easy as possible for the artist, which is the major requirement.

I'm very new to world of 3D modelling however, so I wouldn't be at all surprised to learn that there is a better way. Recommendations of standard/best practice for this sort of thing would be greatly appreciated.

share|improve this question
add comment

2 Answers 2

up vote 9 down vote accepted

I usually keep my own format internally, and a standardised format externally. The artist only sees the standard format and my engine can only load the optimized internal format. This way you won't have to have model loading code in engine, it can all be done in some nice high level language as a compile step. I usually use a existing build system that rebuilds an art folder on demand, will only rebuild changed content.

Pros:

  • High performance loading (data already laid out as engine wants it)
  • Separation of code from engine
  • Standard format for artists

Cons:

  • Extra step for artists (can be solved with a content pipeline)
  • Limited subset of features (but you have to have that anyway)
share|improve this answer
    
I would agree this is the right approach. Trying to use one format for everything is going to give you all sorts of inefficiencies in odd places, and I've gone through this coding my own engine before, and the benchmarks were breathtaking (and not in a good way) when dealing with external format loading. Optimize your models for your code on the backend, use a standard format for the contributors on the frontend, and if you ever need to change formats... well, you have all the source data in a standard format. Hard to argue with. –  SplinterReality May 2 '11 at 7:59
    
I've discussed this approach with the development team and we're in agreement that its probably the right approach. Thanks for the insight! –  Robert Norris May 3 '11 at 1:56
add comment

Mentioned many times on the topic of 3d model loading, AssImp is a very easy to use library that reads both .blend and COLLADA files as well as many other formats. You can use it to load models directly into your engine or use it as a conversion tool to convert to your own internal format. I think it would be a good library that suits your needs.

share|improve this answer
1  
Thanks for the pointer. I've done some small experiments and was surprised by how straightforward it is to use. I will be seriously considering it. –  Robert Norris May 3 '11 at 1:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.