0

Scene Optimization

Hello Everyone ! I am creating a Heightmap Generator where I display two canvas (The map, with a basic canvas, and the 3D view, with BabylonJS). The render is generated dynamically, with a requestAnimationFrame (used as a loop, ended when the map was generated). Problem:Firstly I got a warning that says the requestAF function took xx ms to be executed, secondly is that I'm not sure the dispose() function (for meshes) removes elements from the memory, it is more laggy each generation(while I don't refresh).

30th May 2017, 8:02 PM
Volts
Volts - avatar
1 Odpowiedź
0
I solved my problem by myself, but I renounced to the dynamic loading. Before, I used an algorithm which create each line one by one to make the heightmap, now I use the BABYLON.CreateGroundFromHeightMap function, and with a transformation of the map canvas as an image (with to canvas.toDataURL function), able to be used by this function. That is really performant face to my own algorithm. If you want to see the output: (Better on computer) http://volts.uphero.com/projects/heightmap
31st May 2017, 7:55 PM
Volts
Volts - avatar