All Questions

4
votes
1answers
1422 views

OpenGL - vertex normals in OBJ

I want to know how can I use the vertex normals for lightning effect? Currently what I have is I can send both vertex and texture coords to the shader and use them but with normals, I don't know how t...
-1
votes
1answers
3595 views

object loader in opengl

I have create a program in C++ that contains also opengl and I want to create also an obj loader in order to load an obj file I have ! I have already created two functions which are : void ReadFile(...
0
votes
1answers
1136 views

Why is my OBJ parser rendering meshes like this?

I've taken it upon myself to add OBJ parser/importer support to a 3D rendering engine I've been working on. I've followed the specification found HERE nearly 'to a tee', with the current exception of ...
6
votes
2answers
2041 views

Converting quadriladerals in an OBJ file into triangles?

At first, it seemed obvious... Make 2 triangles per face wherever 4 indices were found, right? Meaning, the following: v 1.000000 1.000000 0.000000 v -1.000000 1.000000 -0.000000 v 1.000000 -1.000000...
5
votes
1answers
1215 views

parsing into several vector members

I want to recursively parse a string and store the results in one struct. I've written a parser that can handle one iteration. The input is formatted as follows: v 1.5 2.0 2.5 v 3.0 3.5 4.0 f 1 2 3...
5
votes
1answers
3962 views

How do you convert Wavefront OBJ file to an SCNNode with Model I/O

I've imported a Wavefront OBJ file from a URL and now I'd like to insert it into my scene (SceneKit) on my iOS 9 app (in Swift). What I've done so far is: let asset = MDLAsset(URL: localFileUrl) prin...
15
votes
4answers
28564 views

Do Wavefront .obj files support animation?

How does one export a 3D Studio animated model to OBJ format (if possible)? What will be the resulting file like? How would I read that?
2
votes
1answers
198 views

auto concatenation of parse results into vectors

I've written some rules to parse floats into two std::vector's of floats, which in turn are stored in a struct: Data input: # # object name01 # v -1.5701 33.8087 0.3592 v -24.0119 0.0050 21.7439 ...
3
votes
2answers
2565 views

Loading an OBJ file, how to use normals (#vertices < #normals)

I have an obj file and have succesfully loaded the object to opengl without using the normals given. This is how it looks: The format of the file is: v x y z vn x y z f x//x' y//y' z//z' The displ...
4
votes
1answers
648 views

Mapping Wavefront .obj texture vertex on OpenGL

An artist gave me all 3D models for me exporting to .obj and .mtl in order that I can render it using OpenGL. But I can't figure out why the texture vertex are greater than 1 and sometimes negative. ...

Previous Next