I searched online for the question about whether an .obj file contains a texture. Some people said that we can extract textures from the .obj file, some said that the .obj file only stores geometry data and does not keep any materials and textures. Some online tutorials said "Export the model together with the texture into the obj file". When I study the example from three.js, the script takes the texture file and the obj file separately. So, it is so confusing as to whether the .obj file exported from Blender contains a texture.
1 Answer
When you export an obj from blender, it creates a .obj and a .mtl file. As I understand it, the .obj file contains the geometry data and the .mtl file contains the texture data. So as long as you keep the .obj file, the .mtl file, and the textures together, your model should retain its texture.
-
$\begingroup$ For some examples, I see there are also
.dds
files. When I delete it, the texture is gone. However, there is no.dss
files generated after export. So, it is necessary to have.dds
files for the rendering? $\endgroup$– CasperNov 21, 2016 at 16:25 -
$\begingroup$ @CasperLIWaiKin a .dds file is a Microsoft format for storing data compressed with the proprietary S3 Texture Compression (S3TC) algorithm, so it is possible that image is your texture. If that is the case than yes, you would need to keep it. $\endgroup$ Nov 24, 2016 at 13:23
-
-
1