Thu, Nov 28, 9:43 PM CST

Renderosity Forums / 3D Modeling



Welcome to the 3D Modeling Forum

Forum Moderators: Lobo3433

3D Modeling F.A.Q (Last Updated: 2024 Nov 24 8:50 pm)

Freeware 3D Modeling Software Links:
Blender | Trimble Sketchup | Wings 3D | Anim8or | Metasequoia | Clara IO (Browser-based 3d modeler)

Check out the
MarketPlace Wishing Well, as a content creator's resource for your next project.

"What 3D Program Should I buy?" Not one person here can really tell you what's best for you, as everyone has their own taste in workflow. Try the demo or learning edition of the program you're interested in, this is the only way to find out which programs you like.



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Object .MTL files...


MatCreator ( ) posted Fri, 24 June 2011 at 1:58 PM · edited Thu, 28 November 2024 at 5:42 PM

I hope this is simple enough, and that I am using the correct forum.....

I made an object I wanted to distribute for free. As it is simply an "object" file .obj, not native to any individual program, it has a .mtl file "attached" to it (not that others don't produce this file on export). It's not a Bryce file, a Poser prop file, or a Vue file is what i mean, but it can be imported into any program...

I just want to know how to edit the matching .mtl file so that it it will read correctly no matter where the object is. Currently, the .mtl file when created uses my personal desktop as the directory, I imagine that won't work when others try to import/use the object file...

Also, I notice it reads the diffuse/color, bump and specular maps, can we have it read anything else?!?

I've hacked Poser material and pose files, I imagine this shouldn't be that much harder...

Any help or advice would be greatly appreciated, thanks =)

There are 3 kinds of people in the world. Those that can count, and those that can't..


26Fahrenheit ( ) posted Fri, 24 June 2011 at 2:05 PM

In poser and many other programs the Mtl file is not needed at all..

Just check your original "if you have them" poser/daz items.. the OBJ files dont have mtl files with them..

Vue dont need them Carrara dont need em ..etc etc..

I never put any mtl files with my freestuff or products ..

 

Chris

HERE are my FREEBEE's

 


MatCreator ( ) posted Fri, 24 June 2011 at 3:04 PM

So how would one have an object load w/ textures w/o an .mtl file?!?

There are 3 kinds of people in the world. Those that can count, and those that can't..


nruddock ( ) posted Fri, 24 June 2011 at 4:29 PM

Most programs that read MTL files have their own quirks just as they do for OBJ files.

The best thing to do is to remove any texture paths (leaving only the filename) and put the textures themselves in the same directory as the OBJ and MTL.

Make sure any file references in the OBJ and MTL match the letter case correctly to avoid problems on Macs.

Don't worry to much about the material settings, they pretty much need redoing for any given renderer.
Any transparency must be done in the target program as that information isn't part of the MTL spec.


airflamesred ( ) posted Sat, 25 June 2011 at 4:19 AM

i don't think you need to upload the mtl file here (rendo) with the obj. Its only a basic shading info.


nruddock ( ) posted Sat, 25 June 2011 at 7:05 AM

Quote - i don't think you need to upload the mtl file here (rendo) with the obj. Its only a basic shading info.

This is correct, but if the MTL file isn't provided, the reference to it should be removed from the OBJ to avoid potential problems with some apps.


MatCreator ( ) posted Sat, 25 June 2011 at 7:48 AM

I know the .mtl file is not necessary. Also, for myself, I usually delete them immediately, as I am so used to doing texture assigning in the program I intend to render in.

However, to be more universal and NOT having or needing to conform to any particular programs method for handling textures but still wanting the textures to load w/ the object, I WANT to include the .mtl file...

Even though as mentioned I just get rid of them, you can't deny that it is useful that at the very least, the diffuse map will load w/ the object regardless of which app your using.

Even better, should we just start using Collada files that will save and load the textures w/i 1 file?!?

Of course I could simply supply the .obj w/ no references and the actual texture files, but I'm -trying- to be nice =P

There are 3 kinds of people in the world. Those that can count, and those that can't..


mairaj ( ) posted Thu, 28 July 2011 at 11:55 PM

Attached Link: 3D Modeling

**Hi Guys Mairaj here sharing some about .Mtl files**

MTL is a data directory which contains examples of MTL files. An MTL file is an auxilliary file containing definitions of materials that may be accessed by an OBJ file. The OBJ file must specify the name of the MTL file by a command such as

        mltlib <em>file_name</em>
      

It is presumed that the MTL file names and defines various materials, such as, perhaps, "shinyred" or "iron". Then, within the OBJ file, the command usemtl shinyred

indicates that all subsequence faces should be rendered with this material, until a new material is invoked.  

An MTL file contains a sequence of definitions of materials. Each definition begins with a newmtl statement that defines the name of the material, followed by lines specifying particular properties.

Example MTL File:

 

        newmtl shinyred
        Ka  0.1986  0.0000  0.0000
        Kd  0.5922  0.0166  0.0000
        Ks  0.5974  0.2084  0.2084
        illum 2
        Ns 100.2237
      

 

MTL File Characteristics:

 

  • ASCII;

 

Comments begin with a '#' character in column 1. Blank lines may be inserted for clarity. Otherwise, the file consists of a sequence of newmtl statements, followed by a definition of various properties for that material.

The quantities that may be defined for a material include:

Ka r g bdefines the ambient color of the material to be (r,g,b). The default is (0.2,0.2,0.2);Kd r g bdefines the diffuse color of the material to be (r,g,b). The default is (0.8,0.8,0.8);Ks r g bdefines the specular color of the material to be (r,g,b). This color shows up in highlights. The default is (1.0,1.0,1.0);d alphadefines the transparency of the material to be alpha. The default is 1.0 (not transparent at all) Some formats use Tr instead of d;Tr alphadefines the transparency of the material to be alpha. The default is 1.0 (not transparent at all). Some formats use d instead of Tr;Ns sdefines the shininess of the material to be s. The default is 0.0;illum ndenotes the illumination model used by the material. illum = 1 indicates a flat material with no specular highlights, so the value of Ks is not used. illum = 2 denotes the presence of specular highlights, and so a specification for Ks is required.map_Ka filenamenames a file containing a texture map, which should just be an ASCII dump of RGB values;


nruddock ( ) posted Fri, 29 July 2011 at 2:42 PM

Attached Link: http://people.sc.fsu.edu/~jburkardt/data/mtl/mtl.html

> Quote - **Hi Guys Mairaj here sharing some about .Mtl files**

If you're going to cut and paste stuff just so that you can link to your own site, the least you could do is acknowledge the original source.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.