Problem with RAW files
Hey,
I''m trying to load custom *.RAW files using NeHe''s Heightmaps tutorial, but the final terrain looks weird(it reminds me of Perlin Noise...).
I''m trying to load this RAW file(256*256):
http://www.demons.org.il/etus/Landscape.raw
And this is how it looks:
http://www.demons.org.il/etus/ProbTerrain.jpg
Do you have any idea how I can solve this problem?
Thanks,
Yuval
It looks like you''re using the heightmap info directly, rather than adjusting it to be within some range.
Try converting your heightmap to floats/doubles (if it isn''t already) and divide each element by 256.
Try converting your heightmap to floats/doubles (if it isn''t already) and divide each element by 256.
My heightmap data is already in floats. I''m afraid I don''t understand what you mean by "rather than adjusting it to be within some range" and "and divide each element by 256". I''d be happy if you would explain a bit more.
Thanks,
Yuval
Thanks,
Yuval
quote:
Original post by Etus
My heightmap data is already in floats. I''m afraid I don''t understand what you mean by "rather than adjusting it to be within some range" and "and divide each element by 256". I''d be happy if you would explain a bit more.
Thanks,
Yuval
i have to igure taht out too. what he means is : if that maps was 1024 * 1024 it would look nice since it''s shorter "256*256" somehow you have to make that ht maps streaches so it looks big just like a 1024 * 1024 .....
Metal Typhoon
Oh, yes, that I already know. But my problem is with how the terrain looks. The terrain doesn''t render well as you can see in the picture.
- Yuval
- Yuval
January 05, 2003 09:58 AM
Try dividing the height (y value) of each vertex by a constant number before you render them.
January 05, 2003 08:52 PM
Yes - It looks funny because the y height value is too high in relation to your x and z. Try reducing the y value by dividing by a constant...
Good luck
Good luck
First of all, thanks for your replys.
I devided all of the y''s of the terrain by 5 and scaled(using glScalef) the terrain by 16.0f. This is how it looks:
http://www.demons.org.il/etus/ProbTerrain2.jpg
Although it looks much better, you can see that there are still some weird hills - many of them break sharply in the highest peak rather than going down smoothly. How can I fix it? Also, is there a way to know the constant I need to use in order to devide the y''s?
Thanks,
Yuval
I devided all of the y''s of the terrain by 5 and scaled(using glScalef) the terrain by 16.0f. This is how it looks:
http://www.demons.org.il/etus/ProbTerrain2.jpg
Although it looks much better, you can see that there are still some weird hills - many of them break sharply in the highest peak rather than going down smoothly. How can I fix it? Also, is there a way to know the constant I need to use in order to devide the y''s?
Thanks,
Yuval
you need to increase the number of triangels so that there are 2048x2048 verticies.. you would also need to do some interpolation between the pixels in the height map or you would end up with ledges all over the place.
maby you could use benzier patches as a meens of smoothing things out.
-Jono AH
Just some small thoughts from the back of my head
[edited by - jonox on January 6, 2003 7:03:06 AM]
maby you could use benzier patches as a meens of smoothing things out.
-Jono AH
Just some small thoughts from the back of my head

[edited by - jonox on January 6, 2003 7:03:06 AM]
- JonoRule #1: If you build it, they will come -- to hack and cheat.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement