Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: DrunkenMaster on 2023-12-28, 17:36:35

Title: Light Mix settings in Max Script
Post by: DrunkenMaster on 2023-12-28, 17:36:35
Hello,

Is there a way to Save/Load LightMix settings (.conf) file using max script ?

The only way to acces LightMix in Max sript is maxOps and render elemants. I can create Light mix add/remove lights, but I can't adjust light settings (Intensity, color..).
This data is only visable in framebufers LightMix section and I can't find a way to edit these settings using max script.

So is it possible to do that ?

Title: Re: Light Mix settings in Max Script
Post by: DrunkenMaster on 2023-12-28, 20:20:22
Sorry, it was right under my nose...
It's easy, if someone is looking for same thing, here you go:

Code: [Select]
renderers.current.colorMap_lightmixColors
renderers.current.colorMap_lightmixIntensities
Title: Re: Light Mix settings in Max Script
Post by: Tom on 2023-12-29, 07:59:24
Hi,

Sorry but I'm not sure to understand what you want to do.

Do you want to save/load the individual settings of each light in the scene? Let's say we have a scene with Light_01 (color_01, intensity_01), Light_02 (color_02, intensity_02), Light_03 (color_03, intensity_03), Light_04 (color_04, intensity_04). Are you looking to write a script that would save/load these values into a file?

I'm interested in this as well because, until now, saving these settings in a .conf file and loading them later, for example after having added Light_05 to the scene, would not apply the correct values to the lights.
Title: Re: Light Mix settings in Max Script
Post by: LorenzoS on 2023-12-29, 12:00:31
Quote
until now, saving these settings in a .conf file and loading them later, for example after having added Light_05 to the scene, would not apply the correct values to the lights.
Can we ask to CoronaTeam to solve it?
Title: Re: Light Mix settings in Max Script
Post by: LorenzoS on 2023-12-29, 12:58:39
Quote
saving these settings in a .conf file and loading them later, for example after having added Light_05 to the scene, would not apply the correct values to the lights
i tried, but it seems to works form me.
Title: Re: Light Mix settings in Max Script
Post by: DrunkenMaster on 2023-12-29, 20:28:51
Hi,

Sorry but I'm not sure to understand what you want to do.

Do you want to save/load the individual settings of each light in the scene? Let's say we have a scene with Light_01 (color_01, intensity_01), Light_02 (color_02, intensity_02), Light_03 (color_03, intensity_03), Light_04 (color_04, intensity_04). Are you looking to write a script that would save/load these values into a file?

I'm interested in this as well because, until now, saving these settings in a .conf file and loading them later, for example after having added Light_05 to the scene, would not apply the correct values to the lights.

Yes, thats what I'm trying to do. I'm creating tool witch will load different light mix settings by camera.
There is no direct way to save/load .conf file in max script, as I know.
But you can read files as a string, or even create your own costume .conf file, and edit everything by using these comands:
Code: [Select]
renderers.current.colorMap_lightmixColors
renderers.current.colorMap_lightmixIntensities

But it's way harder to do the same thing with tone mapping settings. Witch is sad...
You have to generate random ID and write OperatorPlugin for each layer, witch is realy ugly way to do satch a simple task...
But currently there is no way to read tone maping .conf file directly. But hopefully it will be possable soon, because it's currently logged as a feature request:
(Internal ID=1007269616)

There is a topic in a forum about it: https://forum.corona-renderer.com/index.php?topic=38445.0 (https://forum.corona-renderer.com/index.php?topic=38445.0)

Title: Re: Light Mix settings in Max Script
Post by: Aram Avetisyan on 2024-01-03, 13:57:40
Hi,

There is a general Lightmix access through maxscript feature request we have reported.
We will update here as well in case of any news.

(Internal ID=1090718958)
(Internal ID=281130077)