put heightmap on mesh (sphere ...) ?
Blitz3D Forums/Blitz3D Beginners Area/put heightmap on mesh (sphere ...) ?
| ||
Is it possible to put a heightmap (with relief) on a mesh (sphere or other) ? |
| ||
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. |
| ||
And maybe a type to store the maximum amount of vertices and also the mesh?Type Terrain Field Model Field Vertices End Type |
| ||
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' |
| ||
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. |
| ||
A Geosphere is the one your after i believe? Then you could use a cubemap type texture to apply the height maps. |