Do I really have to write my own optimized model format?

user6484
  • Do I really have to write my own optimized model format? user6484

    So I'm a brand new noob to the world of game dev and I'm starting off by trying to write my own game using C++ and openGL. I'm getting into loading models etc and while searching around for "the best format" I'm finding that most of the common formats are intended for porting between modelling applications and not necessarily for final representation of data when loading into a game environment. I'm being told through various sources that ultimately you want to use formats like collada etc and convert them into a custom binary format optimized for your game. Is this absolutely necessary? I understand the idea, that parsing a large XML or some other ASCII format is going to be slower than reading a binary file type but is it really going to be THAT big of a performance hit if I don't? I can't see it, but before I go and fill the assets directory of my game with dae or fbx files I thought I'd ask.

  • What I believe these people are saying is that you want to load your COLLADA file into your in-game structure. You can then save the contents of this structure into a binary file ready for loading at runtime.

    This can have advantages like the ones you said, but also has disadvantages, typically during the development stage.

    Whether the load-time performance gain you get is necessary for your game is for you to decide. If you have a few non-complex models, the difference is probably negligable, and it is up to you to decide what to go with.

    If for development purposes you prefer to use COLLADA and parse the XML at load time then go with it! I would recommend you make sure that your loading code is abstract enough so that you can easily replace it with binary files if the loading becomes too long.

Tags
opengl c++ models
Related questions and answers
  • I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes? In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language... Thanks For got to mention, the engine is based on OpenGL... Alright, for anyone who is reading this, I just found the Doom 3 md5 specifications (http://tfc.duke.free.fr/coding/md5-specs-en.html). It gives

  • positions Normals UVs Texturing information Animation information Collision mesh Maybe some other things... I am aware, that I could and (maybe should) create my own file format that brings these data from 3D authoring application (3ds Max, Maya, Softimage) into the game. However, doing so from scratch is going to be really be a lot of work. Therefore, is there any available solution/middleware... the above mentioned features plus things I haven't considered yet Programming language is: C++. Currently, I'm developing under Windows 7, Visual Studio 2010, and OpenGL ES 2.0 emulator. Later

  • (indicating structure begin, structures end, etc.) and strings in a custom-defined format. What i want to know specifcally is how to do this with the STL and C++... Since the format is meant simply for the use of a game i would think it would be much easier though. The format should: Be traversable (i can look through it and find the start of structure and maybe check it's name Be able...Hey so i just learned about the i/o part of the STL, more specifically fstream. Although I can now save binary info and classes i've made to the hard drive, i am not sure how to define how the info

  • I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to display static meshs and render animated meshs. I've already found quite a large number of possible formats and techniques, like keyframe animations, skeletal animation, MD2 up to MD5, 3DS, X, Collada etc. pp. For simplicity I'd like to use a format (and technique) that allows both, namely static and animated meshs. So my question is if one format is suitable for that task and which one you'd suggest. And to clarify

  • ) Where should I place the messaging system for my game engine? Lua? C++? I'm tempted to just have C++ object to behave as servers, offering services to lua business logic. Things like physics system... them in lua. Now I have clear I'm going to write them in C++ and expose everything needed. Ussually only interfaces are exposed to lua, so I have come across that to export properties to be published... to accomplish this? And which approach is better? Sorry for the late response James, I did go to sleep. I have prefered to create a new response becaue I'm going to write a somehow long text. I

  • After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game. I will need to export... intelligence, aggressivity, etc..) ..another assets.. Can I kindly ask for a hint, how to construct my custom file format. How to organize data within my files, please? Does anoybody have a good adivce... of wasting it on incorrect approaches. I use Softimage as my 3D authoring tool. Target platform is OpenGL ES 2.0 running on mobile devices (iOS, Android). Programming language: C++.

  • I am trying to create a 2D platformer (Mario-type) game and I am some having some issues with handling collisions properly. I am writing this game in C++, using SDL for input, image loading, font loading, etcetera. I am also using OpenGL via the FreeGLUT library in conjunction with SDL to display graphics. My method of collision detection is AABB (Axis-Aligned Bounding Box), which is really all... want to learn on my own) or the something like the SAT (Separating Axis Theorem) if at all possible. Thank you in advance for your help! void world1Level1CollisionDetection() { for(int i; i < blocks

  • The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game. When I attempted doing this method with my GLM(model loading library by nate robins) model, I get a segmentation fault in the debug, so I figured that it doesnt like the coordinate variables of the model. If i use blender to export my model as a collision file, what type of file should I use? I have heard of a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program.

  • I'm writing my own small-time game from scratch, and now I'm looking to start creating models. I've been wondering- what is the best model format to use? Given that I will be writing the model loading code myself and using whatever program generates them. Ideally, I'd look for a format that has fairly wide support between modelling programs, so I can pick the one I like most to actually perform the building, and the format itself would be relatively simple to load, rather than having all of the latest features.

Data information