Having a couple of issues, What I want to do is find blank spacing between set viewports within the scene. Originally, I started to do some calculations to place in html DIVs in those spaces or use the GUI, so I don’t need to worry about resizing. I can do this but when there is a lot of spacing it gets overly complex.
As you can see, we can set viewport sizes and positions and I set a div overlay over them to give me dividers to show these viewports and make them clickable to attach control to that camera etc.
My next solution was to edit the background colour of the scene, to say black/grey and then as I know the viewports change them to white.
What it should look like, from our .glb export software
I found a playground which seems a good direction to work with.
First issue is changing this to an Arch rotate camera - if I use scene.autoClear you get mesh smearing
Logic to accommodate for blank spaces between viewports.
- Set the background colour to black/grey or whatever using clearColor, and as I know where each viewport is. 2. Change background colour of them to white. That would get my desired result.
The only thing I can find on the forums and playgrounds is a PG that scissors portions of the screen and then set the engine.clear() with the new colour.
Seems to work but the original Playground uses freecam, I need to use arch rotate cameras
Here is my PG - https://playground.babylonjs.com/#8R3AJX#11
as you can see if I do not set scene.autoClear = false; I cannot add the colours, if I add this, I will get mesh smearing whenever I rotate a model
Any help would be great.
Update - the mesh smearing seems to have gone now… https://playground.babylonjs.com/#8R3AJX#12
Am I going in the best direction ? Now I just need to look into enableScissors and find out how to get my viewport sizes, as it uses a different cord system, bottom left ?
what about Babylon.Layer to set that viewport with a background of white ?