I am currently working on developing a video game using three.js. Recently, I downloaded a model from the internet and upon checking the directory, I found the following files:
- city.obj
- city.mtl
- city.max
- city.FBX
After some research, I learned that city.obj is used to load the model itself, while city.mtl applies textures to the model. However, I encountered an issue where the textures were only being applied to specific parts of the model. Could this be due to not loading the other two files: city.max and city.FBX?
What exactly are city.FBX and city.max in a model? And if they need to be loaded, how can I do so? Below is the code snippet that I have been using to load the model from city.obj and apply textures from city.mtl:
new THREE.MTLLoader().setPath('city/').load('city.mtl', function (materials) {
materials.preload();
new THREE.OBJLoader().setMaterials(materials).setPath('city/').load('city.obj',
function ( object ) {scene.add( object ); }, undefined, undefined );
});