Skip to content

help adding textures to cube #120

Answered by jnsmalm
phloud asked this question in Q&A
Aug 23, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

You can try changing the properties of the material. The standard material is using PBR (Physically Based Rendering) and depending on the settings of the material it greatly affects how lighting behaves for that material.

diceMaterial.exposure = 1 // Use a higher value to make the object brighter
diceMaterial.roughness = 0.2 // 0 is perfect smooth surface, 1 is max roughness
diceMaterial.metallic = 1 // 0 for non-metallic object, 1 for metallic objects
diceMaterial.unlit = false // Set to try to disable all lighting

Try for example to use the image based lighting in that code (which you commented out) and set metallic = 1 and roughness = 0, it will look like a perfect mirror.

If you want…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@phloud
Comment options

Comment options

You must be logged in to vote
2 replies
@phloud
Comment options

@jnsmalm
Comment options

Answer selected by phloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants