Babylon.js Viewer vs. Sandbox

Hey all,
I’ve noticed this phenomenon in different deployments as well, and I just don’t have the immediate knowledge to understand what is going on specifically and how to fix it. We have embedded a canvas into a webpage, and everything seems to work, except the model quality just isn’t the same as Sandbox. What kind of black magic is Sandbox doing to make things look so much better even at distance?

bikecompare

The aliasing found in the default Babylon.js Viewer is quite visible, in particular to the spoke almost completely falling out. In comparison, Sandbox displays them near perfect even at the same camera distance from the object.

I understand sandbox does not have FXAA turned on by default, so I don’t want to just flip that switch, and say “oh that looks better”. Is there something deeper or parameters that must be set to achieve Sandbox results?

Viewer Snippet taken from example docs:

<html>
<head>
  <title>Babylon.js Viewer - Display a 3D model</title>
  <script src="https://preview.babylonjs.com/viewer/babylon.viewer.js"></script> 
</head>
<body>
<babylon model="asset.glb" templates.main.params.fill-screen="true"></babylon>
</body>
</html>

Thanks for any assistance!

Cheers.

Sandbox does not use any sort of post process which might explain the diff, I am also suspecting the canvas size not being the same between your versions ?

This would impact greatly.

1 Like

Sandbox or Viewer does not do any post processing? I expect neither unless set for a rendering pipeline.

The canvas size has been my suspect as well, but if I resize the window to match canvas sizes, and view in developer tools the sizes are the same or close enough, should I not expect similar visual results?

Or if I choose “Full Screen” for viewer, and hide ui in Sandbox (which is essentially fullscreen), should that not atleast results in the same visual fidelity?

I’m honestly asking, because I am a 3d artist not a web developer, so the mysteries of canvas and etc. could well be the issue.

Thanks.

Yup this is definitely strange, could you share an online version to double check ?