Jump to content

  • Log In with Google      Sign In   
  • Create Account

DmitryNik

Member Since 18 Dec 2011
Offline Last Active Mar 17 2013 08:41 AM

#5007541 Meshes

Posted by DmitryNik on 05 December 2012 - 04:12 PM

The OBJ format can actually have faces that consist of 4 verts or quads. A face can consist of only vertex data so the absence of texture coordinates or normals is just fine, it's just there is no way to light or texture that particular face. Face data can be combines in an OBJ file as well, you can find 3 vert face data and 4 vert face data in the same face description list in an obj file, or at least I have encountered this before.

Most engines use their own formats to load meshes, and often this is just a straight dump of the vertex array in to a text or binary file so that runtime loading is extremely fast and no other operation than a straight forward memcpy are needed. Mesh loading and saving is a problem for which there is no standard way that is fast, for example Max and editing tools need to know about all information about a mesh, so material, shader, textures and meta data(vertex is connected to which edge, etc.), a game engine doesn't need to know about faces, edges and all kinds of other stuff that is stored in a model file. There for we write our own exporters and importers for the data we care about and make it load fast, one standard format doesn't cover all performances for all engines sadly.


Yep, this one is a big ugly problem(no universal format)... In Blender you can make all faces to consist of only 3 vertices. At least, it could be done in Blender 2.64. If I'm right, then an "triangular faces" -option is responsible for that.


#5007406 Meshes

Posted by DmitryNik on 05 December 2012 - 08:39 AM

1. Textures can be tiled. So point (1.1, 1.1) is same as (0.1, 0.1).
2. Are you sure it's not lines? Faces have to have at least 3 points.
3. Well I guess you're going to load from file, so ifstream is a good choice.


Thank you.

It's too bad Microsoft didn't implement anything for meshes loading. It could an OBJ or FBX file(like it was in XNA).

And, yes, you are right it's simple line.


#5007346 Meshes

Posted by DmitryNik on 05 December 2012 - 04:02 AM

Hello.

I've read about different methods, how can be loaded the mesh into the game written with DirectX 11. These methods were from loading meshes with Assimp to writing own loader for .OBJ -files. As everybody know, .OBJ is a well documented. I assumed that too before I've seen this

f 54 34
f 34 78
f 100 -100
and so on

and also this:

vt -1.546 0.578 -3.10098 (very strange behavior for texture coordinates, isn't it?)

I'm about to ask three questions. First: how it's possible that texture coordinates are negative or greater than one?
Second: How it's possible that faces consist of only 2 points without normal vectors and texture coordinates, even they are defined for them?
Third: What do you use for loading meshes in DirectX 11 in Windows 8/WIndows 7?

Thank you in advance for your answers.

p.s. program used for exporting to .OBJ-file is Blender 2.64


#4997504 Collision detection for multiple objects/types of objects

Posted by DmitryNik on 05 November 2012 - 03:15 AM

Also, you might want to read real-time collision detection book written by Christer Ericson. There could be found some heads up.


PARTNERS