Author Topic: Light Mix settings in Max Script  (Read 666 times)

2023-12-28, 17:36:35

DrunkenMaster

  • Users
  • *
  • Posts: 4
    • View Profile
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 ?


2023-12-28, 20:20:22
Reply #1

DrunkenMaster

  • Users
  • *
  • Posts: 4
    • View Profile
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

2023-12-29, 07:59:24
Reply #2

Tom

  • Active Users
  • **
  • Posts: 236
    • View Profile
    • www
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.

2023-12-29, 12:00:31
Reply #3

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
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?

2023-12-29, 12:58:39
Reply #4

LorenzoS

  • Active Users
  • **
  • Posts: 291
    • View Profile
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.

2023-12-29, 20:28:51
Reply #5

DrunkenMaster

  • Users
  • *
  • Posts: 4
    • View Profile
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


2024-01-03, 13:57:40
Reply #6

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
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)
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us