Author Topic: Corona Material/Lights Converter (legacy)  (Read 764102 times)

2013-11-30, 11:42:24
Reply #135

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8921
  • Turning coffee to features since 2009
    • View Profile
3dsmax normal map implementation is FUBAR, you need to use CoronaNormalTex instead
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2013-11-30, 12:45:43
Reply #136

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
hi DeadClown, i have a doubt .. so you can't use normal maps for now inside corona materials?...  i'm totally in love with corona..  i can't wait to get the whole features...   

You can, the Converter Script converts max's native "Normal Bump" and Vrays "VrayNormalMap" to a coronaNormalTex
Any sufficiently advanced bug is indistinguishable from a feature.

2013-12-02, 11:07:25
Reply #137

LKEdesign

  • Active Users
  • **
  • Posts: 83
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
First of all, thanks for a great script, - not just a normal re-piping thing but an intelligent one - so cool!
I am hassling with the Autodesk Materials problem to as I work closely together with companies working with Revit, and yes, as some other here wrote, sometimes I fall in the pit of laziness and grab to the fast solution of choosing a premade Autodesk Material. Often regretted afterwards, but never the less sometimes  it can be usable. The settings are however often very weird, - not the least for us Europeans that work with the metric system. God Damn It!!! (Wake up Autodesk!! )

Seeing it in the light of this, would it be an idea if the converter had an option - or rather two ...

1) Gather all objects having unconverted/unsupported materials in a named selection set
2) add a default white (or a Corona material of your own choose) to these objects. This might be a  function that was only possible if the first option was chosen.

This will make it possible to painlessly convert (old) scenes and be able to render them without having it glowing red from everywhere. At the same time it would be easy to isolate the problematic objects and manually change their materials.
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2013-12-02, 11:18:37
Reply #138

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
That's not a bad idea :-)
I can do #1 pretty easily I guess (at least with materials, maps are a bit harder because there are so many of them which "may be working" out of the box without converting or testing them.
#2 is also doable

I'll add it to my todo list and it will likely be available in the next release of the script (which will be at the same time as A6 is released)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-12-03, 10:27:15
Reply #139

Coronaut

  • Active Users
  • **
  • Posts: 131
    • View Profile
Thank you for this script!  It would be great if there is "show bitmap in viewport" option to check in/out when converting, if this is possible at all.

2013-12-04, 22:50:32
Reply #140

LKEdesign

  • Active Users
  • **
  • Posts: 83
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
I guess it's pretty useful to convert skies. Since those are kind of maps/materials it may happen in a material converter. Sure, it could be equally done in a lights converter thing but that's not my business ;)
About the changing render thing. I don't like changing the renderer directly. That's something the user should do. There are sometimes things you want to check twice before switching the renderer - and this is (for both) just a click or a line of code.

i agree with Quizzy, after having worked with the converter for some days now. It feels logical that you have an option, a checkbox, giving the opportunity to automatically switch the render - as this is what you will do 9 out of 10 times after converting the materials - there is not much point in staying at the old render once the materials are converted.

To prevent undesired switching, you could uncheck this option when entering the converter, so that the user must make an effort to make the switch - but a little less effort than to go to render dialog and change render. We are all lazy at some point, aren't we?!
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2013-12-04, 23:10:53
Reply #141

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
Thank you for this script!  It would be great if there is "show bitmap in viewport" option to check in/out when converting, if this is possible at all.

Wouldn't it make much more sense to have a (additional) script which switches those maps on/off for selected objects? I don't really see the benefit of displaying each and every map in the scene - may slow down everything a lot.

i agree with Quizzy, after having worked with the converter for some days now. It feels logical that you have an option, a checkbox, giving the opportunity to automatically switch the render - as this is what you will do 9 out of 10 times after converting the materials - there is not much point in staying at the old render once the materials are converted.

To prevent undesired switching, you could uncheck this option when entering the converter, so that the user must make an effort to make the switch - but a little less effort than to go to render dialog and change render. We are all lazy at some point, aren't we?!

Actually... it's just 1 line of maxscript code ;) I'll think about integrating it to the script.
Code: [Select]
renderers.current = CoronaRenderer()
Any sufficiently advanced bug is indistinguishable from a feature.

2013-12-04, 23:38:06
Reply #142

Juraj

  • Active Users
  • **
  • Posts: 4159
    • View Profile
    • studio website


Wouldn't it make much more sense to have a (additional) script which switches those maps on/off for selected objects? I don't really see the benefit of displaying each and every map in the scene - may slow down everything a lot.

Does it ? I have switched on everything, hundreds of maps, and doesn't affect the performance at all in my scenes. The problem is that before conversion, the maps were most likely turned on, but after conversion, it all turns to diffuse color, regardless if the diffuse slot is populated with map. It's easy to switch for few objects, but for multi-materials 20+ (like books) or huge amount of object decor/staffage this is impossible. And native max "show materials with maps" doesn't work, because Corona shader doesn't use this option.
I do think as well that this is greatly annoying.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2013-12-04, 23:59:45
Reply #143

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
I actually didn't try showing all maps of my scene, but I would have expected slow downs.
You can try if this code snippet works for you it's pretty simple and a little "brute force" but it should do the trick for most stuff (it can take quite some time though until max is responding again).

Code: [Select]
for o in (getclassinstances CoronaMtl) do(
try(showTextureMap o o.texmapDiffuse true)catch()
)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-12-05, 01:31:40
Reply #144

Juraj

  • Active Users
  • **
  • Posts: 4159
    • View Profile
    • studio website
I actually didn't try showing all maps of my scene, but I would have expected slow downs.
You can try if this code snippet works for you it's pretty simple and a little "brute force" but it should do the trick for most stuff (it can take quite some time though until max is responding again).

Code: [Select]
for o in (getclassinstances CoronaMtl) do(
try(showTextureMap o o.texmapDiffuse true)catch()
)

wow, if that would do it I would be eternally grateful :- ) At the moment it writes in red something only, but I might be just dumb and not know how to use it properly..
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2013-12-05, 10:17:16
Reply #145

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
mhhh... you should just need to run it in the editor window (not the listener (the window with the pink box))
You can also copy the text into a textfile, rename ist whatever.ms and drag it into a max viewport..

..or you save the following text as a .mcr and you have a macroscript, ready do put it to a menu or something :)

Code: [Select]
macroScript ShowAllTextureMaps
category: "CoronaScripts"

for o in (getclassinstances CoronaMtl) do(
try(showTextureMap o o.texmapDiffuse true)catch()
)
)

If that's still not working you need to show me the red output ;)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-12-05, 16:24:16
Reply #146

Coronaut

  • Active Users
  • **
  • Posts: 131
    • View Profile
I think its good stuff to have, just cuz your convertor have option to convert selected objects, that way you can check box show in viewport, especially if you don't have material in Mat. Editor so you can check if tiling is in order, it will save you one step, and as Juraj says its easy when you have few materials but if you have 20-30-40 or 100 it would make no sense to do it manually. Today when you have 3gb-6gb on graphic cards it wouldn't be problem at all, and if its optional i cant say how this can be bad thing, i know you have performance concern but machines today are more than able to handle that.
One example: Lets say i import chair or sofa or lamp... it is in Vray mats... soon i convert it to corona it will go gray, in order to see if everything is ok i will need to add that multi maps to ME and check show in viewport and that will be few minute job depending on complexity of object, if there is option in your converter it is easy just to check that option while converting and if UNC paths are ok it will be shown.
Well i wish you think about this once again, either way i think that this converter "rocks" :D   

2013-12-16, 23:44:14
Reply #147

LKEdesign

  • Active Users
  • **
  • Posts: 83
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
Dear deadclown

It appears to me that, when converting The A&D materials, The reflection color value are set far to high (255,255,255) giving some burned out highlights in the render. Wouldn't something like (180,180,180) be more appropriate ?
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2013-12-17, 15:46:21
Reply #148

shadowman

  • Active Users
  • **
  • Posts: 105
    • View Profile
got this with daily Build timestamp: Dec 17 2013 00:56:36
-- Unknown property: "emissionOn" in 01 - Default:CoronaMtl

I know that script should work fine only with stable build
but can we have some fix for latest daily?

2013-12-17, 16:47:31
Reply #149

DeadClown

  • Global Moderator
  • Active Users
  • ****
  • Posts: 1445
    • View Profile
    • racoon-artworks
One example: Lets say i import chair or sofa or lamp... it is in Vray mats... soon i convert it to corona it will go gray, in order to see if everything is ok i will need to add that multi maps to ME and check show in viewport and that will be few minute job depending on complexity of object, if there is option in your converter it is easy just to check that option while converting and if UNC paths are ok it will be shown.
Well i wish you think about this once again, either way i think that this converter "rocks" :D   

I may add it as an optional button, not as a checkbox (maybe, I'm not sure yet). The problem with checkboxes is that people just activate everything they see and then wonder why it's slow like hell ;)

It appears to me that, when converting The A&D materials, The reflection color value are set far to high (255,255,255) giving some burned out highlights in the render. Wouldn't something like (180,180,180) be more appropriate ?

For me it works exactly as expected, reflection color and reflection level are converted 1:1. The default reflection color is white with a reflection level of 0,6 in the Arch & Design material and that is converted exactly in this way to corona.

I know that script should work fine only with stable build
but can we have some fix for latest daily?

I don't want to publish a script here which does "temporarily" fix this issue (because a lot of people will download it without reading what it is) but you can do one of the follow things:
- I would suggest to use one of the older builds to convert your files (2013-09-17 should be still working fine i guess)
- comment the lines which are producing errors (this is a bit of work though). Each material conversion function has a paragraph which is responsible for emission. This can be commented completely and it will work.
Sorry for the inconvenience but I just don't want to release a version which will cause a lot of trouble because people or wondering why the script fails in their corona version.
Any sufficiently advanced bug is indistinguishable from a feature.