1
[Max] Feature Requests / Re: Tonemapping & Maxscript
« on: 2023-01-10, 19:17:27 »
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
- 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...
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.
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.