Questions tagged [mtl-file]

34 questions
0
votes
1 answer

loading mtl on obj file in OpenGL - how to write fragment shader?

I have an obj file with the the following mtl, see below. I am using mesh.cpp and model.cpp based on Assimp and from learnopengl. The relevant parts of the code are below. I think that everything works except Fragment Shader. newmtl k909090 Ns 163 …
0
votes
1 answer

How to read a .mtl model file into MATLAB and visualise it?

Does anyone know how to read a .mtl 3D model file into MATLAB and visualise it? The .mtl file looks like following newmtl body Ns 51.0000 Ni 1.5000 d 1.0000 Tr 0.0000 Tf 1.0000 1.0000 1.0000 illum 2 Ka 1.0000 1.0000 1.0000 Kd 1.0000 1.0000…
techenthu
  • 158
  • 11
0
votes
1 answer

How to map metallic texture in .mtl file?

I have a model I must keep in .obj format. It is accompanied by 5 texture maps (Diffuse, Emissive, Normal, occlusion, and metal). I want to reference these textures in the .mtl file but can't seem to find the syntax for that. As of right now, all I…
iby.helmy
  • 190
  • 8
0
votes
1 answer

Wrong colors when loading texture form MTL file in three js

The colors I get when loading the model are slightly warmer than the texture itself
0
votes
1 answer

Meshlab crashes when loading obj files with more than one png textures

I have an OBJ file along with a corresponding MTL and several PNG textures. I use meshlab to open it. This mesh file downloaded from free3d does not specify the texture PNG files in the MTL. So I added it on my own like this: map_Kd…
ihdv
  • 1,927
  • 2
  • 13
  • 29
0
votes
0 answers

Three.js Materials disappear after loading second Object

I'm using Three.js with the OBJLoader and the MTLLoader and everything is working fine while I only have one object in the scene, but as soon as I add a second one parts of the material on the first one just become white. I have uploaded the .obj…
alexkleyn
  • 11
  • 2
0
votes
1 answer

Does a wavefront material file need all color types specified, or can just one work?

The basic wavefront object file can omit or include many things. I am wondering if that is also true for the wavefront material file (.mtl). Available to me are: Ambient color Diffuse color Specular (Ks), weighted using the specular exponent…
Tyler Shellberg
  • 1,086
  • 11
  • 28
0
votes
0 answers

Cannot Import OBJ MTL and texture files into Cinema 4d

I have a model to import into Cinema 4d In the directory, there are two files OBJ and MTL with a single folder which holds texture image files JPG and PNG etc. I open OBJ file in Cinema 4d, and then I can view Model without material applied on…
0
votes
1 answer

How to load .obj file from URL at runtime for android sceneform sdk

I have a lot of .obj file and .mtl files stored remotely. Now, i wish to load those files in the sceneform sdk at runtime because the files are dynamically generated and i can't possibly load millions of them all bundled with the app. Is it possible…
Zhen Liu
  • 7,550
  • 14
  • 53
  • 96
0
votes
0 answers

MTLLoader doesn't show texture on the object I load

I'm new to ThreeJS, still learning. I have like an earth globe 3d object that I load into my scene, and I also have a mtl file which I load according to the documentation, but after I render the scene the globe still looks without texture. I think…
Chriss
  • 323
  • 1
  • 2
  • 10
0
votes
0 answers

Select file format .MTL (support Object format) in React Native (IOS)

I am currently working with AR(Viro) in React-Native. I'm using a 3d OBJ format to display 3d model in AR View. The problem is I can't pick the file with format .MTL in IOS. When I check the format of MTL file in IOS, it doesn't show anything and…
ToraCode
  • 421
  • 8
  • 19
0
votes
1 answer

Three.js - mtlLoader materials

mtlLoader.load('.mtl_file_path', function (materials) { materials.preload() console.log(materials.materials) objLoader.setMaterials(materials) objLoader.load('/resource/obj/mycar.obj', function (car) { do somthing }) …
엄승탁
  • 15
  • 1
  • 4
0
votes
1 answer

How to render a single DRC file with single MTL file using threeJS in browser?

I'm trying to render DRC files in browser because of much better compression results than OBJ files. I'm able to render DRC files in browser but I can't add a MTL file to it. My every object has a DRC and a MTL & I want to load/render both in…
dhruv10
  • 99
  • 1
  • 4
0
votes
1 answer

exporting threejs ShaderMaterial as mtl file?

Is there a way to export a general threejs shadermaterial of the type: var the_material = new THREE.ShaderMaterial( { uniforms: u, vertexShader: vs, fragmentShader: fs ,name:id} ); into a .mtl file ?
compmonks
  • 647
  • 10
  • 24
0
votes
0 answers

How to change metallic smoothness using .mtl file

I am trying to change the material type of an .obj file in Unity's Stander Shader. I also try to change the metallic smoothness using a .mtl file but I am unable to do so. How can I do that? My current .mtl file: newmtl wire_176026026 Ka 1.00000…
Hardik
  • 130
  • 1
  • 13