Paid OBJ files do not have MTL file instead TGA

Discussion started by redrama9

I am new to using 3D models. I am downloading them to use in A-frame webVR. Why do some OBJ files come without the MTL texture file? They have included a TGA file for textures instead. To my knowledge, I need a MTL file for the textures to work in A-frame webVR.

If I have a MTL file I can write the code like this and it works:

<a-asset-item id="palletobj" src="pallet/pallet.obj"></a-asset-item>

<a-asset-item id="palletmtl" src="pallet/pallet.mtl"></a-asset-item>

<a-entity> obj-model="obj: #palletobj; mtl: #palletmtl" </a-entity>

When there is no MTL file, and instead a TGA file it does not work. I cannot simply replace the MTL with the TGA.

Please tell me what to do when models I buy don't have a MTL file. I am wasting a lot of money buying these and not being able to use them. And there is no way for me to tell if they have an MTL file before buying. For example I bought this:

https://www.cgtrader.com/3d-models/industrial/othe...

It even says 3D model formats OBJ (.obj, .mtl). But it comes with a OBJ file and TGA file. Not OBJ and MTL

Please help! Thank you.

Answers

Posted almost 5 years ago
1

Hi,

OBJ - is a text file containing object geometry and properties
MTL - is a text file containing object materials
TGA - is a texture image, like jpg or png

Basically MTL file links your textures (as TGA) to you model (OBJ)

When you buy OBJ model without MTL file, seller probably assumes you are able to apply TGA texture to your model by
yourself, because it is usually simple as drag and drop TGA texture on your model, or super simple material setup in any software.

Since it looks like you have no knowledge about this you have few options

A) model you posted has in its "3D model details" checked "Materials" which means materials should be included.
So you should contact seller directly and request MTL file.

B) Learn basics of some 3D software (Blender is free) and how to import OBJ file, setup basic material and export OBJ file.

C) OBJ and MTL are simple text files and you can create your MTL by yourself in a text editor (Notepad etc.) if you don't
need any special material properties.

Here is simple how to
https://imgur.com/E4IzPOl

More info about OBJ and MTL files
https://en.wikipedia.org/wiki/Wavefront_.obj_file
http://paulbourke.net/dataformats/mtl/

redrama9 wrote
Thanks for your reply. I have done research on blender. And tried blender for myself. Applying TGA files as textures is more complicated than drag and drop. e.g UV mapping. You confirmed to me that if materials is checked under 3D model details then I should get the MTL files. I messaged the seller and requested them. Am I entitled to a refund if the seller doesn't give me the MTL files within a week?
Posted almost 5 years ago
1

After much research and wasted time I have found a simple solution. I will provide my own solution since no one else has. So if anyone else sees this in the future they will know. Yo don't need to use proper 3D meddling software. Photoshop works very well for this task. import into photoshop. The obj file has objects assigned to each part of the 3D image. Select the object. Right click on it. Click the materials icon. Then you can 'replace' material with the images supplied by the seller. Render when ready. When exporting the new OBJ file, photoshop will create the MTL file with the location of the materials.

Posted almost 5 years ago
1

Be careful with using 3D stock media for webGL or webVR, to my knowledge license does not allow online distribution/copying of the 3D data.

Note that webGL or webVR cannot be considered proprietary software, it basically are open frameworks (open souse software) mainly running on JavaScript API’s and three.js, they use regular 3D file formats like OBJ and glTF, (https://en.wikipedia.org/wiki/GlTF)

To my knowledge only 3D files distributed under Creative Commons license can be used for those type of uses, (https://en.m.wikipedia.org/wiki/Creative_Commons_license) unless you made the 3D content yourself.

The problem is the files are basically stored on a public server and distributed to users local browser.

License states 3D data is only allowed to enter 3D applications if they are in proprietary or encrypted file format or on proprietary disk format like Playstation or Xbox, etc. License says all measures need to be taken to prevent users from gaining access to the 3D models, with webGL and webVR that seems not to be the case.

Basically this type of situation would require a group license or network license that allow the work to be stored on a public server and X amount of copy’s to be made/distributed to users. To my knowledge no 3D stock media service provides this type of license jet.

Another solution would be the 3D data would be rendered to a 2D video stream on remote GPU servers and users only get interactive video feed, like for example Google Stadia provides, (https://en.wikipedia.org/wiki/Google_Stadia) in this case no 3D data would be distributed.

Your answer

In order to post an answer, you need to sign in.

Help
Chat