I'm currently working on a web-based height map generator with Three.js. I use one canvas to show the actual generated height map, several others for displaying the separate octaves the height map consists of and another one for demonstrating the height map 'in action' where it is applied directly to a plane mesh.
So far so good. The whole stuff also renders perfectly fine with all the predefined parameters (wavelength, etc.). The actual problem is, that the canvasses aren't updating after the initial render pass which makes my program completely useless since the purpose of my program is to be able to manipulate the several parameters of the height map with sliders and see the effects in real time.
Sadly the only canvas that updates at all is the one with the 'real' 3D scene with the plane mesh. But also here it kind of seems like the data from the first render pass never got cleared, but at least it seems the uniforms for the noise parameters are updated correctly - this is obviously not the case for all the other canvasses.
Before I finally render a scene, I always set the needsUpdate
field of the meshes material to true
, but it only seems to work for that one canvas that got initialized last. I'm completely lost here and also wasn't able to find any information about that issue.