So I have a .glb model that was made in Blender. I exported it from Blender and loaded it into the sandbox. The model has PBRMaterials, and it has AO shadow baking and other settings saved in the model. When I load the model in my code with the function
const result = await SceneLoader.LoadAssetContainerAsync(
and add a basic directional light and hemispheric light and set all the meshes as shadow generating and shadow receiving, I get a wildly different-looking model. The AO shadow bakes on the walls and floor don’t even show up, among other things. Here is a side by side comparison:
how it appears loaded into sandbox:
how it appears in code:
My modeler friend and I have been banging our heads trying to adjust lighting and material settings to emulate what we see in the sandbox in code, to no avail.
Can anyone please provide a playground example of how to setup the basic settings for lighting, hdr, etc. in code to exactly emulate what is provided in the sandbox, or at least point me in the right direction?
I feel like I’ve combed enough through all the docs about lighting, PBR, materials, etc. and still can’t emulate what I see in the sandbox, which should just be an easy 1,2,3 plug and play as I load in a model in code.
Are settings stripped from the glb when exported from the sandbox? Does the sandbox do extra preprocessing (settings added) when loaded in? What is that preprocessing that is performed as the model is loaded into the sandbox? Where can I find the sandbox hdr used? These are the kinds of questions I’m asking myself, and figured I’d enumerate here if anyone can provide some closer to them.
I don’t really want to have to hard code all the settings that I see in the sandbox for preprocessing the model and hdr upon load.
Do I need to port over the entire sandbox code from github? what code in the sandbox github should I be looking at? I feel like that would be superfluous to just get the same exact model to look right in the sandbox and in code, no?
Thanks very much in advance.