Jump to content

  • Log In with Google      Sign In   
  • Create Account


Mesh Format Confusion


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 CoOlDud3   Members   -  Reputation: 151

Like
0Likes
Like

Posted 30 March 2013 - 11:31 AM

I have two questions:

 

1) Which Mesh format do the professional 3D game developing companies (EA Games, Ubisoft, Rockstar Games) use?

 

2) Are there libraries available for DirectX 9, 10 and 11, to make the process of importing mesh in that widely used format easy?



Sponsor:

#2 EddieV223   Members   -  Reputation: 1392

Like
3Likes
Like

Posted 30 March 2013 - 12:39 PM

There isn't one mesh to rule them all, these days most companies that build a game engine roll there own or support several common formats.

 

If you need a easy to load format look into obj loader, or even IQM.  There are lots of formats to choose from. 


If this post or signature was helpful and/or constructive please give rep.

 

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

 

// Easy to learn 2D Game Library c++

SFML2.1 Download http://www.sfml-dev.org/download.php

SFML2.1 Tutorials http://www.sfml-dev.org/tutorials/2.1/

 

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

 


#3 TheUnnamable   Members   -  Reputation: 762

Like
4Likes
Like

Posted 30 March 2013 - 01:27 PM

Most of the big teams have their own formats, which are close to the processed ones. So they can just load the whole file into RAM and use it.

Probably, you'll just want to have a format which supports all the features you need. Also, I suggest looking into AssImp, if you need a library ( http://assimp.sourceforge.net/ )



#4 Starnick   Members   -  Reputation: 1142

Like
4Likes
Like

Posted 30 March 2013 - 01:33 PM

Usually you have two types of "formats":

 

The first category are the ones that are either built for data exchange (e.g. collada, FBX) or simply are source assets (like .obj) that can be read/written by different modeling tools. Many times those are verbose human-readable (text/XML) formats too. Generally these source assets need to be processed (triangulated...normals calculated...etc) in some manner and/or are slow to load because you're parsing XML or text rather than binary data.

 

The second category is the format that usually source assets get compiled into, and usually are binary and specific to your application/game. The idea is to do offline-compiling of source assets into this type of format so loading models at runtime would be very fast (e.g. compact binary data that is very close to the in-memory representation of your models).

 

For the Direct3D or OpenGL API's, there is no set "model format"...you're simply dealing with buffers of primitives (lines, triangles, etc), however you organize those are completely up to you. It can be as simple as each mesh piece is just a vertex buffer and an index buffer.

 

There exist libraries out there to do model importing into a general data structure that you then can translate to your own internal format, one such library that you can look at is the Assimp C/C++ library. If you're working in C#, you can take a look at the AssimpNet wrapper too.


Edited by Starnick, 30 March 2013 - 01:34 PM.


#5 EWClay   Members   -  Reputation: 655

Like
2Likes
Like

Posted 30 March 2013 - 02:02 PM

There are many formats written out by modelling packages, and these are well documented with loaders available. Typically, because artists may make use of several of these on a game, they will be loaded to an intermediate format for processing. Granny 3D is one popular choice for that step, but very much not free.

After processing the mesh is written to another format, and there will be loaders for each platform the engine runs on, which may include Direct X. But that format will be very simple compared to the original, optimised for fast loading and designed to go straight to the GPU. Because every engine works differently, there is no common format for this final step.

#6 Chris_F   Members   -  Reputation: 1989

Like
4Likes
Like

Posted 30 March 2013 - 02:10 PM

Create your own simple format that can be easily loaded into a vertex buffer. It's a video game, not a 3d modeling suite. There is no reason for it to support a bunch of formats and there is certainly no reason for it to be parsing textual mesh formats at runtime.



#7 TheChubu   Crossbones+   -  Reputation: 3759

Like
1Likes
Like

Posted 30 March 2013 - 05:45 PM

Final formats are closely related to the engine to get the best performance out of them. As an example. .nif (NetImmerse File Format) files represent a node in the engine's scene graph. So loading is fast and simple, load file, plug in scene graph and you're good to go.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#8 CoOlDud3   Members   -  Reputation: 151

Like
0Likes
Like

Posted 31 March 2013 - 02:55 AM

Thank you for all the helpful details. Can you provide any good resources that could teach me the process of creating my own mesh format, and building an import library for it in DirectX?. I'll appreciate It.



#9 Alin   Members   -  Reputation: 391

Like
1Likes
Like

Posted 31 March 2013 - 06:44 AM

You can use d3dx library for DirectX 9. The dx11 doesn't support any file format, so you'd better define your own file format.



#10 CoOlDud3   Members   -  Reputation: 151

Like
0Likes
Like

Posted 31 March 2013 - 07:27 AM

Oh! You are the Alin guy who made that DirectX Exporter for 3DS Max. I've been using your exporter for a while now and I gotta say you've done a great job. But I am experiencing an issue while using it. After exporting a flat plane mesh with grass.png texture on it. When I load the mesh in my DirectX9 game. The object shows, but without the textures. Can you please guide me :)



#11 Alin   Members   -  Reputation: 391

Like
1Likes
Like

Posted 01 April 2013 - 11:19 AM


The basic export workflow is as follows:
1) Setup your scene.
2) In 3ds Max, choose File > Export from the main menu.
3) Click the "Save as type" dropdown list, and scroll to the end, where you will find Alin's DirectX Exporter.   Select the output directory and file name, and press OK. The configuration dialog will open.
4) Hit OK when you finish the configuration.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS