Import - Materials tab

The Materials options tab can be found at the bottom of the .Obj Import dialog. This tab controls how new Materials are created and is further broken down into "Options", "Channels", "Textures" and "Special" tabs. The individual options are detailed below...

Options sub-tab:

This sub-tab is the 'master control' that determines whether Materials are created and/or updated as well as whether Texture Tags are created. The top 3 options are mutually exclusive...

Don't Load Materials -

If this option is selected, then no Materials are created or updated and no Texture Tags are created on the imported mesh(es). (NOTE: currently, the material Selection Tags are still created in all cases and are named the same as if Materials and Texture Tags were being created).

If this option is selected, the Channels and Textures sub-tabs are ghosted.

Always Create New Materials -

If this option is selected, new Materials are created and no pre-existing Materials in the scene are used, updated or modified in any way. Texture Tags (along with the Selection Tags) will be created on the imported mesh(es), using these new Materials.

Only Create Missing Materials -

If this is selected, any Materials already in the scene with the same names will be used. Any not found in the scene will be created. Tags (along with the Selection Tags) will be created on the imported mesh(es), using these new or pre-existing Materials.

Also, when this option is selected, the final option on this tab gives you additional control. When the "Update Existing Materials" option is disabled, the imported mesh might use some existing Materials (if the names matched), but the Materials are not modified in any way. When this option is enabled, thos Materials (or at least the Channels you have set in the Channels Tab) will be updated with settings from the .mtl file.

...note that this sub-tab controls whether or not Materials are created or modified... how they get created/modifed is further controlled by the other sub-tabs.


Channels sub-tab:

This sub-tab determines whether some specific Cinema 4D Material channel* is affected or not.

NOTE: Wavefront .mtl files support (at best) a small subset of the settings you have available within Cinema 4D and as such, there is no 1-to-1 mapping of material properties (bump maps are supported, but there's no way to specify bumpmap strength, for example).

With that in mind, I had to make some decisions about how to best map .mtl file settings into something that makes sense in C4D's idea of material properties. As another example, the .mtl file supports a 'Diffuse' color and texture map, but these are a closer match to C4D's 'Color' channel than the 'Diffuse' channel, so I translate them between the two. A similar remapping takes place between the .mtl file 'Ambient' values and the C4D 'Luminance' channel as well as .mtl file 'Dissolve' values get mapped to the C4D 'Transparency' channel, etc.

On a related note, Cinema 4D has a 'Brightness' value for various channel colors, but there's not a separate parameter for that in the .mtl file, so the RGB values are scaled by it. In other words, if you had a channel set to White (RGB all = 100%) with a 'Brightness' of 50%, you'd get a mid-Grey color. If you export that mesh, then re-import it and go check that material/channel, you'll find that the RGB values are now all set to 50% and the Brightness is set to 100% - which is opposite - but the resulting mid-Grey color is the same.

In general, Riptide Pro does the best job it can at interpretting .mtl files for use in Cinema 4D and has gone through multiple revisions and tweaking over the years (during 'Riptide' development). In the cases where the solution is still not optimal (some other apps create some odd/funky .mtl files), you now have the option (in Riptide Pro) to enable/disable individual channels, to help you fine-tune the results.

(* The 'Reflection' channel option may or may not yet be 'hooked up'. As of this writing, I'm still investigating it, but I wanted to make a place-holder for it)

Textures sub-tab:

Load Textures -

This option is found in the header area at the top of this tab. It is the 'master control' that determines whether any texture files are loaded or not. If this option is disabled, none of the other options on the Texture sub-tab matter (in fact, those options will be 'ghosted').

The "Mix Mode" and "Sampling" options just allow you to preset those same Cinema 4D Material/Texture settings (the .mtl file doesn't have this information).

The "Suggested Path" option allows you to provide a specific folder to look in for any texture files... Note that Riptide Pro doesn't actually load any texture files. It mearly tells Cinema 4D the name(s) of the texture files and Cinema 4D will look in the "Texture Paths" preferences setting (where you, the user, can set up to 10 different paths to look in) for those files.

With the above in mind, this new "Suggested Path" option allows you to provide yet another (but specific to each Riptide Pro 'Preset') path to look in. When there is some path listed here, Riptide Pro will scan that specific folder and if it finds the texture file it's looking for there, it will tell C4D the full path+filename. If it doesn't find the file there, it just tells C4D the filename and C4D will look in the various "Texture Paths" that you have set up in C4D Preferences for the file(s).

NOTE: As of v1.3, the "Suggested Path" for textures (on Import) is now recursively searched. Sub-directories of the Suggested Path are now also searched for texture files, making this option more like Cinema 4D's built-in Texture Path preferences, but on a per-Preset basis.

Special sub-tab:

This set of options was only added for a very special-case situation and is typically never needed for .obj files that most users deal with*...

The .mtl file format contains "material descriptions". These descriptions can contain information about the RGB colors to use for various channels, texture file names, bump map file names, transparency and specular information, etc. that Riptide Pro converts into basic Cinema 4D Materials. The .obj file in turn contains information the tells the plugin which material to use on which Polygons/Faces - some software allows for material information at the Vertex/Point level, but the .obj file format has no provision for this.

Because of the above limitation (no vertex-level material/color info), some software can export .mtl files that have a "material per polygon". This can result in .mtl files with literally thousands, tens-of-thousands or even millions of defined materials(!). These materials would only contain RGB 'color' info, but Cinema 4D was not designed to handle so many materials - to the point where it might take hours (days?) to fully set up and track so many materials - leading to the user thinking that the program has crashed (which it might, but it's likely just "busy" processing it all).

[*NOTE: the only example that I know of that can generate these material-per-polygon .mtl files is... the "MeshLab" program, when exporting .obj files that were originally derived from 3D-scanning software and originally exported in .ply file format (which DOES support vertex-level color information).]

Ok, with the above in mind, if you ever find yourself dealing with these humongous .mtl files, the best option would be to NOT load materials at all. The next-best option would be to use this "Special" tab to have the plugin merge "similar color" materials into fewer numbers of materials.

The RGB sliders range from 1 -> 16, with 1 being the smallest delta (least reduction) and 16 being the largest delta (most reduction). So, for example, if you have one material with the RGB colors: 4|5|2 and another material with 5|5|2, the those would end up being merged, even with a '1' delta. If there was a third material 6|5|2, it would be merged with the second material** (with a 1 delta), but would only be merged with the first material if the Red delta was set to 2 or more.

[**NOTE: as an aside, since they are processed in order, once the second material was merged with the first, the third material would no longer be merged with the second, since it no longer exists... but I hope this explanation is clear enough].