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

2015-05-08, 22:14:50
Reply #585

daniel.reutersward

  • Active Users
  • **
  • Posts: 310
    • View Profile
Thanks for the information Deadclown! I haven´t tried your solution yet, but what seemed to do the trick for me was to select everything and change the converter to "materials of selected objects", without the need to save and run the converter again :)

Update: Yes, your solution worked for me as well :)

2015-05-11, 04:15:33
Reply #586

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
I read somewhere in my research on learning maxscript that if you hold the scene in max then it's the same as saving because someone was having similar problems with max bugging out so if the converter made use of the hold function prior to converting then this may solve it? Least you don't do a hard save so to speak :) + you can fetch the scene back if you so wish to the previous state.

2015-05-11, 10:40:17
Reply #587

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Yes, you're on the right track ;) . The problem is that max is not updating the internal materials array after importing stuff. The update is only fired on saving. I wouldn't use hold because some people may already have something important in there and overwriting it is not a good idea imho (+ it would also be extremely slow on big scenes).
My current best option is doing a save selected without any nodes (so more or less just an empty max file). I already use that somewhere else in the script but I still try to avoid it because it adds some lag non the less =/ . Another way to solve the problem is changing the parameters of my getclassinstances method, but that would make everything a lot slower.
Any sufficiently advanced bug is indistinguishable from a feature.


2015-05-11, 22:09:29
Reply #589

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
It's only updating assets (maps, ies, etc) , not the materials themselves (I tried it non the less, you never know with autodesk ;) )
Any sufficiently advanced bug is indistinguishable from a feature.

2015-05-11, 22:34:22
Reply #590

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
 ATS UI says 'Maps/shaders" ! Pesky AD ;)

2015-05-15, 10:02:34
Reply #591

WonderrOzz

  • Users
  • *
  • Posts: 1
    • View Profile
Hello. I Like this converter very much )) But it have one mistake. It always set wrong value of "Directionality" in Lights. Actually it sets the same value, but the same value in corona not matches the same value in Vray! I always need to decrease this value 20-30% from original.
And Thank U guys for Your work.

2015-05-17, 21:30:42
Reply #592

3dwannab

  • Active Users
  • **
  • Posts: 362
    • View Profile
Hi DeadClown:

I'm using Batch it Max to convert scene en masse and was trying the line below for the .ms file. Note it evaluates just fine in the listener. But runs into an error using 'Batch It Max'. Also don't say that to fast :D
Code: [Select]
CoronaConverterNoGui = true  /* this will prevent the Converter Dialog from opening */
scripts = sort(getfiles (srchDir + "\\" + "CoronaConverter_v*.ms"))
latest = scripts[scripts.count] as string
include latest

CoronaConverter.converterSettings.switchRenderEngine = true
CoronaConverter.converterSettings.printInfo = false
CoronaConverter.converterSettings.silent = false
CoronaConverter.convertScene()

I could use include @"C:\coronaConverter_v0.24.ms" like the help on your page suggest but I was looking to see if I could be lazy and do it this way.

Link to BIM: http://www.paulneale.com/scripts/batchItMax/batchItMax.htm

A better code to get script in might be if you place it in your scripts folder:
Code: [Select]
include "$scripts\\CoronaConverter_v1.08.ms"
« Last Edit: 2015-05-17, 21:35:16 by 3dwannab »

2015-05-17, 21:33:41
Reply #593

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I always need to decrease this value 20-30% from original.
I have noticed this too. I've been changing my lights over to lumen since both engines can use that unit.
30Image and 30 Radius in V-ray is 508.93 lumen
30W and 30 Radius in Corona is 722.58 lumen

34.69% difference
« Last Edit: 2015-05-17, 21:59:48 by dubcat »
             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-05-18, 18:19:30
Reply #594

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Actually it sets the same value, but the same value in corona not matches the same value in Vray! I always need to decrease this value 20-30% from original.
I never checked how much they differ (which is a bit difficult too) but I'll see what I can do :)

I'm using Batch it Max to convert scene en masse and was trying the line below for the .ms file. Note it evaluates just fine in the listener. But runs into an error using 'Batch It Max'. Also don't say that to fast :D
I haven't tested it myself but it could be due to scope issues. If you run the example code inside of a function body it probably won't work. You can however try to declare "CoronaConverter" as a global variable first and then include the script file - it may work, but haven't tested it yet.

I have noticed this too. I've been changing my lights over to lumen since both engines can use that unit.
30Image and 30 Radius in V-ray is 508.93 lumen
30W and 30 Radius in Corona is 722.58 lumen

34.69% difference
I admit, converting the light units is currently a bit "whacky" (at best). But you're giving me an idea here, I'll see if it works and everything will probably be fine in the next version ;)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-05-24, 05:22:05
Reply #595

dubcat

  • Active Users
  • **
  • Posts: 425
  • ฅ^•ﻌ•^ฅ meow
    • View Profile
I just noticed that lights with "Double-sided" checked in V-Ray does not get "Emit on both sides" checked in Corona after the conversion.

             ___
    _] [__|OO|
   (____|___|     https://www.twitch.tv/dubca7 / https://soundcloud.com/dubca7 ( ͡° ͜ʖ ͡°) choo choo

2015-05-24, 10:58:28
Reply #596

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
whoops, will be fixed in the next version. Thanks for reporting :)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-05-26, 00:12:49
Reply #597

cecofuli

  • Active Users
  • **
  • Posts: 1577
    • View Profile
    • www.francescolegrenzi.com
VRay 3.2 : (*) V-Ray scene converter: Added initial implementation of conversion of Corona materials and lights; O__O

2015-05-26, 11:27:56
Reply #598

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
VRay 3.2 : (*) V-Ray scene converter: Added initial implementation of conversion of Corona materials and lights; O__O

Time to randomly change some Maxscript property names in the next corona build :D
I'd say that's a positive thing (unless their conversion sucks) :)
Any sufficiently advanced bug is indistinguishable from a feature.

2015-05-26, 14:09:41
Reply #599

cherie

  • Users
  • *
  • Posts: 1
    • View Profile
Error message told me to post it here. And so i do.