put heightmap on mesh (sphere ...) ?

Blitz3D Forums/Blitz3D Beginners Area/put heightmap on mesh (sphere ...) ?

Prym(Posted 2009) [#1]
Is it possible to put a heightmap (with relief) on a mesh (sphere or other) ?


Warner(Posted 2009) [#2]
I'm not sure if it is what you mean, but you could maybe look into normal mapping/dot 3 lighting/bumpmapping. In this thread, is a description by sswift: http://www.blitzmax.com/Community/posts.php?topic=45515
Alternatively, you could use VertexCoords to move the vertices of the mesh.


GIB3D(Posted 2009) [#3]
And maybe a type to store the maximum amount of vertices and also the mesh?

Type Terrain
 Field Model
 Field Vertices
End Type



_PJ_(Posted 2009) [#4]
You would need to code your own form of vertex manipulation for a sphere mesh in order to read the heightmap and modify the verts of the sphere.

Depending on the size of the sphere involved, you may even be better off with a 'grid' of flat meshes (or Terrains that CAN accept heightmaps) all arranged at slight angles to make a multi-faceted polyhedron that can resemble a lower resolution 'sphere'


_Skully(Posted 2009) [#5]
Its funny you mention this.. I was going to make a game similar to Populous just before my HD crashed and I lost everything... I had created a planet creation system that worked similarly to a terrain.

Basically what you need to do is create a sphere mesh that doesn't peak at the top as most sphere creation routines do and them adjust their position based on the height map.


Ross C(Posted 2009) [#6]
A Geosphere is the one your after i believe? Then you could use a cubemap type texture to apply the height maps.