Been looking at developer API for a while, can’t seem to find any ‘shininess’ or a setting that’s between 0-100
Hey, it is in standardMaterial
API, the parameter is called gloss
Left: Editor glosiness 100
Right: material.gloss = 1;
doesn’t seem like
or there’s something else different between default editor new material and new pc.StandardMaterial
I would take look at materials other
options maybe you need to enable or disable some rendering options to get same result as in editor?
Seems like there’s more differences than I’ve imagined
left: default new pc.StandardMaterial
right: editor default
Wonder why new pc.StandardMaterial doesn’t inherit skybox once its created and applied
I’m starting to think the roots of this is in the way how i load skybox
pc.app.scene.envAtlas = textureAtlas;
pc.app.scene.skyboxMip = 0;
or perhaps no…
creating a new material from editor, applying it to a box, seems to have this nice reflections even after the app was started
Trying to find solution
material.cubeMapProjectionBox = pc.CUBEPROJ_BOX; - no effect
You can first try to adjust the gloss
value of an editor copy by script, to be sure that works as expected.
Let me again point you to these awesome examples - some likely do similar things to what you need here: PlayCanvas Examples
Im sure it works as expected
Thank you but its something with materials that I dont understand, not the skybox. Once app is started - all editor materials works as expected, can create new ones, adjust. Probem is with materials created by code, misses something.
Got it working… Thanks
To achieve same reflectivity using new pc.StandardMaterial as in default editor-material (glossiness 100, even though metalness is unchecked):
entity.render.material.gloss = 1;
entity.render.material.metalness = 0;
entity.render.material.useMetalness = true;