문제

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?

도움이 되었습니까?

해결책 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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top