Zeophlite
01-09-2007, 01:56 AM
Hello,
I'm attempting to make an extremely basic heightmap.
The desired effect is just to have "grey" triangles of different darkness. The dark triangles would be to the far side of the light, with the light triangles to the close side of the light.
Eventually I'm planning on changing the colour to match the terrain - probaly through textures. However now I'm just trying to have a generic grey heightmap.
When I try running my code, it outputs these images:
1 (http://img221.imageshack.us/my.php?image=screen1wireframelb2.png)
2 (http://img187.imageshack.us/my.php?image=screen2wireframebg5.png)
Obviously this isn't what I intended.
To clarify, this is the effect I was hoping for:
3 (http://img141.imageshack.us/my.php?image=gridxa1.png)
(note that this grid is a different heightmap, but the effect is still the same)
Here is my current code: (lots of unrelated code has been removed to ease reading)
main.cpp (http://www.geocities.com/zeophlite/main.cpp.txt)
CHeightMap.h (http://www.geocities.com/zeophlite/CHeightMap.h.txt)
CHeightMap.cpp (http://www.geocities.com/zeophlite/CHeightMap.cpp.txt)
What additions/changes need to be made to create the effect i desire?
Thanks in advance,
Daniel
I'm attempting to make an extremely basic heightmap.
The desired effect is just to have "grey" triangles of different darkness. The dark triangles would be to the far side of the light, with the light triangles to the close side of the light.
Eventually I'm planning on changing the colour to match the terrain - probaly through textures. However now I'm just trying to have a generic grey heightmap.
When I try running my code, it outputs these images:
1 (http://img221.imageshack.us/my.php?image=screen1wireframelb2.png)
2 (http://img187.imageshack.us/my.php?image=screen2wireframebg5.png)
Obviously this isn't what I intended.
To clarify, this is the effect I was hoping for:
3 (http://img141.imageshack.us/my.php?image=gridxa1.png)
(note that this grid is a different heightmap, but the effect is still the same)
Here is my current code: (lots of unrelated code has been removed to ease reading)
main.cpp (http://www.geocities.com/zeophlite/main.cpp.txt)
CHeightMap.h (http://www.geocities.com/zeophlite/CHeightMap.h.txt)
CHeightMap.cpp (http://www.geocities.com/zeophlite/CHeightMap.cpp.txt)
What additions/changes need to be made to create the effect i desire?
Thanks in advance,
Daniel