Hello everyone!
This is my first time trying Three.js and I’m making a React website with some 3D models rotating.
I downloaded this Diamond 3D model from Sketchfab.
When I put it in my Canvas, maybe the lighting is not in the correct position or I’m using the wrong lights. It looks more like the lights are pointing to the diamond and behind the diamond.
The texture is more like emissive even though it has 3 textures .png in the download folder.
I want it to render out a proper clear shiny diamond like in the 3D Model on Sketchfab.
Can anyone please help me with this? Thank you guys so much
Here’s what on the screen:
Here are the lights that I use:
const Lights = () => {
return (
<>
<ambientLight intensity={0.3} />
<directionalLight position={[10, 10, 5]} intensity={1} />
<directionalLight position={[-1000, 1000, 100]} intensity={2} />
<spotLight intensity={1} position={[100, -1000, 100]} />
<spotLight intensity={1} position={[-100, 1000, -100]} />
<spotLight intensity={10} position={[-180, -1000, -100]} />
</>
)
}
Textures and Materials code in the downloaded gltf file:
],
"buffers": [
{
"byteLength": 56520,
"uri": "diamond.bin"
}
],
"images": [
{
"uri": "textureDiamond/DiamondOutside_baseColor.png"
},
{
"uri": "textureDiamond/DiamondOutside_metallicRoughness.png"
},
{
"uri": "textureDiamond/DiamondOutside_emissive.png"
}
],
"materials": [
{
"alphaMode": "BLEND",
"doubleSided": true,
"emissiveFactor": [
0.5643160717217226,
0.5643160717217226,
0.5643160717217226
],
"emissiveTexture": {
"index": 2
},
"name": "DiamondOutside",
"occlusionTexture": {
"index": 1
},
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicRoughnessTexture": {
"index": 1
}
}
}
],