heightmap bother

Blitz3D Forums/Blitz3D Programming/heightmap bother

Picklesworth(Posted 2004) [#1]
I made a heightmap in photoshop, though this seems to happen with everything. I load a heightmap, and on the very edges, there's a portion that pops out giving a very ugly effect. It seems almost impossible to remove these pixels that must be at the edge, so is there a way to fix this?


jfk EO-11110(Posted 2004) [#2]
Are you sure it's not a border on the Picture? AFAIK the heightmap will use exactly the heights found in the image. Maybe you need to make sure the images size is a power of 2. like 128*128, and not something like 128*129..


Picklesworth(Posted 2004) [#3]
It is a 2048 x 2048 terrain (I'll resize it to 1024 or less eventually). I have just tried trimming off the edges of the image and it still doesn't work. A picture of the error is coming soon.


Picklesworth(Posted 2004) [#4]
here's an image of the problem. The weird border actually varies in height around the terrain, but that is not seen here.
[img]

[/img]


Biofellis(Posted 2004) [#5]
It's a glitch in Blitz. If you monkey with terraindetail you might find a value to ramp it down instead of up. Otherwise you're going to have to hide it, or use a mesh. I recommend the mesh.


Rob Farley(Posted 2004) [#6]
The image link is broken but it sounds to me like you are talking about the terrain wrapping. So basically the left edge of a terrain will wrap to the right edge of the terrain, likewise with top and bottom.

The way round it is to design the terrain so that the edges are the same heights and therefore wrap to the same values.


Ross C(Posted 2004) [#7]
If you made it in photoshop, you can apply an offset filter, then blur the seems together, to make it tile.


Biofellis(Posted 2004) [#8]
Actually, Rob's right- I was thinking about my mesh library when I was trying to replicate the error before finding out (then forgetting) about the wrapping.
For the record, no one likes this, needs it, or (to my knowledge) has ever used this to good effect. As if the overhead from 'multiple terrains' couldn't kill most cards anyway if not careful.


Picklesworth(Posted 2004) [#9]
well then, I think I'll drop in a sky box that's slightly smaller than the terrain.


Biofellis(Posted 2004) [#10]
Just make a 1 pixel black border around your heightmap. Y=0 all around. It's as good as it gets. I'd do it in code- no sense clobbering your media due to a bug.


Biofellis(Posted 2004) [#11]
Er- 'feature'.