I’m loading my model using Speckle Viewer in React. The only issue I’m facing is with the lighting settings. The model is always lit from only one side, while the rest of the sides appear completely black.
Can you advise me on how to solve this and make all sides of the model visible?
I had the same exact problem in the PowerBI visual for a while… turns out the best way to initialise the viewer is to start from the DefaultViewerParams (you can import them from the viewer package).
You can then modify any of the parameters as needed and pass that in to the viewer constructor.
Hey @Gircsi117, do let us know if that sorted things out! Only poking in here to say that, if your react app is an SPA, do take care with viewer initialisation on route changes - it can lead to multiple viewer instances in the same spot (you ideally should have only one that you reuse) - visually, I remember similar looking “viewers” when I was hacking at the frontend
What you seem to be experiencing is the viewer’s default HDRI not getting loaded properly. Alan’s answer is a good starting point for trying to figure out what’s going on. Also, check the console for errors regarding asset loading.
If things are still off, let us know and we’ll get to the bottom of it