PDA

View Full Version : two issues about terrain rendering



zax
03-20-2005, 06:23 PM
hi, everyone.
Now I am creating a terrain from a bitmap image.
Mapping a moderate texture to the whole terrain may cause blurring effects when taking a close look. So I tend to texture-mapping each quad and enable mipmapping function. But how assign texture coordinates if i rendering the terrian with triangle stripes? thanks!
another question,
Is there any good camera or navigation model for terrain scaning, including walk and birdview. Can someone give me some directions or doc sources I can refer to. I really appreciate your help.

uruk
03-20-2005, 09:38 PM
http://www.gametutorials.com/gtstore/pc-71-1-height-map-4-volumetric-fog.aspx the tuts here used to be free of charge but now they cost $5.
also look at the tuts here: http://nehe.gamedev.net/default.asp

Roquqkie
03-20-2005, 11:12 PM
don't support gametutorials :) Crappy code and it costs you 5$ ! >:|
There are lots of free resources on the internet.

To help you, please describe your problems, since I really can't see what's wrong with using tri-strips and texture each triangle? :)

Good luck!

Best regards,
Roquqkie

zax
03-21-2005, 10:06 PM
ok, I describe my problem again. And again I would like to express my appreciation for your help.
0 2 4
|-------|-------|
| / | / |
| / | / |
| / | / |
|-------|-------|----
1 3 5

for(int i=0; i<TerrainLenth-1; i++){
glBegin(GL_TRIANGLE_STRIP);
for(int j=0; j<TerrainWidth-1; j++){
glTexCoord2d(?);
glVertex3f(j, heights[i*TerrainWidth+j], i);
glTexCoord2d(?);
glVertex3f(j, heights[(i+1)*TerrainWidth+j], i+1);
}
}So as I apply a common texure to every quad, How should I assign texture coordinates.

zukko
03-22-2005, 08:15 PM
http://www.robot-frog.com/3d/hills/index.html