What is the best/most common model format? back
Board: Board index ‹ Ray tracing ‹ Data sets
(L) [2011/07/18] [magic] [What is the best/most common model format?] Wayback!Hi all,
I want to learn one of the most common 3D model formats, since I need to know both how to write a file myself for creating small test cases, and I need to know how to interpret one, in order to be able to set up my scene before I render. Which file format for 3D models would you recommend? Is there any difference in quality between the different formats, to what functionality they are able to support (how much details about the scene/objects you can store in it)? Which is the best in that case? And which format/formats are the most common to find when you're dealing with 3D rendering?
(L) [2011/07/18] [friedlinguini] [What is the best/most common model format?] Wayback!It Depends(tm).
If you want to do deal with untextured polygon soups, .ply is a good choice. If you're looking at existing global illumination setups, .mgf might work. .obj is a pretty common format for random models on the web. .rib supports lots of different features, but isn't well-suited for global illumination. .pbrt is sort of a stripped down .rib with other features added that make it well-suited for plugin-based global illumination renderers like, say, PBRT.
What sorts of things do you want to render, what modeling features do you want to support, and how much work do you want to put into it?
(L) [2011/07/18] [Michael77] [What is the best/most common model format?] Wayback!FBX is quite well established as a defacto standard and is supported by all main 3D applications.
(L) [2011/07/19] [stew] [What is the best/most common model format?] Wayback!I don't like FBX very much, it's a closed format that requires you to use a 3rd party binary library.
You must distinguish between scene formats, render formats and geometry formats:
OBJ, PLY and the like only store geometry and some material information, but nothing about camera, motion or light.
FBX and COLLADA are scene formats, they store multiple cameras, lights, animation, geometry and other scene objects, including custom vendor extensions.
RIB and the derived PBRT, Lux, etc formats are render formats that contain the information required to render one image: geometry, material, single-frame motion information for motion blur, camera settings, output file format and resolution.
(L) [2011/07/19] [Michael77] [What is the best/most common model format?] Wayback!Yes, FBX is a PITA, but nonetheless, it is the only format that is widely used and supported in the professional sector.
(L) [2011/07/19] [magic] [What is the best/most common model format?] Wayback!>> stew wrote:You must distinguish between scene formats, render formats and geometry formats:
OBJ, PLY and the like only store geometry and some material information, but nothing about camera, motion or light.
FBX and COLLADA are scene formats, they store multiple cameras, lights, animation, geometry and other scene objects, including custom vendor extensions.
RIB and the derived PBRT, Lux, etc formats are render formats that contain the information required to render one image: geometry, material, single-frame motion information for motion blur, camera settings, output file format and resolution.
Thanks, that's a pretty good explanation. I think a render format would be the best for me to use, since I basically want the whole scene setup, including as much rendering details as possible, in one file. Possibly a scene format, but if my program can't read the entire format that's not such a big deal; I guess I can just extend my program to support the whole format later on. It's probably a good idea to learn one geometry format too, though, they seem to be pretty handy to know and when take a I look in an obj file it seems to be a quite intuitive format.
 >> friedlinguini wrote:.rib supports lots of different features, but isn't well-suited for global illumination. .pbrt is sort of a stripped down .rib with other features added that make it well-suited for plugin-based global illumination renderers like, say, PBRT.
How comes .rib isn't well-suited for global illumination; I thought just global illumination was a class of rendering techniques that in the best case didn't have any problem to render any scene? And why is .pbrt better?
(L) [2011/07/19] [squeen] [What is the best/most common model format?] Wayback!>> Michael77 wrote:Yes, FBX is a PITA, but nonetheless, it is the only format that is widely used and supported in the professional sector.
It's a closed format, so he can't really learn it.
(L) [2011/07/19] [friedlinguini] [What is the best/most common model format?] Wayback!>> magic wrote:How comes .rib isn't well-suited for global illumination; I thought just global illumination was a class of rendering techniques that in the best case didn't have any problem to render any scene? And why is .pbrt better?
It's meant to support a large class of renderers, but .rib still kind of assumes you'll be writing a REYES renderer, and scenes are more geared toward artistic expression than physical plausibility. Depth-buffer shadows are a mandatory feature, and it's expected that the renderer will be able to turn shadow casting and receiving on and off per primitive. Lights are generally assumed to be point lights. Marking an object as an area light is optional, but there isn't a clear way to map a point light's energy output to that of an area light, especially if you use the user-specifiable falloff parameters. Implementing the shading language is a huge project, and there are no guarantees that you won't, for example, reflect more light than you receive.
.pbrt was specifically intended for physically based rendering (hence the first three letters of the extension). The plugin-based system lets you decide what sorts of algorithms, surface types, and shapes you want to use, and you can grab the official parser straight from the PBRT website or Github (subject to GPLv2). The downside is that it isn't really an industry standard for modelers.
You might also consider writing your own format to better reflect the features you want to support, and then write converters for whatever 3rd-party formats you want to support. This lets you decouple your renderer from the formats you want to support.
(L) [2011/07/19] [graphicsMan69] [What is the best/most common model format?] Wayback!>> squeen wrote:Michael77 wrote:Yes, FBX is a PITA, but nonetheless, it is the only format that is widely used and supported in the professional sector.
It's a closed format, so he can't really learn it.
There is documentation for FBX.  On the other hand, it's one of the worst formats for rendering data that I know of.  I HATE FBX.  It's really pretty good for animation data,  but it's super overkill for a simple format for writing a renderer (unless, of course, you HAVE to support it).
(L) [2011/08/10] [JVillella] [What is the best/most common model format?] Wayback!from a modelling standpoint i think .obj is one of the most widely used.. I know for .ply there are a bunch of free open source parsers that you can either use in your own renderer or simply study from.
(L) [2011/08/30] [cignox1] [What is the best/most common model format?] Wayback!What about lightwave lwo? They say it is a very nice format, with available documentation and is supported by several apps (lw, modo and blender amongst other). While lwo only keeps models data, there is also lws wich handles the other infos, though I don't know how well documented/supported is lws...
EDIT:
You could also try Assimp, which provides access to several formats giving you some more time to think about the right format to use...
(L) [2011/08/30] [sirpalee] [What is the best/most common model format?] Wayback!Have you considered using alembic? It is backed up by quite large companies...
back