Looking for a 3D model format

Started by
6 comments, last by Fingers_ 14 years, 5 months ago
I'm making a 3D shooter. It's playable, but graphics are just plain wireframe cubes & cylinders. I googled for most widely used 3D model format and came up with Wavefront OBJ. So I started making an OBJ loader, but as soon as I noticed that Blender export script doesn't export per-vertex normals I decided to choose another format. The format needs the following features:

  -Static mesh, no animations
  -Per-Vertex normals
  -UV texture coordinates
  -Exporter script for Blender
  -Binary
Binary is not 100% necessary but both running the game and development would go faster. Extra features are bad. What file format do you use in your games/programs? What do you recommend? [Edited by - aziii on November 13, 2009 12:24:33 PM]
Advertisement
What makes you think OBJ format does not support per-vertex normals?
Quote:Original post by trippytarka
What makes you think OBJ format does not support per-vertex normals?


Sorry, my bad. OBJ does support per-vertex normals. It's just that blender export script doesn't.

Anyway, I need a better file format (without using a custom one).
I believe blender actually can export per vertex normals, but its a little obscure.

On the editing panel under Links and Materials you'll see two little buttons like "Set Smooth" or "Set Solid". It defaults to solid, which uses per face normals. If you select all your vertices and do "Set Smooth" it will use per vertex normals, I believe.

[size=2]My Projects:
[size=2]Portfolio Map for Android - Free Visual Portfolio Tracker
[size=2]Electron Flux for Android - Free Puzzle/Logic Game
AFAIK lightwave LWO format is quite good, and the Modo developers (formerly LW developers) decided to use it as default Modo format (IIRC). I'm not sure about normals though, and I don't know what support is given by Blender (it can import it though).
Quote:Original post by aziii
Quote:Original post by trippytarka
What makes you think OBJ format does not support per-vertex normals?


Sorry, my bad. OBJ does support per-vertex normals. It's just that blender export script doesn't.

Anyway, I need a better file format (without using a custom one).


Time to write a good .obj exporter for blender? shouldn´t be too hard and many people will love you for writing it. :P You could even fix the existing one, i think it is just a python script.

I use Maya to export .objs because it does it right. It is a very simple format, in fact the most simple format i know. Then you have .dae (collada) which is nearly universal (much more complicated than .obj) but last time i used it the blender exporter sucked.

So if you´re stuck with blender, just ask in their forums what exporters are 100% working and stick to the formats they export.
i wrote my own exporter for blender to export my static meshs with uv and normals it maybe took me 2 - 3 hours including the research i needed to write the script. i've maybe spent an additional 2 hours adding support for game specific data during export.
0))))))>|FritzMar>
Blender's .obj exporter is actually nice, it lets you specify exactly what information you want to export. Assuming you've created a model that has per-vertex normals, just make sure the "normals" button is pressed in the dialog that pops up when you export to "wavefront .obj".

This topic is closed to new replies.

Advertisement