Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Moon Wizard
Dec 29, 2011

I wrote a simple .obj loader and I mixed up the normals and the texture coordinates (it's supposed to be a cube)

Adbot
ADBOT LOVES YOU

Moon Wizard
Dec 29, 2011

TZer0 posted:

Are you rendering it with correct culling and indice order? Remember that if you render it with back culling on and indices in clockwise order then it will go bad.

Also, am I seeing Z-buffer issues?

Edit:
This is OpenGL, right?

It is OpenGL, though I should've explained that I got it fixed. It was actually a two part problem, the first being that I mixed up the normal and texture coordinate indices, and the second was that I was loading the texture upside down, so the texture coordinates were sampling from an alpha section. I was just outputting the texture RGBA directly, so that's why it has all those weird gaps.

It's a little hard to make sense of it as an image so I made a gif of it:


It looks like this with lighting now:

Moon Wizard fucked around with this message at 12:45 on Mar 11, 2015

  • Locked thread