Author Topic: Tonemapping & Maxscript  (Read 2436 times)

2022-11-16, 02:47:24

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
Can I use Maxscript to control the VFB in the following way:

1) Hit Save on the Tonemapping settings and save out to a location determined in the maxscript.
2) Load the the saved settings from a location determined in the maxscript?
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2022-11-16, 15:16:21
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
Currently this is not possible, however we have it logged as a feature request.

(Internal ID=1007269616)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-16, 22:43:04
Reply #2

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
For years I've used a render manager Vexus, and on release of C8 my workflow was broken without warning. It took me weeks to arrive at having a working Maxscript to fudge around this.

And FYI my workflow for frame buffer settings went from attachment A, to attachment B.

Picture 15 renders on a project with an average of three options for each - that's me tweaking 45 versions of the maxscript on attachment B. Factor in human errors and the associated re-rendering. It's created a massive ball ache.

And the tonemapping is not in a state that the developers want to touch it. The simplest way to implement this as I see it is to allow maxscript to the load and save buttons.

Just sharing my pain.

p.s. It was awesome shortly after to received the price hike too, thanks for that.

Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2022-11-17, 09:29:40
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
Thanks for sharing the details, now I can feel your ache.

Could it mean that Vexus does not support Corona 8 and newer? I will get in touch with them to find out if we can help.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-18, 04:23:38
Reply #4

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
I'd appreciate if you can contact them and see if you can help.

If Chaos simply delete an integral part of the renderer rather than having a legacy component then surely you'd expect it's going to blow up users pipelines.
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2022-11-24, 09:26:24
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
Unfortunately, Vexus team are not responding to me so far. I will share any updates here once I hear from them.
« Last Edit: 2022-12-06, 10:46:52 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-12-06, 10:47:28
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
Vexus team have replied to my message and we are in touch. The plan is to help each other with the improvements.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-12-13, 01:36:10
Reply #7

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
Thanks Marcin
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2023-01-10, 19:17:27
Reply #8

JokerMartini

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hey everyone,
I'm one of the developers of Vexus and I can point out where we are having issues supporting corona as well as some possible solutions.

The Goal:
As you may know Vexus is a node based scene assembly tool. Within Vexus we want to give users the ability to create/manipulate the Tone Mapping settings inside of the Corona VFB. However there are some pitfalls that are preventing that from being possible via maxscript.

The Issues:
- There is no way to remove all Tone Mapping operators from the ui. Using the following code
Code: [Select]
setProperty renderers.current "colorMap.pipeline" null simply just resets the operators to the Default which contains a list of operators that the user may not want.
- There is no way to save and load Tone Mapping presets via maxscript.
- Simply creating Tone Mapping operators with maxscript results in buggy because it's only successful if the use assigns an ID to the operator however there is no provided safe way of knowing what id can be assigned to the operator.

Solution Ideas:
- Provide a method to easily clear all ToneMapping operators so the list appears actually empty from a visual standpoint
- Provide a method for adding and operator where the user is not required to supply and ID to the operator. Option provide a method where I can get and ID which I can then safely use as and ID for the Tone Mapping operator. Currently for a user to add and operator they have to do the following...
Code: [Select]
fn addLutOperatorPlugin =
(
    op = LutOperatorPlugin()
op.colorMappingOperator_enabled = true
op.colorMappingOperator_path = "L:\_Max_stuff\_Corona_LUTs_Tonemapping Only\DS_4_Values.CUBE"
op.colorMappingOperator_opacity = random 0.0 1.0

    id = random 1 500
setProperty op "colorMappingOperator.id" id
    lastOperator = getProperty renderers.current "colorMap.pipeline"
    setProperty op "colorMappingOperator.nextOperator" lastOperator
    setProperty renderers.current "colorMap.pipeline" op
)
addLutOperatorPlugin()
I would suggest making the method more user friendly removing the requirement for the user to come up with some random id value and simplify the appending of the operator like this (pseudo code)
Code: [Select]
op = LutOperatorPlugin()
op.colorMappingOperator_enabled = true
op.colorMappingOperator_path = "L:\_Max_stuff\_Corona_LUTs_Tonemapping Only\DS_4_Values.CUBE"
op.colorMappingOperator_opacity = random 0.0 1.0
append renderers.current.colorMap.pipeline.operators op

It would be nice if the operators were managed almost more like how render elements are. An array of Objects that can be iterated through, append, remove...ect. Right now the manipulating of operators is more complicated than needed making it difficult to implement. We can't safely and reliably append new operators and/or save/load existing operator presets.

2023-01-11, 09:41:00
Reply #9

Frood

  • Active Users
  • **
  • Posts: 1903
    • View Profile
    • Rakete GmbH
It would be nice if the operators were managed almost more like how render elements are.

This was exactly my suggestion when I once was asked how it should/could look at the maxscript side. Now, everybody who wants to do serious scripting stuff with tone mapping has to write libraries instead.

I don't know if you aware of this one:

https://forum.corona-renderer.com/index.php?topic=36778.msg201269#msg201269

Have not tried/used it yet and it would need some changes to be able to use it for Camera tone mapping as well though. I almost never use global tone mapping so I'd have to modify it anyway.


Good Luck



Never underestimate the power of a well placed level one spell.

2023-01-18, 02:58:09
Reply #10

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
Thoughts Corona team?
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2023-01-31, 10:05:04
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
After exchanging some thoughts between the teams, here is a list of items logged as feature requests for our dev/QA teams to review:

"Provide a way to remove all tone mapping operators via maxscript"
(Internal ID=1045248610)

"Maxscript access to VFB tone mapping "save" and "load" options"
(Internal ID=1007269616)

"Improve tone mapping operator ID handling via maxscript"
(Internal ID=1046008808)

"Manage tone mapping operators in a similar way as render elements"
(Internal ID=1045373741)

"Change various VFB settings via maxscript"
(Internal ID=540083079)

All these items are linked with this forum thread, so once there are any updates, we will let you know here.

Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-02-16, 09:26:43
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
"Improve tone mapping operator ID handling via maxscript" - we have some updates on this point. I will share the details ASAP.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2023-02-17, 08:35:52
Reply #13

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
Thanks Marcin
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2023-05-04, 10:48:18
Reply #14

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12710
  • Marcin
    • View Profile
Small update:

VFB tone mapping can be cleared using the following maxscript command:
Code: [Select]
setProperty renderers.current "colorMap.pipeline" undefined
And Corona Camera tone mapping using this one:
Code: [Select]
cam = getNodeByName "Corona Camera001"
setProperty cam "colorMappingPipeline" undefined


I have also shared this information with the Vexus team.
« Last Edit: 2023-05-10, 17:45:52 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us