We decided to migrate from hosting directly on playcanvas to github using the playcanvas engine. Everything went fine except of one thing: the materials have a strange glossy / metal-ish look now.
You might have to zoom out a little in the beginning to get a good view.
I looked for differences at the lighting / material and found nothing. We downloaded the material directly from the playcanvas editor and didn’t make any changes.
My best guess is that the problem is with the light. We created it with the following code:
const light = new pc.Entity('light');
light.addComponent('light', {
color: new pc.Color(1, 1, 1)
});
app.root.addChild(light);
light.setEulerAngles(45, 0, 0);
It’s rather hard to tell since they’re not like for like applications. Can you publish two apps that render just a single box that demonstrates the problem? Then, I can check in WebGL Inspector to see exactly what the differences are.
The only difference is that the asset is requested in different ways (loadFromUrl in engine-only, assets.find in the other one).
I’m pretty sure the problem is with the ambient light. I think the editor has some default values for the ambient light that the engine has not. Could that be correct? And if so, is there some way to easily set the ambient lights to be equal?
IIRC, i didn’t change any settings in the editor.
Is there some place where I can look up the difference in default settings between editor and hand-coded and would you consider making the default settings equal for both editor and hand-coded?
Again, thanks for your quick and high-quality answer