Search the Community
Showing results for tags 'height map'.
Hi, I implement 3D map/ground video (dynamically loaded height map and texture image data via websocket). For dynamic texture I can use BABYLON.DynamicTexture(...) and update it every video frame: context = ground.material.diffuseTexture.getContext() ... context.putImageData(...) ground.material.diffuseTexture.update() Is there a way to update the height map dynamically like the dynamic texture ? What I should use instead of BABYLON.Mesh.CreateGroundFromHeightMap ? Thanks, Vladimir
Hi All Im pretty sure this cant be done but I will ask anyway. Is it possible to apply a height map to a shape (mesh model). For example: http://www.babylonjs-playground.com/#RF9W9#398 The above PG provides a simple 3D mesh model with a ground texture applied. Is it possible to apply a height map to the 3D mesh model for added realism? If this is possible I can see lots of applications whereby 3D objects could have height maps applied that enable them to be more representative of the real world (e.g. in the above PG example a height map with small undulations would make the gound appear much more realistic - i.e. better than using a bump map). I can envisage that the potential drawback is that if all objects in a 3D game scene used this technique there would be significantly more facets to process, that said the game designer would just need to be more restrictive over what objects have the height map applied. Anyway, put me out of my misery - does this feature exist!?
Hello everybody! I'd like to create a terrain that is moving in cycle generated from height map in effective way. I created mesh with new BABYLON.Mesh.CreateGroundFromHeightMap('ground', "http://i1198.photobucket.com/albums/aa455/BelindaSaxondale/album/HeightMap.jpg", 200, 200, 50, -20, 20, scene, true); So I have 200x200 plane with 50 subdivisions. Then I registered before render function in which I take first 51*3 points (51 vertices, cause there is 51*51 vertices) and put it at the end of position array of vertices data of mesh. So it should move the terrain in the cycle, but maybe I'm doing something wrong. Here is my playground: http://www.babylonjs-playground.com/#1CUE8G#5 . I achived something like this here: http://www.babylonjs-playground.com/#1CUE8G#3 but I don't think it's effective way.