Skip to main content
GameDev.net gamedev.net
🔒 Locked

Test My Heightmap

Started by Ludi83 Oct 10, 2005 at 6:43 PM 7 replies 950+ views
Original Post
Ludi83
Ludi83
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)
dbzprogrammer
dbzprogrammer
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!
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
subi
subi
there seems to be an error in your culling code too
DrewGreen
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!
"I must not fear. Fear is the mindkiller. Fear is the little death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past me I will turn to see fear's path. Where the fear has gone there will be nothing. Only I will remain." ~Frank Herbert, DuneMy slice of the web
Grain
Grain
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.
Ludi83
Ludi83
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.
bjz
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.

http://xenge.emulation64.com/crazyhmap.jpg
Ludi83
Ludi83
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

rip-off
rip-off
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.