Questions tagged [obj]
For questions related to processing OBJ mesh file format.
70 questions
0
votes
2
answers
54
views
How determine whether a quad of a grid mesh is too steep to move onto, without using a NavMesh?
Godot 4.1
Assume we've got a simple, 100x100 cells grid-based generated mesh that will serve as the game's level:
This mesh is exported as either .obj or .glb and imported in Godot.
The player (...
0
votes
1
answer
51
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 ...
0
votes
1
answer
62
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, ...
0
votes
1
answer
269
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 ...
0
votes
1
answer
109
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 ...
1
vote
0
answers
37
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 ...
0
votes
1
answer
67
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 ...
0
votes
1
answer
273
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 ...
0
votes
0
answers
231
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 ...
0
votes
1
answer
140
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
...
0
votes
1
answer
101
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 ...
1
vote
1
answer
424
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 ...
0
votes
0
answers
255
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 ...
0
votes
0
answers
129
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 ...
0
votes
2
answers
852
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 ...
0
votes
1
answer
1k
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 ...
1
vote
0
answers
116
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 ...
0
votes
1
answer
163
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 ...
0
votes
0
answers
86
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:
...
0
votes
2
answers
293
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 (...
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 ...
0
votes
1
answer
207
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 ...
1
vote
1
answer
60
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) ...
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 ...
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 ...
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) :
...
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
...
4
votes
1
answer
4k
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 ...
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 ...
0
votes
0
answers
176
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?
...
-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)
...
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 ...
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 ...
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-...
1
vote
1
answer
2k
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 ...
1
vote
0
answers
71
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 ...
0
votes
1
answer
665
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 ...
-1
votes
1
answer
636
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 ...
0
votes
1
answer
131
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....
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, ...
1
vote
1
answer
515
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.
...
3
votes
3
answers
17k
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 ...
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 ...
0
votes
0
answers
238
views
Specify Vertex Quality in OBJ File
I've got a program that prints OBJ files in the format
...
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.
<...
0
votes
1
answer
209
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 ...
1
vote
1
answer
871
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
...
1
vote
1
answer
3k
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 ...
0
votes
1
answer
239
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 ...
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 ...