Change background color in product model viewer

Im a beginner at playcanvas and just trying out the Product Model Viewer. I wonder a couple of things. can I use a skybox as lighting but then have a white background? How do I do that? and also set a shadow of the object on a plane at the bottom of the object.

Thanks in advance!


Hi David,

To get the uniform background you must disable the skybox layer as follows:

app.scene.layers.getLayerById(LAYERID_SKYBOX).enabled = false;

(And set the camera clear color to white).

The engine doesn’t have 1st class support for shadow catcher yet, but you can do this yourself customising shader chunks. For an example of doing this see the WebXR AR Starter Kit project (it’s one of the templates when you create a new project in the editor).


1 Like