سؤال

I've created a basic sphere in Maya and loaded it into my OpenGL project. The problem I'm having is shown below:

Maya Model

As you can see, the sphere is triangulated.

But when the model is loaded into my project, some of the faces aren't rendering properly.

enter image description here

These are my Maya FBX export settings (checked):

General Options - Default file extensions - Preserve references

Current Preset - User defined

Geometry - Smooth Mesh

Convert NURBS surface to: - Software Render Mesh - Referenced Containers Content

Embed Media - Embed Media

Units - Automatic

Axis Conversion - Up Axis: Y

UI - Show Warning Manager - Generate Log Data

FBX File Format - Type: Binary - Version: FBX 2013

Any ideas as to why this is happening? I'm using FBX SDK 2013.

EDIT:

Didn't realize at the time of posting that the white triangles (labeled "bad triangles") appear due to a simple light rendering. But he extended bar on the right is the actual problem.

هل كانت مفيدة؟

المحلول

Saw your question on my youtube video.

It looks to me like some of your triangles are being culled out on the extended bar. Maybe some of the triangles on the bar have incorrect winding? Something to check for. Check the winding on the triangles and play around with the opengl cull face.

as for the shading, I've seen something resembling this before. It looks like you may need to enable smooth shading, instead of flat shading. Try calling glShadeModel(GL_SMOOTH);

Also try calling glDisable(GL_TEXTURE_2D). If a texture is enabled and appropriate texture coordinates are not given, it can result in weird flat shaded triangles like you're seeing.

The only other possibility I can think of is just that your normals are not properly set up. Here are a few reasons this could be happening:

  1. You did not properly export the normals.
  2. You did not properly import the normals into your vertex buffer objects, or however you cache the information
  3. Your shaders (assuming you're not using immediate mode) are not reading or processing then normals correctly.

Hope this helps. Good luck!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top