Jump to content
  • Advertisement
Sign in to follow this  
RuneLancer

Normals problem

This topic is 4874 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having some problems with two things... Here's a quick little screenshot. First problem: my normals are precalculated in the map file. However, no matter how I tweak them, this band ALWAYS remains lit like that. I'm not sure I get this. Wether I turn on smooth shading or flat shading, it seems to stay the same. And I don't have any special code doing weird stuff for certain polies (like making them transluscent or whatnot; they're all rendered the same way.) What may not be immediately apparent is that my terrain kinda goes like this... ¯¯\__ The band's the \_ parts. Is there something I've overlooked? I set my light's position, ambiant/diffuse, turn on lighting, then I just render my scene with my normals. Tweaking normals has very little impact on anything, in fact, and only slightly varies the color of my quads. Edit: This only seems to occure when I have fog enabled (no matter which kind) when the polygons fall in front of the near value. Hrm. Why only these guys? And if the solution is just to NOT have a near greater than 0, then how do I get it to work? :/ Second problem: A quick little question while I'm at it. Notice how the edges don't always meet; there's a tiny gap there. Any idea how to fix it? My coordinates overlap, such that the X of one vertex may be 3.0, and the X of the other also 3.0. In some instances, such as when I have a _/ bend, I can just extend a vertex a little more and it looks fine (though feels wrong to me...), but if I have a /\ I can't just extend the tip. And I'm quite sure that's not the right way to do this. Any ideas? :) Thanks [Edited by - RuneLancer on June 18, 2005 7:31:37 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
ether I turn on smooth shading or flat shading
are you sure that every vertex has the precalculated normal?

the gap problem: what are you glTexParameters?

Share this post


Link to post
Share on other sites
I've pretty much fixed the normal problems, which is good news to me. Granted, I may get skewed results in some places, but I've yet to notice anything out of the ordinary so it's all good to me for now. :)

As for the textures, I'm using...

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);

I've made some changes to the engine and moved the camera away a little, as sprites scaled pretty badly. The added distance mostly hides the gaps, but I'm still curious... I DO get a few holes sometimes.



[Edited by - RuneLancer on June 19, 2005 5:13:16 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!