|
-
Dec 5th, 2002, 05:58 PM
#1
Thread Starter
Frenzied Member
Transforms, normals, lighting
I have an object under the scale transformation <1,2,1>. The shape and location of the object is correct, but lighting is not. Specifically, the diffuse shading of the object appears to move when the camera rotates. When the scale is changed to <1,1,1> this does not occur.
I am doing the following in my code:
- Transform ray by inverse matrix of the transformation
- Test intersection
- Transform intersection point by transformation (return to world coordinates)
- Transform surface normal by inverse matrix
- Light as normal
The lighting model works fine, and the shape of the object is correct. The matrix math is fine. As near as I can tell, the problem is with the surface normal, but I can't figure out what the problem IS. Any insight would be greatly appreciated!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|