• Popular Now

• 12
• 11
• 9
• 10
• 13

Archived

This topic is now archived and is closed to further replies.

Z-coord in terrain

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

Recommended Posts

Hi all, What is the Z-coordinate for in terrain. For example, if I am rendering a terrain made up of quads, I set the Y-vertices from the value I get from my height map, but what about the Z? Also, after drawing the first quad, I''m presuming the next quad has to start from the last quads x,y position as shown below: |\ |\ | | \| \| 1 2 Thus quad 2''s x,y vertices same as quad 1''s ? If not surely the quads wouldn''t be joined together ? Kind regards, Steve

Share on other sites
If y is height, and you know what you do with x, isn't it quite obvious what you have z for?
mapmapmapmapmapmapmapma -pmapmapmapmapmapmapmapm |apmapmapmapmapmapmapmap |mapmapmapmapmapmapmapmapmapmapmapmapmapmapmapm zapmapmapmapmapmapmapmap mapmapmapmapmapmapmapma |pmapmapmapmapmapmapmapm |apmapmapmapmapmapmapmap |                        -|---------- x ---------|

EDIT: this is the map viewed from above...

[edited by - Enselic on March 25, 2003 10:40:19 AM]

Share on other sites
Thanks,

So, Z is the columns of the map - right ?

Share on other sites
What I meant to say is how do you generate the Z vertices when making the vertices for the quads of the terrain.

Thanks,
Steve

Share on other sites
Naturally, for a pixel of location (row,col) you use row to calculate the X position, and the col to calculate the Z position.

Multiply row /col by the width/height of your terrain quads.

Cheers,