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

2015-07-10, 13:09:33
Reply #660

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
It's on my list, I'm just really busy atm and haven't got time yet to do it.
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-21, 23:45:51
Reply #661

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Just need confirmation that I'm not thinking nonsense. It is correct to divide the bump with 4 to match the new Daily build right ? Need a little hack until you officially update the script.

Code: [Select]
--Bumpmap
r.mapamountBump = (origMtl.texmap_bump_multiplier / 100.0)/4

After the last daily build 10 displacement gives the same result in both Corona and Vray, maybe I should just test bump also.
« Last Edit: 2015-07-22, 04:13:34 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-07-22, 00:10:08
Reply #662

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
It's actually more likely that it is correct now and was "wrong" before ;) I had some correction value in there before but it was unreliable since users tend to setup things differently - so I mapped it 1:1 . I haven't tested it myself yet, so I you do, let me know your results :)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-22, 00:34:32
Reply #663

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Looks like "orig value"/100 is correct. The "C" is too faded on 0.4 and too strong on 0.6.
I have included the 32 bit displacement test as well.
« Last Edit: 2015-07-22, 00:38:05 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-07-22, 09:58:04
Reply #664

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Well, displacement is something completely different than bump. Displacement has a max an min value in system units (in the material settings). So it doesn't matter if the vray defaults and Corona defaults match (probably they do, but I guess that's simply coincidence).
Bump is something different since there are no logical units involved, just how the renderer interprets a change between darker and brighter colors of the map.
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-22, 11:55:15
Reply #665

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
FOLLOWING SCRIPT IS ONLY WORKING WITH DAILY BUILDS!
Get it here: http://www.racoon-artworks.de/CoronaConverter/CoronaConverter.html

changelog:
v1.15 - [2015/07/22]
  • changed light conversions due to the new CoronaSun
  • added CoronaNormal gamma fixing tool
  • added CoronaBitmap to Bitmaptexture conversion tool
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-22, 15:10:03
Reply #666

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Well, displacement is something completely different than bump. Displacement has a max an min value in system units (in the material settings). So it doesn't matter if the vray defaults and Corona defaults match (probably they do, but I guess that's simply coincidence).
Bump is something different since there are no logical units involved, just how the renderer interprets a change between darker and brighter colors of the map.
Just posted the displacement results in case you were going to make a VRayDisplacementMod to CoronaDisplacementMod convertor ;)
Thanks for the update :)
« Last Edit: 2015-07-22, 15:17:46 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-07-22, 19:16:18
Reply #667

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
Bug Report
The converter doubles the radius of the VRayLight Disc type. Went from 35 to 70.

Test
I created a light test scene today. It has 1 disc light with 100 radius and 2.12 intensity, and a 50% grey wall 1m away from the light.
Both V-Rays "Default (image)" and Coronas "Default: W" has the same intensity of 2.1 float. So they are 100% identical.
It is the "Directionality" option that is messing with the final intensity.
0.9 V-Ray directionality, 100 radius and  2.12 intensity will give us 0.98 float in the center. To get the same result with Corona you have to use around 0.638 directionality. The converters logit curve converted it to 0.719.
0.8 V-Ray is around 0.54 in Corona. Converter said 0.63863.

Looks like you get better results by taking the logit curve value and subtract 0.1 from it.


So don't mess with the light intensity guys, adjust the directionality.

Lumen
100 radius and 100 lumen in V-Ray is 2.12 Default (Image)
100 radius and 2.12 Default (W) in Corona is the same as 2.12 Default (Image) in v-ray, but it is 140 Corona lumen.
So if you are using lumen in V-Ray and need to Convert your scene, either select Default (Image) before you convert the scene, and change back to lumen when the scene is converted. Or multiply your v-ray lumen with 1.4 to get correct corona lumen.

Sum up
V-Ray Default (Image) = Corona Default (W)
V-Ray Lumen * 1.4 = Corona Lumen

Don't adjust Default: W, adjust Directionality.
V-Ray Directionality = logit sum - 0.1
« Last Edit: 2015-07-22, 20:42:17 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-07-22, 20:41:14
Reply #668

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Bug Report
The converter doubles the radius of the VRayLight Disc type. Went from 35 to 70.
Whoops, will be fixed in the next version, thanks for reporting :)

Test
I created a light test scene today. It has 1 disc light with 100 radius and 2.12 intensity, and a 50% grey wall 1m away from the light.
Both V-Rays "Default (image)" and Coronas "Default: W" has the same intensity of 2.1 float. So they are 100% identical.
It is the "Directionality" option that is messing with the final intensity.
0.9 V-Ray directionality, 100 radius and 100 intensity will give us 0.98 float in the center. To get the same result with Corona you have to use around 0.638 directionality. The converters logit curve converted it to 0.719.
0.8 V-Ray is around 0.54 in Corona. Converter said 0.63863.

Looks like you get better results by taking the logit curve value and subtract 0.1 from it.

(...)
Hmmm, that's interesting. Actually a good idea of measuring, I simply had a look a different directionality values and plotted a curve of "visually matching" results and tried to find a function curve that matches it. I'll investigate this issue once I have more time to do it. Thanks for the input! :)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-23, 12:43:47
Reply #669

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
FOLLOWING SCRIPT IS ONLY WORKING WITH DAILY BUILDS!
Get it here: http://www.racoon-artworks.de/CoronaConverter/CoronaConverter.html

changelog:
v1.16 - [2015/07/23]
  • fixed VrayLight disc conversion
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-23, 14:21:08
Reply #670

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8778
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Hey Martin,
not sure if it's known, but converter fails to change photometric light's shadow type to Corona if shape of those lights is set to anything but point.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-07-23, 16:04:43
Reply #671

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
not sure if it's known, but converter fails to change photometric light's shadow type to Corona if shape of those lights is set to anything but point.
Ah crap. The class of the object changes when you change the shape (who would guess something like that..). Fixed and replaced the old file. Thanks for the report :)

FOLLOWING SCRIPT IS ONLY WORKING WITH DAILY BUILDS!
Get it here: http://www.racoon-artworks.de/CoronaConverter/CoronaConverter.html

changelog:
v1.16 - [2015/07/23]
  • fixed VrayLight disc conversion
  • fixed Photometric Light Shadows conversion
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-23, 17:59:23
Reply #672

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
99% of the time I have to adjust the glossiness after converting. I made a test scene with a black shader ball and rendered out 1 - 0 glossiness with 0.5 difference between each image. Both with V-Ray and Corona. Here are the results, it's kinda impossible to match the renders after 0.7.

Left image is the converter value. Middle is the original v-ray value. Right image is the value that actually matches.
Is it possible to use these results to find a better matching formula ?
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-07-23, 18:21:39
Reply #673

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Interesting tests! Thanks. :) Have you tried that using a flat plane, with a camera that is not in such a sharp angle? I'm not entirely sure what kind of tests I made back then but it may also be the case that vray reacts differently on those "close to 90°" angles. It was also made for the old brdf, not ggx =/ which had a different glossiness appearance. So things have obviously changed. I will investigate this further (at some point.. in the future.. when there is time ;) )
However, your tests are very helpful, so keep it coming :)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-07-24, 01:12:00
Reply #674

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I've been porting over some of my SSS shaders and I noticed two missing inputs.
If the v-ray shader is using "Hard" "Soft" or "Hybrid" model, link these values.
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo