Currently delving into the world of Three.js, I encountered my first major hurdle when transitioning from native primitives to imported OBJ objects.
I created a simple dodecahedron model that I UV-mapped in Cinema4D r15 and exported as an OBJ file. Strangely, when using this model instead of the DodecahedronGeometry primitive, the geometry no longer appears lit by my directional light.
Check out this JSFiddle for reference: https://jsfiddle.net/xm3ttmxw/1/
Here is the desired result (using a primitive): https://jsfiddle.net/84hbs7ed/1/
In my code, I have set the receiveShadow
property to true
for all meshes in the OBJ. Shadow maps have been activated for both the light source and renderer. The directional light follows the camera and is directed towards the center of the dodecahedron. The ambient light is functioning properly.
If you have any insights or solutions, your help would be greatly appreciated. Thank you!