Author Topic: Corona Material/Lights Converter (continuous updates)  (Read 668741 times)


2013-06-18, 00:41:22
Reply #76

davetyner

  • Guest
I am not sure if you didn't include it on purpose but if you didn't, I can see why!  :D

hahaha, yes, there is a reason... how many materials with different interfaces did you find :-D ?

TOO MANY!

I am not sure who even uses AD materials. I almost exclusively use a&d materials with my stuff. It could be worth the effort if I knew people actually used Autodesk Mats. :)

2013-06-18, 00:47:49
Reply #77

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
TOO MANY!

I am not sure who even uses AD materials. I almost exclusively use a&d materials with my stuff. It could be worth the effort if I knew people actually used Autodesk Mats. :)

I had one or two people asking for AD materials support, but that's (imho) not worth the effort (there are some converter scripts which could be used to convert those mats to something the corona converter is working with. Why do you do it then if you're not using them at all?
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-18, 16:21:30
Reply #78

davetyner

  • Guest
I have spent a few hours muddling with the code already. I was thinking that a good workflow might be to just list out all of the properties in a text file with their corresponding property from the AD material. So like

colorDiffuse,_Color
texmapDiffuse,_Color_Map

Then run down the text file using try catch() and grab the property values when they match. Would be far better than creating a function for every single type. I also noticed that with the AD materials, there are a lot of common properties between them. The confusing part is that sometimes the same category, "Concrete" for example, will have multiple interfaces depending on what type you choose. Also, the UI changes depending on what type of Concrete you want. Accounting for all of those changes per type might get...complicated. I think the thing to do here might be to get the basic properties like Color, Reflectivity, Opacity, Bump, Maps (if any) and refine from there. I will keep plugging away at it as I have already learned some useful stuff.

2013-06-18, 16:58:24
Reply #79

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
The funny thing is that all those different AD materials are nothing else than Arch&Design materials with a different interface - it could be so easy if they just would expose the core parameters...

Sounds a bit like something this guy does: http://www.scriptspot.com/3ds-max/scripts/multyconvertor
I like the idea of dynamically wiring the parameters but not in an external file (since i want to keep the converter a 1-file-only script for easy distribution and updating)

Btw, I just found this here, maybe this is the holy grail? I didn't look further but may be worth a try
Quote
You can convert another type of Autodesk Material to Autodesk Generic by using the Copy As Generic option. See Right-Click Menu for Material and Map Nodes and Type Button Right-Click Menu.

http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/index.html?url=files/GUID-80DD9324-A341-4896-B035-17A6163BFBBB.htm,topicNumber=d30e371587

You even find a .ConvertToGeneric function if you make a "show" call on a autodesk generic material (but i somehow didn't get it working)
« Last Edit: 2013-06-18, 17:06:15 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-18, 17:27:05
Reply #80

kubiak54

  • Active Users
  • **
  • Posts: 28
  • jakubcech.net
    • View Profile
    • jakubcech
I have been just trying to convert vray mat to corona mat with your converter. Great tool, I am very thankful you do create it. Hovewer I have found, that texture in glossiness slot needs adjustment - as well as glossy value (that is adjusted autoamticaly in experimental mode). I have found that applying gamma od 0,2 works quite well in my case, do you think it would be suitable to implement function that does apply this gamma correction (via Color Correction for ex.) on bitmap on glossiness slot?

Jakub
jakubcech.net

2013-06-18, 17:35:33
Reply #81

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
Glad you like it!

I have found that applying gamma od 0,2 works quite well in my case, do you think it would be suitable to implement function that does apply this gamma correction (via Color Correction for ex.) on bitmap on glossiness slot?

Yes, glossiness is still kind of tricky. I thought about assigning a curve (output map, a bit lighter than color correct) on each of those assigned glossiness maps but I didn't really try it yet. I think that it might give some crazy results probably but I will try to do it as an optional function. The calculations are indeed pretty easy, I found the "formula" in the original vray converter which was converting MR (or was it fR?) glossiness values to Vray... so it "should" work. ;)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-18, 19:36:17
Reply #82

davetyner

  • Guest
http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/index.html?url=files/GUID-80DD9324-A341-4896-B035-17A6163BFBBB.htm,topicNumber=d30e371587

You even find a .ConvertToGeneric function if you make a "show" call on a autodesk generic material (but i somehow didn't get it working)

I saw the convert to generic yesterday. Usage like this:

Code: [Select]
m = $.material.converttogeneric
$.material = m

problem is it doesn't bring across maps.
« Last Edit: 2013-06-18, 19:48:49 by davetyner »

2013-06-18, 19:43:25
Reply #83

kubiak54

  • Active Users
  • **
  • Posts: 28
  • jakubcech.net
    • View Profile
    • jakubcech
Well, so if you are hesitating whether to implement this, I am surely for, and gamma correction is just  a curve as well. Thanks, cheers!
jakubcech.net

2013-06-18, 19:48:36
Reply #84

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
@davetyner:
ok... I'm either totally confused or I'm missing something... Why don't you need the parenthesis when you call the function? It's probably the first one (I've been using some other programming languages lately, less maxscript :D)

problem is it doesn't bring across maps.


Veeeery useful function then...  ;)

@kubiak54:
Oh, I think it's less the problem of deciding if I do it or not than the fact that it stills needs to be implemented some time (and tested ;) + I totally forgot about it. I promise I will do it soon :)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-18, 19:52:13
Reply #85

davetyner

  • Guest
lol @ that image!

Interestingly enough, the convertogeneric is a property of the material not a function.

Next thing I try will be an array of Corona properties and the AD material properties they correspond to. Will update this post soooon.

2013-06-18, 19:59:36
Reply #86

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
Interestingly enough, the convertogeneric is a property of the material not a function.
ouch, of course. Stupid me! If I use "showproperties" I should not wonder when it shows properties... :D

Next thing I try will be an array of Corona properties and the AD material properties they correspond to. Will update this post soooon.
There is a ordered list of all corona mtl properties at the end of the corona converter script. It may be helpful :)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-19, 02:43:55
Reply #87

JonyX

  • Users
  • *
  • Posts: 3
    • View Profile
Where can i download this material converter script??? I downloaded a old version but don't work and this link send me to a page that don't have a download link.  Thanks and sorry my English

2013-06-19, 10:05:28
Reply #88

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1439
    • View Profile
    • racoon-artworks
Where can i download this material converter script??? I downloaded a old version but don't work and this link send me to a page that don't have a download link.  Thanks and sorry my English

Where did you download an old version?!
The TRUE and hopefully only link to the script is on the first page and first post of this thread (going here: http://www.racoon-artworks.de/CoronaMatConverter/CoronaMaterialConverter.html).
Any sufficiently advanced bug is indistinguishable from a feature.

2013-06-19, 14:52:31
Reply #89

JonyX

  • Users
  • *
  • Posts: 3
    • View Profile
Where can i download this material converter script??? I downloaded a old version but don't work and this link send me to a page that don't have a download link.  Thanks and sorry my English

Where did you download an old version?!
The TRUE and hopefully only link to the script is on the first page and first post of this thread (going here: http://www.racoon-artworks.de/CoronaMatConverter/CoronaMaterialConverter.html).

I downloaded in another topic, a old topic. This link "http://www.racoon-artworks.de/CoronaMatConverter/CoronaMaterialConverter.html" send me to a page that don't have a download link, only a image from the script and some information. In another pages of site, says:
Quote
server moved
Posted on 31. May 2013
I’ve recently moved to a new Server and I’m currently re-designing the website.
There’s only the most important stuff online atm – so, please be patient

Have another download page??

thanks