Author Topic: Highlight Compression Macros for Eyeon Fusion + Foundry Nuke  (Read 53574 times)

2013-10-17, 13:15:40

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Ondra was so kind to give me the function for coronas highlight compression and I made a little fusion macro from that. So you can render your stuff without tone-mapping and apply it later in the post.

Corona Highlight compression:
Code: [Select]
{
Tools = ordered() {
CoronaHighlightCompression1 = MacroOperator {
Inputs = ordered() {
MainInput1 = InstanceInput {
SourceOp = "CoronaHighlighCompression",
Source = "Image1",
},
Input1 = InstanceInput {
SourceOp = "CoronaHighlighCompression",
Source = "NumberIn1",
Name = "HighlightCompression",
MinScale = 1,
MaxScale = 10,
},
},
Outputs = {
MainOutput1 = InstanceOutput {
SourceOp = "CoronaHighlighCompression",
Source = "Output",
},
},
ViewInfo = GroupInfo {
Name = "CoronaHighlightCompression",
Pos = { 0, 0, },
},
Tools = ordered() {
CoronaHighlighCompression = Custom {
CtrlWZoom = false,
CtrlWShown = false,
NameSet = true,
Inputs = {
NumberIn1 = Input { Value = 1, },
LUTIn1 = Input {
SourceOp = "CustomTool1LUTIn1",
Source = "Value",
},
LUTIn2 = Input {
SourceOp = "CustomTool1LUTIn2",
Source = "Value",
},
LUTIn3 = Input {
SourceOp = "CustomTool1LUTIn3",
Source = "Value",
},
LUTIn4 = Input {
SourceOp = "CustomTool1LUTIn4",
Source = "Value",
},
RedExpression = Input { Value = "r1 * (1+r1/(n1*n1))/(1+r1)\r\n", },
GreenExpression = Input { Value = "g1 * (1+g1/(n1*n1))/(1+g1)\r\n", },
BlueExpression = Input { Value = "b1 * (1+b1/(n1*n1))/(1+b1)\r\n", },
NumberControls = Input { Value = 1, },
ShowNumber2 = Input { Value = 0, },
ShowNumber3 = Input { Value = 0, },
ShowNumber4 = Input { Value = 0, },
ShowNumber5 = Input { Value = 0, },
ShowNumber6 = Input { Value = 0, },
ShowNumber7 = Input { Value = 0, },
ShowNumber8 = Input { Value = 0, },
PointControls = Input { Value = 1, },
ShowPoint1 = Input { Value = 0, },
ShowPoint2 = Input { Value = 0, },
ShowPoint3 = Input { Value = 0, },
ShowPoint4 = Input { Value = 0, },
LUTControls = Input { Value = 1, },
ShowLUT1 = Input { Value = 0, },
ShowLUT2 = Input { Value = 0, },
ShowLUT3 = Input { Value = 0, },
ShowLUT4 = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1045, 115.5, }, },
},
CustomTool1LUTIn1 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 0, Blue = 0, },
CtrlWShown = false,
},
CustomTool1LUTIn2 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 204, Blue = 0, },
CtrlWShown = false,
},
CustomTool1LUTIn3 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 0, Blue = 204, },
CtrlWShown = false,
},
CustomTool1LUTIn4 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 204, Blue = 204, },
CtrlWShown = false,
},
},
},
},
ActiveTool = "CoronaHighlightCompression1",
}

Filmic Tonemapping:
Code: [Select]
{
Tools = ordered() {
FilmicTonemapping1 = MacroOperator {
CtrlWZoom = false,
NameSet = true,
Inputs = ordered() {
Comments = Input { Value = "Filmic tonemap operator is based on John Hable's work for Unchartered 2:  http://filmicgames.com/archives/75\r\n\r\nCopyright 2013 Martin Geupel\r\nThanks goes to Simon Lundberg for the respective Nuke Gizmo!\r\nFeel free to re-use, adapt, distribute and change tool to suit your needs, but please don't sell it.", },
MainInput1 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "Image1",
},
Input1 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn1",
},
Input2 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn2",
},
Input3 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn3",
},
Input4 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn4",
},
Input5 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn5",
},
Input6 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn6",
},
Input7 = InstanceInput {
SourceOp = "FilmicTonemapping",
Source = "NumberIn7",
MaxScale = 20,
},
},
Outputs = {
MainOutput1 = InstanceOutput {
SourceOp = "FilmicTonemapping",
Source = "Output",
},
},
ViewInfo = GroupInfo { Pos = { 1045, 247.5, }, },
Tools = ordered() {
FilmicTonemapping = Custom {
CtrlWZoom = false,
CtrlWShown = false,
NameSet = true,
Inputs = {
NumberIn1 = Input { Value = 0.22, },
NumberIn2 = Input { Value = 0.3, },
NumberIn3 = Input { Value = 0.1, },
NumberIn4 = Input { Value = 0.2, },
NumberIn5 = Input { Value = 0.01, },
NumberIn6 = Input { Value = 0.3, },
NumberIn7 = Input { Value = 11.2, },
LUTIn1 = Input {
SourceOp = "FilmicTonemappingLUTIn1",
Source = "Value",
},
LUTIn2 = Input {
SourceOp = "FilmicTonemappingLUTIn2",
Source = "Value",
},
LUTIn3 = Input {
SourceOp = "FilmicTonemappingLUTIn3",
Source = "Value",
},
LUTIn4 = Input {
SourceOp = "FilmicTonemappingLUTIn4",
Source = "Value",
},
Setup1 = Input { Value = "n5/n6", },
Setup2 = Input { Value = "n4*n6", },
Setup3 = Input { Value = "n4*n5", },
Setup4 = Input { Value = "n3*n2", },
Intermediate1 = Input { Value = "( ( (n7*(n2*n7+s4)+s3) / (n7*(n1*n7+n2)+s2) ) - s1) ", },
RedExpression = Input { Value = "( ( (r1*(n2*r1+s4)+s3) / (r1*(n1*r1+n2)+s2) ) - s1) *i1", },
GreenExpression = Input { Value = "( ( (g1*(n2*g1+s4)+s3) / (g1*(n1*g1+n2)+s2) ) - s1) *i1", },
BlueExpression = Input { Value = "( ( (b1*(n2*b1+s4)+s3) / (b1*(n1*b1+n2)+s2) ) - s1) *i1", },
NumberControls = Input { Value = 1, },
NameforNumber1 = Input { Value = "Shoulder Str.", },
NameforNumber2 = Input { Value = "Linear Str.", },
NameforNumber3 = Input { Value = "Linear Angle", },
NameforNumber4 = Input { Value = "Toe Str.", },
NameforNumber5 = Input { Value = "Toe Num.", },
NameforNumber6 = Input { Value = "Toe Denum.", },
NameforNumber7 = Input { Value = "White Point", },
ShowNumber8 = Input { Value = 0, },
ShowPoint1 = Input { Value = 0, },
ShowPoint2 = Input { Value = 0, },
ShowPoint3 = Input { Value = 0, },
ShowPoint4 = Input { Value = 0, },
ShowLUT1 = Input { Value = 0, },
ShowLUT2 = Input { Value = 0, },
ShowLUT3 = Input { Value = 0, },
ShowLUT4 = Input { Value = 0, },
Comments = Input { Value = "Filmic tonemap operator is based on John Hable's work for Unchartered 2:  http://filmicgames.com/archives/75\r\n\r\nCopyright 2013 Martin Geupel\r\nThanks goes to Simon Lundberg for the respective Nuke Gizmo!\r\nFeel free to re-use, adapt, distribute and change tool to suit your needs, but please don't sell it.", },
},
ViewInfo = OperatorInfo { Pos = { 0, 10.15, }, },
},
FilmicTonemappingLUTIn1 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 0, Blue = 0, },
CtrlWShown = false,
},
FilmicTonemappingLUTIn2 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 204, Blue = 0, },
CtrlWShown = false,
},
FilmicTonemappingLUTIn3 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 0, Blue = 204, },
CtrlWShown = false,
},
FilmicTonemappingLUTIn4 = LUTBezier {
KeyColorSplines = {
[0] = {
[0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
[1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 204, Blue = 204, },
CtrlWShown = false,
},
},
},
},
ActiveTool = "FilmicTonemapping1",
}

Just copy the code to your flow window or save it as a .setting in your usermacro folder.
Btw, all macros should be used with linear (gamma 1.0) input!


[EDIT]
Captain Obvious added a macro for Nuke!
For download and more details see Post #6
forum.corona-renderer.com/index.php/topic,1807.msg13558#msg13558

[Another EDIT]
Added the Filmic Curve tonemapping as a separate Tool. Big thanks to Captain Obvious for the idea and the guideline ;)
« Last Edit: 2013-10-18, 11:54:05 by DeadClown »
Any sufficiently advanced bug is indistinguishable from a feature.

2013-10-17, 15:07:21
Reply #1

Juraj

  • Active Users
  • **
  • Posts: 4742
    • View Profile
    • studio website
I am more and more inclined to have a look at Fusion. The guys at Uniform shown it and it did seemed simplier than maybe I feared/expected (I have a nightmare even from opening Nuke).

I had a brief look at the script but still have hard time envisioning how it works exactly. I have very mixed feelings about the look it produces. Not that I liked Reinhard (quite opposite..) but there's something about it I can't put my finger at, and prefer to do the tonemapping through curves in post.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2013-10-17, 15:40:37
Reply #2

Captain Obvious

  • Active Users
  • **
  • Posts: 167
    • View Profile
Great, thanks! I implemented it in my Nuke tone mapper gizmo as well. I can post it if anyone's interested.


Corona's tonemapper produces exactly the same results as Reinhard tonemapping. It's just that the settings work differently.

2013-10-17, 15:47:07
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4742
    • View Profile
    • studio website
Great, thanks! I implemented it in my Nuke tone mapper gizmo as well. I can post it if anyone's interested.


Corona's tonemapper produces exactly the same results as Reinhard tonemapping. It's just that the settings work differently.

Is that really so ? I thought the result with Reinhard became somehow more saturated instead.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2013-10-17, 15:47:33
Reply #4

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Fusion is pretty easy to learn, imho way more intuitive than nuke. It's btw relatively easy to use nuke if you know fusion - the concepts are mostly the same - but the overall usage is a lot easier to learn by trying things out in fusion. Nuke has some pitfalls here and there which are simply not existing in fusion (or you don't notice at first ;) ) and scare new users. I love fusion and it's such a pleasure to work with it. I can't imagine to do my work in any layer based compositing program like AE (totally pain in the ass)

The tone-mapping stuff is something I use very rarely, never in max directly (just in corona while rendering and playing with the values). I always save my images linear and do curves in the post. For me it's just a very useful thing to be able to achieve the exact same highlight compression in fusion than the way it is in corona - in case I liked what I saw when playing with the values at render time (or my boss or client etc).
The problem with this kind of compression is (imho) the reduced contrast in the midtones. I tend to reduce the compression just to the highlights with little influence into the midtones (for the soft transition).

Great, thanks! I implemented it in my Nuke tone mapper gizmo as well. I can post it if anyone's interested.

Why not, I'd appreciate if we could complete this thread for all different kind of compositing packages :) I'd modify the topic name then :)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-10-17, 16:02:02
Reply #5

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Btw, here is a screenshot with a before-and-after gradient from 0-10 range with a waveform diagram. Right image is with highlight compression at 10.0
Any sufficiently advanced bug is indistinguishable from a feature.

2013-10-17, 16:22:55
Reply #6

Captain Obvious

  • Active Users
  • **
  • Posts: 167
    • View Profile
Okay, here's my Nuke gizmo. It's still a WIP. I haven't yet implemented film simulation, but I'm working on it. No menu or install or anything for now; just select the text and copy it into your comp. Only tested in NukeX 7.0v8, but should work fine in regular Nuke as well, and probably in earlier versions as well.

It does Reinhard, Exponential Luma (same as Maxwell and modo), Corona and Filmic.


Code: [Select]
set cut_paste_input [stack 0]
version 7.0 v8
push $cut_paste_input
Group {
 name Tonemap
 selected true
 xpos -308
 ypos -203
 addUserKnob {20 tonemap l Tonemap t "Adjusts blend between linear colors and full tonemap"}
 addUserKnob {41 operator l Operator t "Available operators:\nReinhard (V-Ray; desaturates highlights)\nExponential luma (modo, Maxwell; saturates highlights)\nFilmic (punchier look, darker shadows; more control over look)\nCorona (similar to Reinhard)" T Switch1.operator}
 addUserKnob {41 mix l "Tonemap Mix" t "Blends between input and tonemapped image" T Merge1.mix}
 addUserKnob {20 exposure l "Exposure Adjustment" n 1}
 exposure 0
 addUserKnob {41 mode l "Adjust in" T EXPTool1.mode}
 addUserKnob {41 gang T EXPTool1.gang}
 addUserKnob {41 red T EXPTool1.red}
 addUserKnob {41 green T EXPTool1.green}
 addUserKnob {41 blue T EXPTool1.blue}
 addUserKnob {20 endGroup n -1}
 addUserKnob {20 exponentialStrength l "Reinhard and Exponential Luma Controls" n 1}
 exponentialStrength 0
 addUserKnob {41 mix_1 l Burn T Reinhard_Merge.mix}
 addUserKnob {20 endGroup_3 l endGroup n -1}
 addUserKnob {20 filmic_1 l "Filmic Controls" n 1}
 filmic_1 0
 addUserKnob {19 Grade1_black l lift t "Lifts blacks" R 0 0.1}
 Grade1_black 0.005
 addUserKnob {41 shoulderStr l "Shoulder Str." t "Higher values produces brighter highlights" T Expression_Filmic.shoulderStr}
 addUserKnob {41 linStr l "Linear Str." T Expression_Filmic.linStr}
 addUserKnob {41 linAngle l "Linear Angle" T Expression_Filmic.linAngle}
 addUserKnob {41 toeStr l "Toe Str." T Expression_Filmic.toeStr}
 addUserKnob {41 toeNum l "Toe Num." T Expression_Filmic.toeNum}
 addUserKnob {41 toeDen l "Toe Denom." T Expression_Filmic.toeDen}
 addUserKnob {41 whitepoint l INVISIBLE +INVISIBLE T Expression_Filmic.whitepoint}
 addUserKnob {20 endGroup_1 l endGroup n -1}
 addUserKnob {20 Corona l "Corona Controls" n 1}
 Corona 0
 addUserKnob {41 compression l Compression T Expression_Corona.compression}
 addUserKnob {20 endGroup_2 l endGroup n -1}
}
 BackdropNode {
  inputs 0
  name Filmic
  xpos -340
  ypos -221
  bdwidth 144
  bdheight 193
 }
 BackdropNode {
  inputs 0
  name Corona
  xpos -498
  ypos -222
  bdwidth 151
  bdheight 194
 }
 BackdropNode {
  inputs 0
  name Luma_modo
  xpos -171
  ypos -212
  bdwidth 274
  bdheight 190
 }
 BackdropNode {
  inputs 0
  name Reinhard
  xpos 116
  ypos -215
  bdwidth 243
  bdheight 191
 }
 BackdropNode {
  inputs 0
  name Notes
  label "Filmic tonemap operator is based\non John Hable's work for Unchartered 2:\nhttp://filmicgames.com/archives/75\n\nExponential luma operator is used by \nmodo and Maxwell.\n\nReinhard operator is Reinhard global.\n\nCorona is from the 3ds Max plugin render\nengine Corona.\n\n\nCopyright 2013 Simon Lundberg\nFeel free to re-use, adapt, distribute\nand change tool to suit your needs,\nbut please don't sell it."
  note_font_size 25
  xpos 582
  ypos -307
  bdwidth 616
  bdheight 512
 }
 BackdropNode {
  inputs 0
  name Film_Simulation
  label "NOT IMPLEMENTED"
  xpos -663
  ypos -224
  bdwidth 141
  bdheight 196
 }
 Input {
  inputs 0
  name mask
  xpos -462
  ypos -344
  number 1
 }
 Dot {
  name Dot11
  xpos 499
  ypos -341
 }
 Dot {
  name Dot10
  xpos 499
  ypos 218
 }
 Input {
  inputs 0
  name img
  xpos -578
  ypos -344
 }
 Dot {
  name Dot14
  xpos -547
  ypos -295
 }
set N1a542300 [stack 0]
 EXPTool {
  mode Stops
  name EXPTool1
  xpos -462
  ypos -298
 }
 Dot {
  name Dot19
  xpos -216
  ypos -295
 }
 Dot {
  name Dot33
  xpos -216
  ypos -241
 }
set Naea67450 [stack 0]
 Dot {
  name Dot24
  xpos -275
  ypos -241
 }
set Nb255c280 [stack 0]
 Dot {
  name Dot25
  xpos -431
  ypos -241
 }
set Naea5ff70 [stack 0]
 Dot {
  name Dot28
  xpos -612
  ypos -241
 }
 Dot {
  name Dot29
  xpos -612
  ypos -185
 }
 Dot {
  name Dot30
  xpos -612
  ypos -62
 }
 Dot {
  name Dot31
  xpos -612
  ypos 80
 }
 Dot {
  name Dot32
  xpos 19
  ypos 80
 }
push $Naea5ff70
 Expression {
  expr0 r*(1+r/(compression**2))/(1+r)
  expr1 g*(1+g/(compression**2))/(1+g)
  expr2 b*(1+b/(compression**2))/(1+b)
  name Expression_Corona
  xpos -462
  ypos -147
  addUserKnob {20 User}
  addUserKnob {7 compression l "Highlight Compression" R 1 10}
  compression 1.5
 }
 Dot {
  name Dot26
  xpos -431
  ypos -47
 }
 Dot {
  name Dot5
  xpos -431
  ypos 59
 }
 Dot {
  name Dot17
  xpos 29
  ypos 59
 }
push $Nb255c280
 EXPTool {
  mode Stops
  red 1.8
  green 1.8
  blue 1.8
  name EXPTool2
  xpos -306
  ypos -173
 }
 Grade {
  black {{parent.Grade1_black.r} {parent.Grade1_black.g} {parent.Grade1_black.b} {parent.Grade1_black.a}}
  name Grade1
  xpos -306
  ypos -138
  addUserKnob {20 User}
 }
 Expression {
  temp_name0 tNtD
  temp_expr0 toeNum/toeDen
  temp_name1 tStD
  temp_expr1 toeStr*toeDen
  temp_name2 tStN
  temp_expr2 toeStr*toeNum
  temp_name3 lAlS
  temp_expr3 linAngle*linStr
  expr0 ((r*(shoulderStr*r+lAlS)+tStN)/(r*(shoulderStr*r+linStr)+tStD))-tNtD
  expr1 ((g*(shoulderStr*g+lAlS)+tStN)/(g*(shoulderStr*g+linStr)+tStD))-tNtD
  expr2 ((b*(shoulderStr*b+lAlS)+tStN)/(b*(shoulderStr*b+linStr)+tStD))-tNtD
  name Expression_Filmic
  xpos -306
  ypos -95
  addUserKnob {20 User}
  addUserKnob {7 shoulderStr l "Shoulder Str."}
  shoulderStr 0.5
  addUserKnob {7 linStr l "Linear Str."}
  linStr 0.8
  addUserKnob {7 linAngle l "Linear Angle"}
  linAngle 0.2
  addUserKnob {7 toeStr l "Toe Str."}
  toeStr 0.9
  addUserKnob {7 toeNum l "Toe Num." R 0 0.1}
  toeNum 0.065
  addUserKnob {7 toeDen l "Toe Denum."}
  toeDen 0.9
  addUserKnob {7 whitepoint l "White point" R 0 50}
  addUserKnob {7 whitepointExp}
  whitepointExp {{((whitepoint*(shoulderStr*whitepoint+linAngle*linStr)+toeStr*toeNum)/(whitepoint*(shoulderStr*whitepoint+linStr)+toeStr*toeDen))-(toeNum/toeDen)}}
 }
 Dot {
  name Dot22
  xpos -275
  ypos -52
 }
 Dot {
  name Dot15
  xpos -275
  ypos 42
 }
 Dot {
  name Dot9
  xpos 47
  ypos 42
 }
push $Naea67450
 Dot {
  name Dot21
  xpos -151
  ypos -241
 }
set Nb255b830 [stack 0]
 Dot {
  name Dot2
  xpos -151
  ypos -176
 }
set N1a544c40 [stack 0]
 Dot {
  name Dot3
  xpos -151
  ypos -134
 }
set N1a544fb0 [stack 0]
 Dot {
  name Dot20
  xpos -151
  ypos -105
 }
push $N1a544fb0
push $N1a544c40
 Saturation {
  saturation 0
  name Saturation1
  xpos -103
  ypos -179
 }
 Add {
  value 1
  name modo_add
  xpos -4
  ypos -185
 }
 Merge2 {
  inputs 2
  operation divide
  Bchannels rgb
  name modo_Divide
  xpos -4
  ypos -137
 }
 Merge2 {
  inputs 2
  operation copy
  mix 0.25
  name Reinhard_Merge
  xpos -4
  ypos -108
 }
 set Cb20bf900 [stack 0]
 Dot {
  name Dot8
  xpos 69
  ypos -53
 }
 Dot {
  name Dot4
  xpos 69
  ypos 34
 }
push $Nb255b830
 Dot {
  name Dot1
  xpos 122
  ypos -241
 }
 Dot {
  name Dot12
  xpos 122
  ypos -174
 }
set N1a602700 [stack 0]
 Dot {
  name Dot13
  xpos 122
  ypos -128
 }
set N1a602a70 [stack 0]
 Dot {
  name Dot18
  xpos 122
  ypos -85
 }
push $N1a602a70
push $N1a602700
 Add {
  value 1
  name Reinhard_Add
  xpos 222
  ypos -183
 }
 Merge2 {
  inputs 2
  operation divide
  Bchannels rgb
  name Reinhard_Divide
  xpos 222
  ypos -131
 }
clone $Cb20bf900 {
  inputs 2
  xpos 222
  ypos -88
  selected false
 }
 Dot {
  name Dot23
  xpos 253
  ypos -47
 }
 Dot {
  name Dot16
  xpos 253
  ypos 42
 }
 Dot {
  name Dot7
  xpos 90
  ypos 42
 }
 Switch {
  inputs 5
  which {{operator}}
  name Switch1
  xpos 38
  ypos 112
  addUserKnob {20 User}
  addUserKnob {4 operator l Operator M {Reinhard "Exponential luma" Filmic Corona}}
  operator Filmic
 }
 Clamp {
  maximum_enable false
  name Clamp1
  xpos 38
  ypos 153
 }
push $N1a542300
 Dot {
  name Dot27
  xpos -777
  ypos -295
 }
 Dot {
  name Dot6
  xpos -777
  ypos 218
 }
 Merge2 {
  inputs 2+1
  operation copy
  name Merge1
  xpos 38
  ypos 215
 }
 Output {
  name Output1
  xpos 38
  ypos 386
 }
end_group

2013-10-17, 16:37:14
Reply #7

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
It does Reinhard, Exponential Luma (same as Maxwell and modo), Corona and Filmic.

Great Stuff Captain Obvious! I hope you don't mind if I adapt those modes for my fusion macro? I will (of course!) annotate this section as well:
Code: [Select]
Filmic tonemap operator is based\non John Hable's work for Unchartered 2:\nhttp://filmicgames.com/archives/75\n\nExponential luma operator is used by \nmodo and Maxwell.\n\nReinhard operator is Reinhard global.\n\nCorona is from the 3ds Max plugin render\nengine Corona.\n\n\nCopyright 2013 Simon Lundberg\nFeel free to re-use, adapt, distribute\nand change tool to suit your needs,\nbut please don't sell it.
 
Any sufficiently advanced bug is indistinguishable from a feature.

2013-10-17, 16:43:03
Reply #8

Captain Obvious

  • Active Users
  • **
  • Posts: 167
    • View Profile
Go for it. I wouldn't mind getting my hands on it when you're done. I'm one of those few crazy people who own and use both Fusion and Nuke! :-D

2013-10-17, 17:18:54
Reply #9

Juraj

  • Active Users
  • **
  • Posts: 4742
    • View Profile
    • studio website
I am super curious about the "filmic" curve, keeps very nice contrast overall. What is it ?
If this gets converted to Fusion I will install it the very next day.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2013-10-17, 18:50:55
Reply #10

Captain Obvious

  • Active Users
  • **
  • Posts: 167
    • View Profile
I am super curious about the "filmic" curve, keeps very nice contrast overall. What is it ?
If this gets converted to Fusion I will install it the very next day.
It's based on this: http://www.slideshare.net/ozlael/hable-john-uncharted2-hdr-lighting

Go to page 92.

2013-10-17, 19:18:36
Reply #11

Juraj

  • Active Users
  • **
  • Posts: 4742
    • View Profile
    • studio website
I am super curious about the "filmic" curve, keeps very nice contrast overall. What is it ?
If this gets converted to Fusion I will install it the very next day.
It's based on this: http://www.slideshare.net/ozlael/hable-john-uncharted2-hdr-lighting

Go to page 92.

Thanks !

"Once you have,you can't live without it" :- D Incredible source btw, so many other cool .pdfs about graphic, forwarded to my brother/graphic programmer.

Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2013-10-17, 19:45:50
Reply #12

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Ok, I have just implemented it and I'm playing around. It is... kind of strange at first but I think it's just the "I need to get used to it" feeling. It's not just setting a bright and dark value and that's it - no - you need to balance shoulder, linear and white point if you play with one of the values.

I'll do the other curves and post an updated macro later :)
Any sufficiently advanced bug is indistinguishable from a feature.

2013-10-17, 20:10:03
Reply #13

rafpug

  • Active Users
  • **
  • Posts: 722
    • View Profile
Hello DeadClown

MacroScript for 3DStudio Max?

2013-10-18, 01:18:13
Reply #14

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
Thanks Deadclown and Captin Obvious for this interesting script
 i've tested the one for Nuke and it works nice, i must test it with other corona renders and my next work.

« Last Edit: 2013-10-18, 01:42:47 by Chakib »