Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: GroveR_GoL on 2012-09-13, 12:59:03

Title: Lights Converter
Post by: GroveR_GoL on 2012-09-13, 12:59:03
Сorona lights converter from Vray and photometric lights.
converts:
VraySun to corona sun
VrayLight to corona light
VrayIES to corona light
Photometric target to corona light (very rough)
Photometric free to corona light (very rough)

Vray Suns are not deleted but hidden.
Latest build is in attachment.

edit by keymaster: updated script version: https://forum.corona-renderer.com/index.php?action=dlattach;topic=79.0;attach=6596
Title: Re: Lights Converter
Post by: racoonart on 2012-09-13, 14:41:56
Very nice! I didn't test it yet but after a quick look on your code I think it's not considering instanced lights. So if you have about 20 instanced lightsources somewhere you will have 20 unique lights later.
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-09-13, 15:03:05
Yes you are right. I had not thought about this.
Title: Lights Converter v0.02
Post by: GroveR_GoL on 2012-09-14, 10:47:21
Now considering instanced light for VrayLight and VrayIES.
Title: Lights Converter v0.03
Post by: GroveR_GoL on 2012-09-18, 09:30:55
New version for last 17.09.2012 build
Title: Re: Lights Converter
Post by: Tom Zamorin on 2012-09-18, 17:42:03
LightConverter don`t work for me... on legacy CPU version
http://imageshack.us/a/img822/3530/pic20qq.jpg
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-09-20, 11:30:15
New versin for 19.09 build
Title: Re: Lights Converter
Post by: Javadevil on 2012-09-26, 13:54:33

Hi Grover,

I ran the script on a scene, it converted the lights, but it made the target at the wrong end, so the light is flipped 180°.

cheers
Title: flipped 180°
Post by: GroveR_GoL on 2012-09-26, 14:21:57
i'll figure it out tomorrow
Title: flipped 180°
Post by: GroveR_GoL on 2012-09-27, 09:30:46
I tested script again, and didn't find any issue. So if you have this problem, just delete code:
Code: [Select]
tmpcorlight.dir = -tmpcorlight.dir
Title: Re: Lights Converter
Post by: racoonart on 2012-09-27, 10:09:06
Keymaster changed the way CoronaLights are created. Before, they were created pointing towards the camera/view. I made a request to do it the other way around (which is much more logical if you create them in a top view or from the side).
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-09-27, 10:22:06
Witch build are you using? And where can i get it?
Title: Re: Lights Converter
Post by: racoonart on 2012-09-27, 11:14:13
I'm using the daily builds. But this change is there for some days already, so you should have it too :)
Title: Re: Lights Converter
Post by: petoboso on 2012-10-11, 14:14:14
Hi, i have problem, on this line write error:   CorLight.visibleDirectly = not orignLight.invisible
i tried switch off "invisible" in all lights but this same problem. what is wrong?
Title: Re: Lights Converter
Post by: petoboso on 2012-10-12, 13:35:26
it seems that does´t work with sphere lights
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-10-12, 15:19:36
i'll figure it out soon
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-10-12, 15:36:06
you know, I haven't got any problems with that. Could you send me a link on max file or make screenshot.
Title: Re: Lights Converter
Post by: Paul Jones on 2012-10-15, 14:35:37
This problem in max 2013 with vray lights, can provide scene if required
Title: New version
Post by: GroveR_GoL on 2012-10-16, 13:44:37
Try this new version.
Title: Re: Lights Converter
Post by: lamar_ray on 2012-10-18, 09:33:10
Hi everyone and thank you for this fantastic render engine, come to us, I have a problem as you see attached nelal string of the sun, I'm not a programmer so I can not help you but I can test the various scripts with scenes of my daily work, converting etc. attached you find the stamp screen, ah forgot I use 3dsmax 2012/13 vray 2.03. and cornona alpha legacy bye.
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-10-18, 09:49:48
Hi, lamar_ray, please use last 0.05 version.
Title: Re: Lights Converter
Post by: lamar_ray on 2012-10-18, 12:28:35
Hi GroveR_Gol you're right i never saw the second page of the blog.......thx
Title: Re: Lights Converter
Post by: Ludvik Koutny on 2012-10-18, 13:09:39
Hi Grover,

I suggest you update the first post of this thread by using modify feature every time you release an updated version of the script. If it's on the first page in the first post, users will find it faster :)
Title: Re: Lights Converter
Post by: Javadevil on 2012-12-10, 06:53:58

Any chance or adding Mental ray photo metric lights ? I realise the intensities will be a problem, but even just converting the lights to corona saves me time, having to place each light and I can manually adjust the intensity.  So maybe just default corona light intensity to 10 ?

cheers
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-12-10, 09:24:12
which kind of lights do you mean?
Title: Re: Lights Converter
Post by: Javadevil on 2012-12-10, 11:32:44

Photometric, the top screen grab.

cheers
Title: Re: Lights Converter
Post by: GroveR_GoL on 2012-12-11, 08:11:14
Photometric lights added.
Title: Re: Lights Converter
Post by: Javadevil on 2012-12-12, 04:15:03
Photometric lights added.

Thanks, I'll tested it tonight.

cheers
Title: Re: Lights Converter
Post by: nehale on 2013-09-15, 21:37:50
this script seems to not work with the new daily builds. always gives an error
Title: Re: Lights Converter
Post by: Ahmednibo on 2013-09-16, 01:29:12
This is awesome ....running test ....thanks
Title: Re: Lights Converter
Post by: xt13r on 2013-09-25, 12:09:24
Yeah, converter doesn't work with latest builds. always shows mistake.
Title: Re: Lights Converter
Post by: Ilija on 2013-10-14, 17:53:12
Agree, not working with latest build
Title: Re: Lights Converter
Post by: Booker on 2013-10-15, 11:39:55
Hello,

I have changed something in the script, it works with the Daily's now

Thomas
Title: Re: Lights Converter
Post by: poko on 2013-11-04, 11:21:42
Hi thanks for the script.
I see some problem.
When I change lights lets say from Vray the lights visibility is strange.
Please take look example.
Title: Re: Lights Converter
Post by: T.Kick on 2014-01-08, 21:13:47
nice.
Title: Re: Lights Converter
Post by: Ice_Juice on 2014-03-10, 07:55:16
What about Mental ray lights converting? Very needed feature
Title: Re: Lights Converter
Post by: Vado on 2014-03-19, 20:58:44
lights converter doesnt work for A6 for me, do you know any solution?
Title: Re: Lights Converter
Post by: Zzaba on 2014-03-21, 13:34:20
An for me too :(
Title: Re: Lights Converter
Post by: coldworld on 2014-03-23, 12:49:52
plz Fix

Unknown property -  sphereRadius       

eror - "CorLight.sphereRadius = orignLight.size0"
Title: Re: Lights Converter
Post by: rafa85 on 2014-03-24, 04:14:21
Same for me ...
Title: Re: Lights Converter
Post by: tayebmax on 2014-03-26, 21:03:39
light converter for alpha v6 does not work ... Urgent to update .... 
Title: Re: Lights Converter
Post by: Vado on 2014-03-31, 21:13:39
It looks like nobody care
:(
Title: Re: Lights Converter
Post by: racoonart on 2014-03-31, 21:17:02
Look at the first page, Keymaster added a link to the fixed version by booker ;)
Title: Re: Lights Converter
Post by: Bigguns on 2014-04-16, 21:22:42
me it's not working, everytime I try to convert it (and I have the latest version.. and i'm in max 2013  and alpha v6 ) it says :

-- Unkown property: "sphereRadius"in SCoronaLight:CoronaLight001 @ 0.00000 etc ...

any one know the problem ?
Title: Re: Lights Converter
Post by: Cyanhide on 2014-04-24, 20:18:26
The link that Keymaster added doesn't download anything, it takes me to the forum main page.
Title: Re: Lights Converter
Post by: Ondra on 2014-04-24, 20:26:08
fixed link
Title: Re: Lights Converter
Post by: Cyanhide on 2014-04-24, 20:27:07
Awesome response time Keymaster, kudos to you!
Title: Re: Lights Converter
Post by: higgledyhiggles on 2014-04-28, 10:49:36
v7 script still has unknown property sphere radius thingy, am I stoopid ?
Title: Re: Lights Converter
Post by: Player22 on 2014-04-29, 11:23:58
Hi Can someone please provide  Vray Light converter that works....
I have coronaLightsConverter_v0.06.ms which gives error when ran in CORONA A6 on 3DS Max2014

Thanks
Title: Re: Lights Converter
Post by: Player22 on 2014-04-29, 11:48:47
Nice work & many thanks  Keymaster found your link.
Title: Re: Lights Converter
Post by: Vado on 2014-05-15, 21:07:18
thanks for the update but it still doesnt work, the same error came up ;spheare radius;
Title: Re: Lights Converter
Post by: tiagodmed on 2014-05-23, 22:31:25
In the corona A6 the script did not work, it gave an error at line 226 (CorLight.sphereRadius = orignLight.size0).
I tried to check the problem and I believe that has changed the nomenclature of the sphere light to CorLight.rectangleWidth

Is that right?
Title: Re: Lights Converter
Post by: Ondra on 2014-05-23, 22:42:25
yes, names of the parameters for all light types were unified into 2 variables
Title: Re: Lights Converter
Post by: ZDi on 2014-07-09, 17:00:03
Hi! When I convert a scene from vray, it works just fine. Only when I save and reopen the file, I get an unrecoverable error (can't open the file again).

I think the culprit *might* be with IES lights, but cannot confirm. Here's my scene (only lights). After conversion, I can't reopen the saved file.

http://www.zdi.it/var/error_vraylights.zip

Any ideas?

[edit]
Upon further testing; yes: the problem is IES lights. Also, VRaySun isn't deleted post-conversion.

[edit 2]
Maybe targeted IES only?
Title: Re: Lights Converter
Post by: cgiout on 2014-08-04, 19:08:26
Same problem here with max2014 x64


Title: Re: Lights Converter
Post by: naeq on 2014-08-20, 14:26:33
Works flawlessly! :)
Title: Re: Lights Converter
Post by: Dollmaker on 2014-09-02, 11:09:25
Same problem here with max2014 x64

Same issue with Max 2013 64 Bit..
Title: Re: Lights Converter
Post by: archimi on 2014-12-02, 19:35:04
Hello,

I have changed this part of the code (V0.06):
Code: [Select]
     CorLight.colorMode = orignLight.color_mode
CorLight.blackbodyTemperature = orignLight.color_temperature
CorLight.sphereRadius = orignLight.size0
CorLight.rectangleHeight = 2*orignLight.size1
CorLight.rectangleWidth = 2*orignLight.size0
CorLight.rectangleDirectionality = orignLight.lightDistribution

 for it:
Code: [Select]
CorLight.colorMode = orignLight.color_mode
CorLight.blackbodyTemperature = orignLight.color_temperature
--CorLight.sphereRadius = orignLight.size0     
CorLight.rectangleHeight = 2*orignLight.size1
if CorLight.type==0 then
CorLight.rectangleWidth = orignLight.size0
else
CorLight.rectangleWidth = 2*orignLight.size0
CorLight.rectangleDirectionality = orignLight.lightDistribution

and now it works...

EDIT: I did not see that there was a version 0.007 that existed. So my message is no longer needed ! There are still just the problem with the diameter of the spheres...
Title: Re: Lights Converter
Post by: vinbarg on 2015-02-11, 13:33:23
Hi have the same problem with sphere radius, but with v0.07.ms any help:?
Title: Re: Lights Converter
Post by: tip01 on 2015-02-26, 08:06:38
Stopped working. Corona_v.1.0
Title: Re: Lights Converter
Post by: racoonart on 2015-02-26, 10:08:29
The (previous Material only) Converter now also converts lights, have a look here: https://forum.corona-renderer.com/index.php/topic,126.0.html (https://forum.corona-renderer.com/index.php/topic,126.0.html)

So this script is obsolete.