Domanda

There is very little contrast in my model. The model frankly looks like one big blob, despite its having a complex shape. I can really only see its silhouette shape. The only details that I can see inside of the shape are created by the spot light, which is always very faint no matter how I tweak it.

What is the key to getting the shape of an object to appear clearly and to get some contrast?

È stato utile?

Soluzione 2

The problem was, although I was creating normals and providing them with glNormalArray, I had not enabled GL_NORMALIZE so they weren't being used. I had been under the impression that GL_NORMALIZE automatically created normals, which is the opposite of what I wanted.

Altri suggerimenti

Did you create normals for your triangles and pass those in? You never mentioned those, and surface normals are required before directional lighting works (A normal is a ray that is perpendicular to each surface, usually from the center of the surface.

I don't have my OpenGL references handy, but I remember the 3 kinds of lighting as directional, ambient, and specular, where ambient is global, and directional and diffuse depend on the lighting direction and the surface normals.

I would suggest starting with 1 light source first and figuring that out, then adding more lights once you get your single light working correctly.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top