Skip to content Skip to sidebar Skip to footer

Create A Background Scene In Three Js

Hi I am trying to add a background image to my Three JS experiment. The code is working but no background is being rendered. Below is my init function: function init(){ // Create

Solution 1:

This answer might be too late, but I can tell straight away there is something wrong with your rendering.

renderer.render(backgroundScene , backgroundCamera );
renderer.render(scene, camera);

The second line will overwrite the first. I would suggest you don't make a backgroundscene and background camera, but simply add your backgroundMesh to the regular scene.

Not sure what your goal is, but if that is not an option you can have a look at rendering to a texture using WebGLRenderTarget.

https://threejs.org/examples/webgl_rtt.html

Post a Comment for "Create A Background Scene In Three Js"