Questions tagged [.obj]

A text-based file format that stores 3d geometry.

The .obj file format was developed originally by Wavefront Technologies for their flagship 3d graphics software The Advanced Visualizer.

It is a text-based format that is human readable and simple to parse. .obj can only store the position, UV coordinates, and normal of a vertex. Mesh hierarchies and animation of any kind are not supported. Free-form geometry like curves and surfaces are defined in the specification, but are not used that often, and as a result, not commonly implemented in parsers.

Links

385 questions
2
votes
1 answer

Trouble loading simple mesh into OpenGL

I need to import a 3D object mesh into my OpenGL code on Visual Studio 2010. I'm relateively new to OpenGL so I've been learning from the following tutorial (Number…
2
votes
3 answers

Generate header of view .obj file

Is there a way to generate a c++ header file for an .obj file? Or perhaps is there an utility that can view .obj files. I've already found objconv that converts between formats, but I can't find any .h generator/viewer.
Aoi Karasu
  • 3,730
  • 3
  • 37
  • 61
2
votes
0 answers

Convert .obj into binary format (VBO)

I have created a Mesh Loader to convert .obj files to a binary file so i can load them directly into my VertexBuffer without parsing them first. My code was working fine for the particular model i used for testing. But after testing some models i…
puelo
  • 5,464
  • 2
  • 34
  • 62
2
votes
1 answer

Converting C++ OpenGl to Java(LWJGL), glBufferData();

I've been messing around with LWJGL trying to create a .obj parser that will convert files exported from blender into OpenGL render code. I followed a tutorial similar to what i was doing, but it was written in c++, which i can hardly comprehend.…
user3311827
  • 179
  • 1
  • 9
2
votes
0 answers

I have an .obj containing UVW mapping and my assimp fail to load it

I am using assimp for ios from h t tps://github.com/cfr/assimp-ios these file are exported from 3d max: .obj h t t ps://drive.google.com/file/d/0B_Nuhl0WqfMjMUF5cks2YmR2Rlk/edit?usp=sharing .mlt h t t …
2
votes
2 answers

.obj file format - alternates between different data types

I'm writing a method to parse the data in wavefront obj files and I understand the format for the most part, however some things are still a bit confusing to me. For instance, I would have expected most files to list all the vertices first, followed…
user1855952
  • 1,515
  • 5
  • 26
  • 55
2
votes
1 answer

how to control texture repetition on model by map_Kd texture.png in .mtl file

How to control texture repetition on my model. texture is applied by map_Kd texture.png in .mtl file newmtl material_0 Ns 10.000000 Ni 1.500000 d 1.000000 Tr 0.000000 Tf 1.000000 1.000000 1.000000 illum 9 stren 0.000000 Ka 0.588000…
Deepak3301086
  • 447
  • 2
  • 23
2
votes
1 answer

Visual Studio 2012: exclude compiled file from linking

I have a simple C language project with a few files being compiled. These are compiled to .obj files and then linked together. So far so good, now I need to exclude one of these files from linking. I know this is quite unusual but this is exactly…
MazeGen
  • 180
  • 3
  • 14
2
votes
0 answers

MDX C# Loading Wavefront OBJs

I'm trying to load and display (EXTREMELY SIMPLY) a wavefront OBJ file. I have the parser working 100%... it loads the data from the files and stores them in structures in the program. Now is the part where I am utterly failing to find any…
Crowe T. Robot
  • 2,045
  • 17
  • 18
2
votes
1 answer

NumberFormatException: Invalid int: " 1"

I'm trying to make a simple algorithm that converts .obj files to data which my program can use. This is the input String data example: "v 1.000000 -1.000000 -1.000000" "f 1 2 3 4" file = new BufferedReader(new…
user1295313
  • 65
  • 2
  • 11
2
votes
1 answer

How do I get indexed vertex positions AND indexed vertex normals from wavefront .obj file into an OpenGL vertex shader?

I was trying to use two Vertex Buffer Objects (VBO) and two Index Buffer Objects (IBO) in a Vertex Array Object (VAO) for rendering data from a wavefront .Obj file containing a 3D model. The .obj file was using the vertex/normal face definition: f…
2
votes
1 answer

wavefront obj model loader indexing issues

Hello guys I am having a real hard time getting .obj wavefront files to render correctly using IBO. Now I wrote a parser, its very simple at the moment but it loads vertices and normals. If I bind the parsed vertex and normals I get great results,…
user1610950
  • 1,837
  • 5
  • 33
  • 49
2
votes
1 answer

Rendering a mesh in OpenGL as a series of subgroups?

I'm completing a wavefront object parser and I want to use it to construct generic mesh objects. My engine uses OpenGL 4 and shaders to draw everything in my engine. My question is about how to ensure best rendering efficiency for rendering a…
fishfood
  • 4,092
  • 4
  • 28
  • 35
1
vote
1 answer

How to convert GL_TRIANGLES to GL_TRIANGLE_STRIP?

I have data from *.obj file. I know how draw with GL_TRIANGLES. How i can convert data for GL_TRIANGLE_STRIP? like glDrawArrays(GL_TRIANGLE_STRIP, 0, numberOfFaces); Thanks!
Volodymyr B.
  • 3,369
  • 2
  • 30
  • 48
1
vote
2 answers

While loading .obj file using libgdx got the error

While loading .obj file using libgdx I got the following error. Can you please tell me what I'm missing here? 03-06 15:50:13.901: E/AndroidRuntime(5503): FATAL EXCEPTION: GLThread 9 03-06 15:50:13.901: E/AndroidRuntime(5503):…
Vishwanath Deshmukh
  • 619
  • 1
  • 10
  • 32