|06-20-2013, 03:56 AM||#17|
Nocturnal Sun Gazer
Join Date: Apr 2003
I don't mean to hi-jack the thread - just to help - but having said that, I did want to mention that my Riptide Pro plugin [among hundreds of other useful things...] does of course read .mtl files (you can even select them directly, and read them instead of a .obj + .mtl, if you want).
With that out of the way, your script is useful for people who don't use my plugin, so...
This is actually incorrect. The 'd' ("Dissolve" / transparency) record: 0 = completely transparent, 1 = completely opaque. As far as I know, there is no "Tr" keyword in the file format. I may not have seen the Wikipedia article you mention, but it sounds incorrect. This link is about the closest thing you'll find for the actual/original spec, although this link might be a little easier to follow.
Technically, there should be NO path information in a .obj or .mtl file... (at least that is my contention). Note that the file format is so old that it didn't ever even address things like "spaces" in file names - spacing (white space) is instead used to separate record statements and qualifiers. Riptide Pro strips out any path information and let's Cinema 4D find texture files based on properly set up Cinema 4D "Texture Paths" preferences and/or it's own local searching (local tex folder, etc). I'd recommend doing the same.
Good point... just to add to that, you'll find that there are various levels of "horrible" implementations of importing/exporting .mtl files. Daz Studio (D|S) is notorious for "not following the spec", for example. Everything from including (it's own idea of) path information to inventing it's own keywords (and capitalization) for records.
To make a robust reader, Riptide Pro has the following "work-arounds":
Anyway, I haven't seen/looked at your script yet, but I'll be interested in trying it out.
Last edited by Keith Young : 06-20-2013 at 04:24 AM.
|06-20-2013, 03:56 AM||#18|
Lord of the posts
Join Date: Sep 2003
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|
|Thread Tools||Search this Thread|