Search found 240 matches

by Benjamin100
Mon Mar 03, 2014 8:03 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender [SOLVED]

Finally got an OBJ file model on the screen. No lighting yet, but I finally got the info. Found a tutorial that gave a good explanation of how to get the face information and use it to order the vertices. What a relief!
by Benjamin100
Sun Mar 02, 2014 2:31 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

So I leave this for months out of frustration over this one problem. No matter what I do I cannot load the file information correctly to draw to the screen. I have it all, and yet many of the vertices look out of place, and almost random. Then, it occurs to me, that such a thing would happen if it w...
by Benjamin100
Sat Mar 01, 2014 3:12 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

Ok. I transitioned to using 3ds because the lib3ds library looked helpful, and I didn't want to deal with parsing the files myself anymore. But I still have problems drawing. I don't understand why I need any more information than the vertices to draw the triangles. What is the purpose of the list o...
by Benjamin100
Thu Feb 27, 2014 1:51 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

Well, I took a break from this for a while, and now I'm back to trying to understand my old code. I'm mostly confused about the Obj file format. What are the numbers associated with the faces for? What do they tell me? I see three pairs of numbers for each face, each pair separated by two slashes. W...
by Benjamin100
Fri Jan 31, 2014 9:08 am
Forum: General Gaming
Topic: Post every time you beat a game.
Replies: 629
Views: 854430

Re: Post every time you beat a game.

Finished Broken Age Part 1, the new adventure game from Double Fine Productions and Tim Schafer. It was the game they raised money for on Kickstarter. Adventurous, funny, and very creative. Great art and entertaining game. Interesting story. One of my favorite games that's been out in years. I misse...
by Benjamin100
Wed Jan 08, 2014 3:35 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

Thanks for the advice.

I don't understand why I would need to load edges if I have the vertices.
by Benjamin100
Tue Jan 07, 2014 2:44 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

Well, when I do "GL_POINTS" I see the 8 vertices as I would expect, but when I use triangles or triangle strip, it is as if it connects in the wrong order, it looks all twisted and missing sides and a face going diagonally across the middle.
by Benjamin100
Tue Jan 07, 2014 1:01 am
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Re: Wavefront files with Blender

Well, I'm not really sure how to control the orientation. Is there something other than the z and "y is up" options that I should be paying attention too? I don't see very many options in Blender. Or do you mean that I need to program it a certain way?
by Benjamin100
Mon Jan 06, 2014 4:53 pm
Forum: Programming Discussion
Topic: Wavefront files with Blender [SOLVED]
Replies: 13
Views: 4951

Wavefront files with Blender [SOLVED]

When I export a wavefront obj file with blender, I get the vertices, but it doesn't seem to be in triangles. When I use "GL_TRIANGLES" the cube looks all out of order. I check the box for "triangulate" also. What else should I do?
by Benjamin100
Sat Jan 04, 2014 3:13 am
Forum: Programming Discussion
Topic: Vertex Normals [Somewhat SOLVED]
Replies: 6
Views: 3293

Re: Vertex Normals [Somewhat SOLVED]

It appears this wasn't as difficult as a I thought. I was unaware of these scanning format functions.
But I don't understand the format strings. What do the strange characters in the format strings represent?
by Benjamin100
Fri Jan 03, 2014 4:15 pm
Forum: Programming Discussion
Topic: Vertex Normals [Somewhat SOLVED]
Replies: 6
Views: 3293

Re: Vertex Normals [Somewhat SOLVED]

OK, just one more thing... Do most of you use a particular library for reading the Wavefront files? I'm having trouble figuring out how to parse this file. Perhaps it would be easier if I knew how to create my own type of file where I would have it split up by lines. It just gets messy trying to cre...
by Benjamin100
Thu Jan 02, 2014 8:44 pm
Forum: Programming Discussion
Topic: Vertex Normals [Somewhat SOLVED]
Replies: 6
Views: 3293

Re: Vertex Normals

I'm trying to read these Wavefront 3d files. I'm not sure how to find the vertex Normals. I think I see the vertices, and I see some other file that appears to be related. Are those the normals? It looks like a completely different file. Not sure if you use these file types. EDIT: Just found out I w...
by Benjamin100
Fri Dec 27, 2013 2:47 am
Forum: Programming Discussion
Topic: Vertex Normals [Somewhat SOLVED]
Replies: 6
Views: 3293

Re: Vertex Normals

Thanks guys.

Still not sure how 3d files are set up.
Apparently I can write a script that saves the information however I want to. I'm just not sure how that works.
by Benjamin100
Wed Dec 25, 2013 4:36 pm
Forum: Programming Discussion
Topic: Pointers, seriously.
Replies: 12
Views: 5994

Re: Pointers, seriously.

The pointer issue confused me for a while too. I think you can find a post on this forum from me a while back asking about the same thing. It still confuses me a bit, even though I basically know how and when to use it. I'm still not sure exactly how it works on a machine code level. Perhaps it woul...
by Benjamin100
Tue Dec 24, 2013 4:26 pm
Forum: Programming Discussion
Topic: Vertex Normals [Somewhat SOLVED]
Replies: 6
Views: 3293

Vertex Normals [Somewhat SOLVED]

What is the best way to calculate vertex normals? I need them to pass to the vertex shader for lighting calculation. I have an idea of what to do, but it seems extremely long; taking 3 points at a time for the array of coordinates (9 values total), breaking them into vertices, calculating the face n...