Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bohus.brecka

Pages: [1]
1
Quote
And regarding ease of editing the code - if I want to add in an operator half way, is there an easy way to do this without repeatedly changing the Op, ID, and Property numbers for the whole script?

Hi, I created some sample code that should be easier to modify - all the new operators are in separate functions so the operator variable does not have to be numbered, when adding a new operator, a new function can be created by taking the old one and just rewriting the operator-specific settings (e.g. rich shadows, opacity, ...). Also the ID is generated by a function so it does not have to be numbered manually.  It could be improved further by deduplicating the common parts, but this is just for an illustration. The code does not add all the operators from the original code and they are added in reverse order (the ones added later are at the bottom, which is I think more clean). The function calls can be easily reshuffled to get a different order, or new calls can be added.

Hope this helps.

Code: [Select]
global id = 0

fn generateId =
(
id = id + 1
return id
)

fn addLutOperatorPlugin =
(
op = LutOperatorPlugin()
id = generateId()
setProperty op "colorMappingOperator.id" id

setProperty op "colorMappingOperator.enabled" false
setProperty op "colorMappingOperator.path" "L:\_Max_stuff\_Corona_LUTs_Tonemapping Only\DS_4_Values.CUBE"
setProperty op "colorMappingOperator.opacity" 1

lastOperator = getProperty renderers.current "colorMap.pipeline"
setProperty op "colorMappingOperator.nextOperator" lastOperator
setProperty renderers.current "colorMap.pipeline" op
)

fn addFilmicOperatorPlugin =
(
op = FilmicOperatorPlugin()
id = generateId()
setProperty op "colorMappingOperator.id" id

setProperty op "colorMappingOperator.enabled" true
setProperty op "colorMappingOperator.highlightCompression" 1
setProperty op "colorMappingOperator.Richshadows" 1

lastOperator = getProperty renderers.current "colorMap.pipeline"
setProperty op "colorMappingOperator.nextOperator" lastOperator
setProperty renderers.current "colorMap.pipeline" op
)

fn addReinhardOperatorPlugin =
(
op = ReinhardOperatorPlugin()
id = generateId()
setProperty op "colorMappingOperator.id" id

setProperty op "colorMappingOperator.enabled" true
setProperty op "colorMappingOperator.highlightCompression" 0.6

lastOperator = getProperty renderers.current "colorMap.pipeline"
setProperty op "colorMappingOperator.nextOperator" lastOperator
setProperty renderers.current "colorMap.pipeline" op
)

setProperty renderers.current "colorMap.pipeline" null
addLutOperatorPlugin()
addFilmicOperatorPlugin()
addReinhardOperatorPlugin()

Bohus

2
Hello,

regarding the adding of operator at the end - this is the correct way

Code: [Select]
newOp = ContrastOperatorPlugin()
setProperty newOp "colorMappingOperator.id" 1
lastOperator = getProperty renderers.current "colorMap.pipeline"
setProperty newOp "colorMappingOperator.nextOperator" lastOperator
setProperty renderers.current "colorMap.pipeline" newOp

The important thing is - the operator returned by "colorMap.pipeline" is the operator at the bottom in the UI. The operator in "colorMappingOperator.nextOperator" is the one above.

Hope this helps, we will update the wiki.

Bohus

3
[Max] Bug Reporting / Re: Corona and Multitexture Crash
« on: 2019-10-30, 14:50:10 »
Hello,

after some investigation, we've found out that the problem is in the MultiTexture that is used in the scene. We've contacted the developers of the plugin, provided them with necessary information and they are working on that, but we have no news from them for almost a month, so currently there is nothing we can do about the issue.

Bohus Brecka

4
Hi,

are you interested only in the support of the Sun Positioner data in the Corona renderstamp or also something else regarding the Sun Positioner? According to our tests it works properly without our support when Render Setup > Scene > Scene Environment > "Use 3ds Max settings (Environment tab)" is selected. Is that sufficient?

PS: I am part of the Corona Team, I just do not have the profile settings done yet.

Bohus

Pages: [1]