drawing contours on your heightmap--
i have a heightmap and am wanting to display contours along the heightmap to maybe give more of a sense of depth at any given point in the heightmap -- anyone ever done anything liek this with their heightmaps?
heh
hey man,
I'm just getting into a little bit of heightmapping now, & I wanna know what you mean by "contour"? Do you mean shading? Do you mean textures? Do you mean differences in color based on height or coordinates? I'm still newb to most openGL stuff, keep that in mind.
:)
Luke
I'm just getting into a little bit of heightmapping now, & I wanna know what you mean by "contour"? Do you mean shading? Do you mean textures? Do you mean differences in color based on height or coordinates? I'm still newb to most openGL stuff, keep that in mind.
:)
Luke
Whatsoever you do, do it heartily as to the Lord, and not unto men.
You can do this pretty easily with a 1-D texture (say, all white, with one plack pixel at the end, or whatever pattern you want), and texture coordinate generation. Look into glTexGen and related functions. I think most documentation will even tell you how to do what you want. Basicly, you set it up to texture coordinates are based on height... then the single black pixel in the texture will 'cut a slice' through the landscape every so often, creating your contour bands.
yes wendigo23 you understand clearly what i want.. thanks!
i have a few questions however --
1. how do you create a custom 1-D texture?
--set it up with certain colors?
2. what would be the best way to "cut a slice" through the landscape?
right now my heightmap is colored by height. i have the colors interpolated from green to blue, green being the highest point and blue being the deeper values, if you want to think of it as underwater terminology. hopefully that will give you a better idea of where i am at.. thanks wendigo, hope to hear from you soon!
i have a few questions however --
1. how do you create a custom 1-D texture?
--set it up with certain colors?
2. what would be the best way to "cut a slice" through the landscape?
right now my heightmap is colored by height. i have the colors interpolated from green to blue, green being the highest point and blue being the deeper values, if you want to think of it as underwater terminology. hopefully that will give you a better idea of where i am at.. thanks wendigo, hope to hear from you soon!
heh
If you only want one gradined over whole height range then you just need one 1D texture. You can either create in your favourite paint program (size = 1xN), our use some algoritem (color/gamma/hue shifts?) to create it at runtime. Then set-up automatic texture generation (glTexGen) for this. Equation will be based only on your "up" axis. You might need to find lowest and highest point on terrain so you will scale texture over fill range.
You should never let your fears become the boundaries of your dreams.
If you want to arbitarily "slice" through the terrain you could try using a user defined clip plane but you'll only get air beneath the surface-not the "inards" of the earth below the surface
--- Terrorists deserve nothing but a painful death ---
well i do have my min and max height of my terrain. the min is 1000 and the max is 1100. this is in meters but i guess that really doesnt make that much difference. thanks all for your help, i will get back to you..after i try some things out..
heh
Quote: Original post by netflow
how do you guys generate/aquire your heightmaps?
Different ways.
-Real elevation data
-Paint them in your favourite paint program.
-Generate them proceduraly. (fractals/noise/particle deposition/hills/erosion simulation/...)
-Combination of all above
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement