Skip to main content

yourYour triangles might be specified in a clockwise order instead of WebGL's preferred counter-clockwise order. To verify, switch your material side to THREE.FrontSideTHREE.FrontSide and run it again with THREE.BackSideTHREE.BackSide and see if one gives you the correct results. IfIf the THREE.BackSideTHREE.BackSide works, then you have to go back and flip your ordering in all the Face3Face3 creations.

Regarding shading looking similar with stacked objects, Three.js: three.js does not take other objects into account when lighting each object in the render stage. Let'sLet's say you wanted to make a Minecraft clone with a bunch of boxes all stacked on top of one another. Well, three.jsthree.js will calculate each individual box's lighting as if it were the only one in the world. EvenEven if you stack them densely on top of each other, they will all look the same - light on top, dark beneath.

The lighting effect you are probably wanting is achieved by ShadowMaps in three.js three.js. Shadowing portions of an object that are obscured by other objects is a complex and expensive task which is still being hashed out by the creators of three.jsthree.js.

The normal ShadowMap mode in three.jsthree.js looks okOK for now however and it works in most cases. Hope this helped! :)

your triangles might be specified in a clockwise order instead of WebGL's preferred counter-clockwise order. To verify, switch your material side to THREE.FrontSide and run it again with THREE.BackSide and see if one gives you the correct results. If the THREE.BackSide works, then you have to go back and flip your ordering in all the Face3 creations.

Regarding shading looking similar with stacked objects, Three.js does not take other objects into account when lighting each object in the render stage. Let's say you wanted to make a Minecraft clone with a bunch of boxes all stacked on top of one another. Well, three.js will calculate each individual box's lighting as if it were the only one in the world. Even if you stack them densely on top of each other, they will all look the same - light on top, dark beneath.

The lighting effect you are probably wanting is achieved by ShadowMaps in three.js . Shadowing portions of an object that are obscured by other objects is a complex and expensive task which is still being hashed out by the creators of three.js.

The normal ShadowMap mode in three.js looks ok for now however and it works in most cases. Hope this helped! :)

Your triangles might be specified in a clockwise order instead of WebGL's preferred counter-clockwise order. To verify, switch your material side to THREE.FrontSide and run it again with THREE.BackSide and see if one gives you the correct results. If the THREE.BackSide works, then you have to go back and flip your ordering in all the Face3 creations.

Regarding shading looking similar with stacked objects: three.js does not take other objects into account when lighting each object in the render stage. Let's say you wanted to make a Minecraft clone with a bunch of boxes all stacked on top of one another. Well, three.js will calculate each individual box's lighting as if it were the only one in the world. Even if you stack them densely on top of each other, they will all look the same - light on top, dark beneath.

The lighting effect you are probably wanting is achieved by ShadowMaps in three.js. Shadowing portions of an object that are obscured by other objects is a complex and expensive task which is still being hashed out by the creators of three.js.

The normal ShadowMap mode in three.js looks OK for now however and it works in most cases.

Source Link

your triangles might be specified in a clockwise order instead of WebGL's preferred counter-clockwise order. To verify, switch your material side to THREE.FrontSide and run it again with THREE.BackSide and see if one gives you the correct results. If the THREE.BackSide works, then you have to go back and flip your ordering in all the Face3 creations.

Regarding shading looking similar with stacked objects, Three.js does not take other objects into account when lighting each object in the render stage. Let's say you wanted to make a Minecraft clone with a bunch of boxes all stacked on top of one another. Well, three.js will calculate each individual box's lighting as if it were the only one in the world. Even if you stack them densely on top of each other, they will all look the same - light on top, dark beneath.

The lighting effect you are probably wanting is achieved by ShadowMaps in three.js . Shadowing portions of an object that are obscured by other objects is a complex and expensive task which is still being hashed out by the creators of three.js.

The normal ShadowMap mode in three.js looks ok for now however and it works in most cases. Hope this helped! :)