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

2015-03-19, 18:37:42
Reply #510

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Hi, custom icon surely would be a nice addition, even a clown one ) - why not, in it's absence I for instance, am constantly forgetting which icon I used for CMLC the last time (after the previous update) and sometimes search for it for quite some time both when selecting a new one and when trying to find cmlc using new one after. About simplicity, well hard to argue with that - still I'm never use scripts by dragging them into max instead I always do buttons for them using this simple and quick method http://pablab.pasart.net/3ds-max-how-to-create-maxscript-toolbar-button/ so personally I wouldn't be too unhappy if I would have to do some more additional manipulations which in turn probably will be less than all those that I do now each time.
I'll soon provide another simple script that can be used in conjunction with the converter. You can install that macroscript and still use the converter as it is + add the new versions by simply copying them to your scripts folder (as it is now). The macroscript will always use the latest version.


So when I try to convert such a scene to Corona, I obviously have a problem with those shaders still being there unnecessarily. How do I go about automating the remedy for this? What I'd love to happen is the texmap used in the Composite map to be used directly as a diffuse map and the AO scrapped. Maybe someone clever could even implement that into the converter? :D
It's not too hard to do it with some lines of script, but it's way to specific for the converter. You would probably be the only person who would ever use it ;)
But I see that I need to add support for the MR AO texmap, will be added in the next version.


Hello - sorry but just wondering if you have converter from corona material to vray converter?
Here is one, but it does not work for Corona 1.0 (yet?) https://forum.corona-renderer.com/index.php/topic,6375.0.html
Any sufficiently advanced bug is indistinguishable from a feature.

2015-03-21, 03:54:57
Reply #511

markeeyboy

  • Active Users
  • **
  • Posts: 5
    • View Profile
Thanks for the reply !
I will give it a try first
I hope it works.

Cheers Clown

2015-03-21, 19:55:34
Reply #512

cgiout

  • Active Users
  • **
  • Posts: 158
    • View Profile
Hi.
Had this error today converting an old scene created in Vray 2.x + Siger shaders.
Please note that the 4 jpg files are no longer existing in my hd.
Btw the scene seems to be rendered correctly except for carpet that was using Vray fur.

EDIT: stupid me, i probably misunderstood the error message...think the error simply refers to missing maps.
« Last Edit: 2015-03-23, 09:53:55 by cgiout »

2015-03-23, 07:35:00
Reply #513

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Thank you for the amazing script. I don't know if these are bugs or missing on purpose.

* I did a conversion on a scene earlier, and I noticed the translucency map was missing on the corona material.

* The translucency map got converted on the leaf material, but there was another problem. The material is using the same texture in Diffuse and Translucency. But the Bitmap that was connected to Translucency had other values in "RGB Level" in the Output tab. The converter removed the Translucency bitmap and connected the Diffuse bitmap instead. Maybe because they are using the same texture.

* The vray material is blending a Normalmap and a Bump, that was also missing. Is "Normal Bump" supported by CoronaNormal?
« Last Edit: 2015-03-23, 07:53:54 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-03-23, 10:15:28
Reply #514

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Had this error today converting an old scene created in Vray 2.x + Siger shaders.
[...]
EDIT: i probably misunderstood the error message...think the error simply refers to missing maps.

Hi, thanks for the report :) . Yes the error message is due to missing maps - but this is not intentional. The conversion error messages should only occur when there is a maxscript problem, not a map problem. It's due to the way autodesk maps work and I'll have a look to change it.

Thank you for the amazing script. I don't know if these are bugs or missing on purpose.

* I did a conversion on a scene earlier, and I noticed the translucency map was missing on the corona material.

* The translucency map got converted on the leaf material, but there was another problem. The material is using the same texture in Diffuse and Translucency. But the Bitmap that was connected to Translucency had other values in "RGB Level" in the Output tab. The converter removed the Translucency bitmap and connected the Diffuse bitmap instead. Maybe because they are using the same texture.

Well, "kind of" on purpose. The point is that users normally don't use translucency inside VrayMtls in conjunction with Vray2sided materials. The script assumes that, in order to make the effect similar in corona, it should take the map that is used in the Vray2sided material (that's how people normally use translucency with Vray2sided) and assign it to the translucency channel in the resulting CoronaMtl. If there is no translucency map in vray2sided, it takes the diffuse map of the front Mtl.
I admit that this may not be the right way to convert a material depending on how you do your materials, but in most cases it creates visually similar results to the original Vray version.
The VrayMtl translucency is never converted, it's always lost - I don't see a way to convert it properly =/

* The vray material is blending a Normalmap and a Bump, that was also missing. Is "Normal Bump" supported by CoronaNormal?
No, it's not supported. In Corona you can't blend normal and bump maps. That's why it's gone after conversion.
« Last Edit: 2015-03-23, 10:23:56 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2015-03-23, 13:51:30
Reply #515

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
New version!
I also added a separate macroscript file for download on the website. It always loads the latest converter script file from the scripts directory.

Get it here: http://www.racoon-artworks.de/CoronaConverter/CoronaConverter.html

changelog:
v1.05 - [2015/03/23]
  • added support for Ambient/Reflective Occlusion map
  • added support for Multi_Sub_Map
  • fixed: VrayMtl conversion did not properly convert the SelfIllumination multiplier in some occasions
  • fixed: Autodesk_Map printed error report when source file did not exist
  • fixed: link colors for light max ui
Any sufficiently advanced bug is indistinguishable from a feature.

2015-03-23, 14:17:58
Reply #516

Stan_But

  • Active Users
  • **
  • Posts: 526
    • View Profile
    • https://www.behance.net/archdizs

2015-03-23, 14:54:05
Reply #517

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Well, all the changelog, html, download.php, version number files and stuff is done automatically by a custom build-manager script I made for the converter, so it's just a few clicks (it even posts the changelog here :D) but I don't have a way to make the screenshot automatically yet ;).
A more problematic thing is that the javascript snippet I use on the webpage to include the version info and changelog doesn't seem to load every time - and I don't have a clue what could be wrong :-/
Any sufficiently advanced bug is indistinguishable from a feature.


2015-03-23, 20:34:07
Reply #519

antanas

  • Active Users
  • **
  • Posts: 269
  • Hmm ...
    • View Profile
Martin, you rock even more than ever ! That version-checking-converter-launching macroscript is such a clean, elegant and easy to use solution - thanks !   

2015-03-24, 06:10:54
Reply #520

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I converted a kitchen scene earlier, and some of the porcelain is using the "Additive (shellac) mode" in V-ray. The converter gave the materials values between 90-100 blend.

I changed the IOR to 100 in the black reflect material, and added a Falloff with Fresnel type to the blend material. Looks kinda the same.
I was just wondering if this is a feature that can be automated with the converter. Perhaps it is impossible for the converter to know which of the materials to adjust in the blend.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-03-24, 10:12:39
Reply #521

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Martin, you rock even more than ever ! That version-checking-converter-launching macroscript is such a clean, elegant and easy to use solution - thanks !
Glad you like it :) Clean and easy is always my preferred way of doing things.

I was just wondering if this is a feature that can be automated with the converter. Perhaps it is impossible for the converter to know which of the materials to adjust in the blend.
Yes, that's the point. Since no additive mode is available in the normal blend material you will never get the same results. But even if I did something like you did, it would only be working in a fraction of the cases. I would have to parse the submaterials and implement extremely fragile and imprecise logic to fake something that looks like in vray - and since I cannot guess all the possible things people do with shellac mode it would still suck ;)

Any sufficiently advanced bug is indistinguishable from a feature.

2015-03-31, 14:35:21
Reply #522

bair4ik

  • Active Users
  • **
  • Posts: 31
    • View Profile
>>> SCENE Info: <<<
Corona version: 1.00.02, build timestamp: Mar 16 2015 21:46:40
Converter version: 1.0
# Material conversion took 1.161 seconds

# Iterations: 92, converted: 92

# Map conversion took 0.032 seconds

# Iterations: 74, converted: 1

# Light conversion took 0.04 seconds

# Iterations: 30


Error occured in freeSpot : $Free_Spot:Fspot05 @ [-4616.637207,-1668.889648,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot05 @ [-4616.637207,-1668.889648,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot08 @ [-4611.567383,-617.515503,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot08 @ [-4611.567383,-617.515503,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot09 @ [-4603.811523,-2943.790771,3363.356201]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot09 @ [-4603.811523,-2943.790771,3363.356201]

Error occured in freeSpot : $Free_Spot:Fspot10 @ [-4611.567383,398.034912,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot10 @ [-4611.567383,398.034912,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot11 @ [-5559.323730,398.034912,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot11 @ [-5559.323730,398.034912,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot12 @ [-5559.323730,-617.515503,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot12 @ [-5559.323730,-617.515503,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot13 @ [-5564.393555,-1668.889648,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot13 @ [-5564.393555,-1668.889648,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot14 @ [-5551.567871,-2943.790771,3363.356201]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot14 @ [-5551.567871,-2943.790771,3363.356201]

Error occured in freeSpot : $Free_Spot:Fspot15 @ [-6899.365234,-1668.889648,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot15 @ [-6899.365234,-1668.889648,3389.843018]

Error occured in freeSpot : $Free_Spot:Fspot16 @ [-7807.109375,-1668.889648,3389.843018]
-- Unknown property: "AreaShadow" in $Free_Spot:Fspot16 @ [-7807.109375,-1668.889648,3389.843018]

2015-04-01, 10:09:37
Reply #523

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Are you by any chance using Vray 1.x? I don't have any problems with that property here so my best guess would be that you are using an old plugin version.
Any sufficiently advanced bug is indistinguishable from a feature.

2015-04-09, 23:04:26
Reply #524

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I have one small request. Switch renderer to Corona option is great, but it resets scene if renderer already set to Corona. Could script check for a current renderer before conversion. That would help to avoid little nasty surprises :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures