Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [obj]

For questions related to processing OBJ mesh file format.

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Load vertexes from an obj file

I do have a problem with loading my vertexes. When I debug my code. I find out the vertexes are loaded. But when i use render doc, I found out the vertexes are not loaded. Only the first line of my ...
mueoc mueoc's user avatar
0 votes
1 answer
40 views

How can I convert .obj files into a 2D array of [x,y,z] coordinates and color values?

I have a cool 3D model I want to use, but for this program I'm working with, I need it in array form, with each point's coordinates and color value. I've already voxelized the model using this tool, ...
Dinuka Herath's user avatar
0 votes
1 answer
172 views

Convert Wavefront (OBJ) faces into triangles for drawing with OpenGLES

I wrote a simple Wavefront parser in C++ that loads v, vn, vt and ...
Alexey Starinsky's user avatar
0 votes
1 answer
78 views

GameObjects loaded from OBJ files have inherent position offsets; any way to measure these in worldspace?

I have OBJ files that I'm loading into my scene at runtime. They all have positions offset from zero. These positions appear to be inherent to the .obj file as they were set in the 3D modelling ...
A__'s user avatar
  • 163
1 vote
0 answers
33 views

How do I rotate OBJ submeshes relative to themselves (or arbitrary point, as opposed to relative to the whole model)?

I'm creating my own flight simulator game from scratch, using Swift and Metal, for learning purposes, and I'm wondering how I can move certain parts of my aircraft model. My model is a free OBJ file ...
Tino's user avatar
  • 11
0 votes
1 answer
61 views

ObjFile not properly loading

i am losing my mind. I am trying to create an obj parser has a way to learn opengl but i have ran into a brick wall. with DMGregory help i got the textures to work i think but know the mesh just looks ...
cuttingboard's user avatar
0 votes
1 answer
208 views

Model is oriented correctly in the Unity asset browser but flips 180 degrees when added to the scene?

I have modeled two pinball flippers in Houdini. I exported them as OBJ files and imported them into Unity 2021.3. They look correct in the asset view: They also look correct when I open them with the ...
Matt's user avatar
  • 375
0 votes
0 answers
200 views

How can I move an object on a non flat surface in vulkan?

I am writing a small "game" in vulkan, in which a car can move in an environment that is not flat, like a desert with valleys. I am able to translate my car and follow it with the camera on ...
Luca Venturini's user avatar
0 votes
1 answer
117 views

Converting mesh vertices to world coordinates for raycasting

My goal is to figure out if a point exists within a 3D polygon. To do this here is what I am doing: Load obj mesh ...
joethemow's user avatar
  • 101
0 votes
1 answer
84 views

Wrong uv parsed from obj

I have written an obj parsing function and the result of his parsing can be drawn correctly. But if the uv is not generated by default by the modelling software, he will have problems with the uv. I ...
BoomBac's user avatar
1 vote
1 answer
375 views

How do I "voxelize" an OBJ mesh that was created in a voxel editor?

I've been trying to find the right workflow to solve my problem for over a month now. Any tip/insight would be greatly appreciated. Scenario: I create a voxel mesh in MagicaVoxel and then, instead of ...
Justin's user avatar
  • 11
0 votes
0 answers
212 views

Obj file vertex coordinates to new coordinate space

I am trying to convert the vertex positions in my obj file to a new coordinate system. I understand I need to multiply each vertex with the transformation matrix, however I am trying to figure out the ...
joethemow's user avatar
  • 101
0 votes
0 answers
127 views

OBJ file loader texture coordinates ‘scrambled’

Edit I've rewritten the loader to duplicate data if only one element (v, vt, vn) is different. I get a much better result, but it is still incorrect. The seams on the mesh match what they should look ...
TheIceCubeDude's user avatar
0 votes
2 answers
746 views

OBJ file has more vertices than normals

Here is a Pastebin of my OBJ file created using Solidworks 3D https://pastebin.com/6MgQBF8J I don't understand how the number of vertices (645) can be larger than the number of normals (306) I ...
Mich's user avatar
  • 131
0 votes
1 answer
962 views

Why is my color on my obj not showing in Unity! [duplicate]

I've been trying to import my full-color obj files to unity for a while now, but I can't get them to be in color. All of the colors show up in Meshlab, but not in Unity. All of the youtube videos I ...
Logan S. Colon's user avatar
1 vote
0 answers
106 views

How is a normal map applied to a triangle mesh?

I'm working on writing my own parser/renderer for the obj file type, and right now I have it working so that I can draw the model correctly and use the ...
Calvin Godfrey's user avatar
0 votes
1 answer
158 views

I can't figure out whats wrong with my .obj file reader

I'm just loading a simple textured cube but it always has missing bits or warped textures. This is for directx 11 rendering by the way. Updated with more information. I think my problem is with ...
Hayden Morris's user avatar
0 votes
0 answers
85 views

OpenGL obj loader doesn't work

I made my own obj loader,i tried other's obj loader,but nothing works. Here's my obj loader: ...
ombra osura's user avatar
0 votes
2 answers
272 views

OpenGL ES model loader is slow?

I'm trying to load a 3D model in OpenGL ES, and I managed to find a project on "sourceForge" that can do this job. When I downloaded it and played the app, it took 50 second to load a small object (...
Osama's user avatar
  • 11
2 votes
2 answers
3k views

MagicaVoxel export world in 1 model

So I'm currently working in MagicaVoxel and I have 2 objects in my world. When I export it as .obj it exports as seperate 2 obj models with 2 seperate textures and materials. Is there any way that I ...
Joey's user avatar
  • 33
0 votes
1 answer
194 views

How can I export a 3D model with keyframes to use in Blender?

I'm currently trying to export some 3D data and load it into Blender, but I've encountered some problems at the time of processing the meshes. They all have keyframes (nothing too complex, just ...
Ricardo's user avatar
  • 153
1 vote
1 answer
57 views

Comparing meshes and reducing duplication of data

I'm writing a class that reads an obj file, indexes each mesh and creates a VAO and GameObject of the appropriate type. I've stumbled on a design issue. Objects of the same name (Tree_A001, Tree_A002) ...
Figwig's user avatar
  • 196
1 vote
1 answer
1k views

How can I reorder the order in which the vertices are in an .obj file?

Blender saves the files with the structure of All the vertices All the normals All the UV The game to which I want to import the model, only accepts the following order in structure 1 vertex 1 ...
Evil prohack3.0's user avatar
0 votes
2 answers
1k views

Which UVs to use when I have more UVs coordinates than vertices Obj

I have a simple sphere exported from 3DS Max in .obj format. I noticed that I have more UVs than vertices. I parsed the file with a simple program I wrote and then I put the various vertices and UVs ...
Paul's user avatar
  • 165
0 votes
3 answers
1k views

How do I get min/max on a mesh

I am trying to create an AABB but I need to know how to store min/max from a mesh. Here is my code(I got it from thin matrix) : ...
Macky ben Jonah's user avatar
0 votes
1 answer
1k views

OBJ Loader not working correctly

I'm currently trying to implement my own OBJ Loader for use with FreeGLUT with C++. This is my current OBJ Loader: #include "OBJLoader.h" #include #include #include #include ...
codelyoko373's user avatar
4 votes
1 answer
3k views

Why is my model rotating opposite direction around the Y axis?

I have a simple scenario. I have a simple scene, and in it I'm drawing a grid and a model, with some axis for orientation. I noticed when I rotate the model about it's local Y axis, if I rotate the ...
Short's user avatar
  • 141
2 votes
2 answers
3k views

Unity: Import a mesh that only has vertex and edge data but no faces

I am working on a game that requires meshes that only have edges and vertices but no faces. In blender, you can make a mesh with only edges and vertices, but if you export it to FBX or OBJ, once it is ...
Croolsby's user avatar
  • 231
0 votes
0 answers
164 views

Best strategy to track object hierarchy using groups and obj files

I am making a 3D game in OpenGL from scratch. In this game I have a ship with stuff inside it. How can I attach the stuff to the ship in the CAD program and maintain that hierarchy in my own game? ...
Alex's user avatar
  • 155
-2 votes
2 answers
4k views

Indices of a obj file format

If I have the obj file like below, what would be my indices. How do I find the indices? What would be the order of the indices also.(the triangles) ...
Terry's user avatar
  • 21
1 vote
1 answer
1k views

How to import .obj file from server without using asset bundle in unity3d

I want to import .obj file from a server on run time in unity3D, read lot of questions/answers but not able to find a suitable solution. Using WWW in unity I am able to get .png file and store it in ...
m_kiani's user avatar
  • 11
0 votes
1 answer
39 views

Importing a File Containing Two Objects from Blender into Unity Leads to a Single GameObject Not Two

I have two separate objects in a Blender file (say a cube and a sphere). Unity import this file (OBJ type) as a single gameObject which is not want I want. I want cube and sphere to be two separate ...
Kamran Bigdely's user avatar
0 votes
1 answer
2k views

C++ OpenGL loading models fast

I'm looking for a faster solution that will allow me to load objects faster with OpenGL and currently when trying to load, parse and pass the data on my main thread it takes a while... Would multi-...
0xen's user avatar
  • 453
1 vote
1 answer
1k views

OpenGL diffuse texture mapping

I am working on a small game engine and having some troubles when figuring out how to properly map more complex textures to their meshes. I am loading models using the .OBJ format and as far as I can ...
Rilgon's user avatar
  • 43
1 vote
0 answers
70 views

Finding the Dimension of OBJ objects

I am having a Three OBJ file , Cone , Sphere and Cube. How can i find the dimension of these objects , so that i can use it in ...
scsdcds's user avatar
  • 11
0 votes
1 answer
649 views

Draw wrong faces in obj model with OpenGL VBO

I am trying to draw a 3D model from an .obj file, and have met big trouble. I think my model draws with wrong faces, but I can't understand why. Original model: This is my code for reading the ...
Aleh Lipka's user avatar
-1 votes
1 answer
612 views

How do obj file faces work

Specifically, I have a faces specified 'f v1/vt1 ... etc '. I understand that there are 3 vertices specified with respective texture coordinates, but how do those 3 textures end up being rendered onto ...
chris's user avatar
  • 101
0 votes
1 answer
124 views

Can't load own .obj-files from Blender to DX11

I'm currently trying to import objects to my game. My problem is that I'm able to load objects from online-sites but it doesn't work for my own objects. It gives me an error: Debug assertion failes....
kessler bebe's user avatar
1 vote
1 answer
2k views

Modern OpenGL c++ obj loader

So i made a obj loader in c++.I used blender to export my files. I tried to draw 2 squares(one perpendicular to the other) and when im looking at them from above some weird black triangles apear, ...
Robert Puscasu's user avatar
1 vote
1 answer
494 views

DirectxMesh obj to cmo texture coordinates off

I'm having trouble getting the texture coordinates of the cmo to match how the mesh was unwrapped in blender. I am using the directxmesh to convert the obj to a cmo and the directxtk to load the cmo. ...
r m's user avatar
  • 11
3 votes
3 answers
16k views

How to implement Index Buffer Object (IBOs) with texture coordinates in OpenGL?

I was using IBOs to render meshes (for example a cube) from wave-front files (.obj), without texture coordinates or normals, in OpenGL. Following this, I attempted to implemented texturing. The mesh ...
pm79080's user avatar
  • 33
3 votes
1 answer
2k views

Texturing in OpenGL, Should texture coordinates be assigned to vertices in the shader?

I attempting to texture 3D models (a cube for example) using ibo’s, with OpenGL in Java. Currently, my textures are distorted. I believe this is because only a single texture coordinate is being ...
Jack's user avatar
  • 33
0 votes
0 answers
228 views

Specify Vertex Quality in OBJ File

I've got a program that prints OBJ files in the format ...
stranger's user avatar
  • 101
2 votes
1 answer
2k views

OBJ file, face materials and drawing them with OpenGL

I'm implementing a model class which loads OBJ and MTL files, and ran into an issue or question with face materials. Consider the following example: It's a cube with 5 sides Gray and 1 side Green. <...
Ray's user avatar
  • 623
0 votes
1 answer
205 views

System.StackOverflowException error [closed]

Hi all! I have a one problem. I trying to create 2D cave generation system in C# with XNA game studio, but then I running program I getting "System.StackOverflowException". As you can see in this ...
Alex's user avatar
  • 3
1 vote
1 answer
833 views

Errors when loading Assimp meshes

I am experiencing some oddities when loading meshes in Assimp. Some models render perfectly, while others are complete jumbles of triangles. Some Example Images: Teapot Correct - Teapot Actual ...
Sparky's user avatar
  • 90
1 vote
1 answer
2k views

Assimp - Error loading .obj files

I'm trying to load .obj files in my little game. I decided to use assimp as tool to import those models. But it seems that assimp does not import them correctly. I looked for a simple cube mesh ...
Rene Lass's user avatar
0 votes
1 answer
237 views

Questions about the obj file format

I'm wirting my first OpenGL Application for Android at the moment and now I get stuck on the ObjectLoader for obj files. I have some qestions to this file format and I can't an answer on the internet ...
Cilenco's user avatar
  • 113
2 votes
1 answer
1k views

Efficient way of loading wavefront models in openGL game

In my game, a RTS game, the units are all wavefront obj. all their animation frames are each seperate wavefront obj file. ie. without any skeletal animation; fully rigid models. So when many units are ...
Rakesh Malik's user avatar
8 votes
2 answers
3k views

How does Unity3D lower an imported .obj vertex count?

I have a question regarding how Unity3D handles importing of .obj files. I'm importing this teapot: http://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj The number of vertices ...
VitorOliveira's user avatar