I exported my model from blender to OBJ format and then imported it into Three.js.
- The normals for the wheels appear to be facing inward.
- As for the track, only the mesh is visible and it does not seem to be correctly mapped.
Upon reimporting the OBJ file back into Blender, everything appears to be displaying correctly, indicating that the issue lies within Three.js.
Here's an image from Blender showing the correct wheel normals and properly displayed track.
You can find the Three.js code and OBJ model in this Codepen link.
var material = new THREE.MeshLambertMaterial({ color: 0xcc8729 });
// Model loader
var loader = new THREE.OBJLoader();
var geometry = loader.parse(getObjFileAsString());
geometry.position.set(0, 0, 0);
geometry.castShadow = true;
geometry.receiveShadow = true;
geometry.traverse(child => {
if (child instanceof THREE.Mesh) {
child.material = material;
}
});
scene.add(geometry);
Should I consider remodeling the wheels and track? Or is there a way to rectify this issue within Three.js?