Uneven Lighting on Model
I have a little 12-vertex model of a star that I made in Blender. The center of the star sticks out a little to make it 3D-looking. It's completely symmetrical, so the front looks just like the back. I loaded it into a program (Win32, C++, OpenGL) to display it. It draws okay, but when I'm displaying the front of the star, all the faces look the same color. It's fine from the back, and when it's tilted slightly away from the front, the faces are slightly different. Any idea what might be causing this, or how to fix it?
A screenshot would be handy here, and some more info, e.g:
-How did you setup your normals and shading?
-What type of lighting are you using - because if the light is behind the star then then only ambient (uniform) lighting will apply on the front faces.
-Are you using a 2-sided shade model, or are the faces all 1-sided?
-How did you setup your normals and shading?
-What type of lighting are you using - because if the light is behind the star then then only ambient (uniform) lighting will apply on the front faces.
-Are you using a 2-sided shade model, or are the faces all 1-sided?
The normals are whatever Blender exported them as. I checked in Blender and they're all okay. I'm using flat shading. The light isn't moving at all, it's just the star rotating, so the position of the light shouldn't be a problem. I tried turning on two-sided shading, but that didn't fix it. I think Blender does the winding automatically anyway.
EDIT: Check http://tok.dotsomething.net/starprob.gif for a bunch of screenshots. I marked each one with the angle of rotation of the star. Note that it is the star, not the camera, that is being rotated.
[Edited by - Tokage on September 19, 2004 2:07:51 PM]
EDIT: Check http://tok.dotsomething.net/starprob.gif for a bunch of screenshots. I marked each one with the angle of rotation of the star. Note that it is the star, not the camera, that is being rotated.
[Edited by - Tokage on September 19, 2004 2:07:51 PM]
Did you make the star by copying an pasting one leg? If you do this a certain way in 3d max, the normals are all messed up and you have to do stuff to sort it out. Maybe a similar effect with Blender - is there a 'reset transform' tool or something similar?
No, I did a spin-duplicate on two vertices to form two concentric pentagons pointing in opposite directions and one smaller than the other, then I made the center point and drew each face separately. To get the other side I just flipped the front over and made it the back. There's a feature in Blender to "recalculate normals," and I did that.
It looks like the normals are incorrect. It shouldn't be too hard to check all 20 tri normals manually. Just make sure the front tri normals are reflections of the corresponding back triangle normals on your XY plane (assuming X points right and Y points up). Also check they're all unit length.
FYI, you can display an image in a post using an HTML image tag, like this
<img src="http://tok.dotsomething.net/starprob.gif">
FYI, you can display an image in a post using an HTML image tag, like this
<img src="http://tok.dotsomething.net/starprob.gif">
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement