Jump to content
  • Advertisement
Sign in to follow this  
Ludi83

OpenGL Test My Heightmap

This topic is 4661 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

Hi, the last few days, I tried to make a heightmap implementation in OpenGL. Finally, I am at a stage to show it the world ;) But the real reason I post this, is that I want to know, whether the lighting seems to be okay. I have never done lighting in OpenGL before, so I don't know, if it's correct (the vertex normals). And the more I look at my heightmap, the more I think it is wrong :) So, please test it download win32 (400 kb)

Share this post


Link to post
Share on other sites
Advertisement
I just see a really cool looking level. Maybe fix collision detection. On the lighting, I think you got it right. You're not flat shading, and I can't find a flaw with the rest of the shading. Keep it up!

Share this post


Link to post
Share on other sites
Yes, the culling is a bit dodgy. Also the movement was pretty jerky.
As for the lights, the shadows seem to fall on the wrong side with the red light, but the others look ok. Try inverting the normals.
Other than that, it's looking very nice!

Share this post


Link to post
Share on other sites
Quote:
Original post by DrewGreen
Yes, the culling is a bit dodgy. Also the movement was pretty jerky.
As for the lights, the shadows seem to fall on the wrong side with the red light, but the others look ok. Try inverting the normals.
Other than that, it's looking very nice!


Actually to me it looks as if the both the red and the green moving light lights up the wrong side of the faces. Definitely Invert the normal, or change the winding order in OpenGL.

Share this post


Link to post
Share on other sites
Thanks for all the answers :)

I've inverted the normals as you said (there was also another bug in the normals calculation). Now it looks much better. So, could you take a look at it again?

The 3D camera is only for testing, normally I use this terrain in an isomectric perspective, and there the culling works fine.

Share this post


Link to post
Share on other sites
The floor texture is doing crazy things for me. It's moving like superfast for no aparent reason. I really dont know how to explain it.

http://xenge.emulation64.com/crazyhmap.jpg

Share this post


Link to post
Share on other sites
Quote:
Original post by bjz
The floor texture is doing crazy things for me. It's moving like superfast for no aparent reason. I really dont know how to explain it.


Okay, I fixed that. It was a multi-texturing problem. I forgot to comment some code out :)

Nice, thanks

Share this post


Link to post
Share on other sites
your program looks good.

i crashed on me though.

dunno if this was a quick hack up to test your heigthmap or whatever.
maybe you dont care :)

i wasnt paying attention to what i was doing at the time, but i think i was moving off the side

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!