Skip to content

Commit b126c0a

Browse files
committed
Merge branch 'feat-exposure-bands'
2 parents c3eb840 + 90596c1 commit b126c0a

File tree

5 files changed

+113
-12
lines changed

5 files changed

+113
-12
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ Collections of resources I made for Foundry's Nuke software.
66

77
_this table might not be always up-to-date_
88

9-
| tool | description | type | tag |
10-
|--------------------------------------------------|----------------------------------------------------------------------------|---------------|-------------------------------------------------------------|
11-
| [nodeToText](src/nodeToText) | Convert the selected nodes knobs:values to a .json. | script | ![i-o](https://img.shields.io/badge/i--o-9a52dd) |
12-
| [metadataToCamera](src/metadataToCamera) | A custom Nuke node to convert OpenEXR metadata to a Nuke Camera node. | nodes | ![i-o](https://img.shields.io/badge/i--o-9a52dd) |
13-
| [imageCropDivide](src/imageCropDivide) | From given maximum dimensions, divide an input image into multiples crops. | nodes, script | ![transform](https://img.shields.io/badge/transform-4c78a6) |
14-
| [primaries_inset](src/primaries_inset) | colorspace remapping to ensure smooth hue reproduction (AgX like) | nodes, blink | ![grading](https://img.shields.io/badge/grading-43896b) |
15-
| [ocio-contrast-linear](src/ocio-contrast-linear) | contrast on linear encoded imagery based on the OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
16-
| [ocio-contrast-log](src/ocio-contrast-log) | contrast on log encoded imagery based on the OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
17-
| [ocio-saturation](src/ocio-saturation) | saturation with variable weights also based on OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
18-
| [hsv](src/hsv) | color correction with HSV model | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
19-
| [whitebalance](src/whitebalance) | creative white balance with temperature/tint | nodes, blink | ![grading](https://img.shields.io/badge/grading-43896b) |
9+
| tool | description | type | tag |
10+
|--------------------------------------------------|----------------------------------------------------------------------------|----------------|-------------------------------------------------------------|
11+
| [nodeToText](src/nodeToText) | Convert the selected nodes knobs:values to a .json. | script | ![i-o](https://img.shields.io/badge/i--o-9a52dd) |
12+
| [metadataToCamera](src/metadataToCamera) | A custom Nuke node to convert OpenEXR metadata to a Nuke Camera node. | nodes | ![i-o](https://img.shields.io/badge/i--o-9a52dd) |
13+
| [imageCropDivide](src/imageCropDivide) | From given maximum dimensions, divide an input image into multiples crops. | nodes, script | ![transform](https://img.shields.io/badge/transform-4c78a6) |
14+
| [primaries_inset](src/primaries_inset) | colorspace remapping to ensure smooth hue reproduction (AgX like) | nodes, blink | ![grading](https://img.shields.io/badge/grading-43896b) |
15+
| [ocio-contrast-linear](src/ocio-contrast-linear) | contrast on linear encoded imagery based on the OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
16+
| [ocio-contrast-log](src/ocio-contrast-log) | contrast on log encoded imagery based on the OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
17+
| [ocio-saturation](src/ocio-saturation) | saturation with variable weights also based on OCIO implementation | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
18+
| [hsv](src/hsv) | color correction with HSV model | nodes | ![grading](https://img.shields.io/badge/grading-43896b) |
19+
| [whitebalance](src/whitebalance) | creative white balance with temperature/tint | nodes, blink | ![grading](https://img.shields.io/badge/grading-43896b) |
20+
| [exposure-bands](src/exposure-bands) | generate successive bands of gradually increasing exposure | nodes | ![generate](https://img.shields.io/badge/generate-3A3B9F) |
2021

2122
# Utilisation
2223

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "foundry-nuke"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
description = "Collection of script & resources for Foundry's Nuke software."
55
authors = ["Liam Collod <monsieurlixm@gmail.com>"]
66
readme = "README.md"

src/exposure-bands/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# exposure-bands
2+
3+
generate successive bands of gradually increasing exposure.
4+
5+
This is useful when testing and prototyping image-rendering transform and
6+
you need to evaluate its render against different exposure of a same source.
7+
8+
![nuke screenshot as example](example.png)
9+
10+
# design
11+
12+
Be aware that to be dynamic as possible the node generate the exposure bands
13+
on different frames. This implies also having tcl expression using the `frame`
14+
variable which can sometimes lead to unstabilities.
15+
16+
# adding dynamic text on each band
17+
18+
It's possible to add text indicating the exposure value of each band without
19+
manually creating a text node for each band, however it's a bit tricky:
20+
21+
- Go inside the node
22+
- Between the 2 internal nodes add a `ModifyMetadata` node
23+
- add a single `_bands_exposure` key
24+
- as value of that key put the tcl expression `[value parent._exposure]`
25+
- Add a `Text` node after the `ModifyMetadata`
26+
- in the message put the tcl expression `[metadata _bands_exposure]`
27+
- configure the Text node as you wish
28+
29+
> Why using a ModifyMetadata node ?
30+
31+
This is the only hack I found so Nuke properly pickup the band exposure for
32+
its correct frame (remember the tool use the frame-range to work).
33+
34+
> [!TIP]
35+
> If you are using the tool for evaluating image rendering you probably don't
36+
> want the text to be affected by it, so you will have to put an OCIODisplay
37+
> node or whatver you use for your image rendering before the text node but after
38+
> the first internal exposure node.

src/exposure-bands/example.png

287 KB
Loading

src/exposure-bands/exposure-bands.nk

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Group {
2+
name ExposureBandsTest
3+
xpos 0
4+
ypos 0
5+
tile_color 0x64899900
6+
note_font_color 0xffffff00
7+
addUserKnob {20 User l ExposureBandsTest}
8+
addUserKnob {26 txt_exposure l "" +STARTLINE T "<h1> Exposure</h1>"}
9+
addUserKnob {26 txt_exposure_2 l "" +STARTLINE T "All values in Stops."}
10+
addUserKnob {26 spacing1 l "" +STARTLINE T " "}
11+
addUserKnob {3 exposure_start l "start" -STARTLINE}
12+
exposure_start -6
13+
addUserKnob {3 exposure_end l " end" -STARTLINE}
14+
exposure_end 6
15+
addUserKnob {3 exposure_step l " step" -STARTLINE}
16+
exposure_step 2
17+
addUserKnob {26 "" +STARTLINE}
18+
addUserKnob {3 _frames_number l "bands number"}
19+
_frames_number {{"(exposure_end - exposure_start) / exposure_step + 1"}}
20+
addUserKnob {7 _exposure l "current exposure"}
21+
_exposure {{"frame >= 0 & frame <= _frames_number?exposure_start+exposure_step*frame:0"}}
22+
addUserKnob {20 About}
23+
addUserKnob {26 toolName l name T ExposureBandsTest}
24+
addUserKnob {26 toolVersion l version T 0.1.1}
25+
addUserKnob {26 toolAuthor l author T "<a style=\"color: rgb(200,200,200);\" href=\"https://mrlixm.github.io/\">Liam Collod</a>"}
26+
addUserKnob {26 toolDescription l description T "Test image rendering with sucessive bands of gradually increasing exposure."}
27+
addUserKnob {26 toolUrl l url T "<a style=\"color: rgb(200,200,200);\" href=\"https://github.com/MrLixm/Foundry_Nuke\">https://github.com/MrLixm/Foundry_Nuke</a>"}
28+
}
29+
Input {
30+
inputs 0
31+
name image
32+
xpos 0
33+
ypos 0
34+
}
35+
EXPTool {
36+
name BandExposure
37+
xpos 0
38+
ypos 50
39+
mode Stops
40+
gang false
41+
red {{parent._exposure}}
42+
green {{parent._exposure}}
43+
blue {{parent._exposure}}
44+
}
45+
ContactSheet {
46+
name BandsContactSheet
47+
xpos 0
48+
ypos 200
49+
width {{width*columns}}
50+
height {{height}}
51+
rows 1
52+
columns {{parent._frames_number}}
53+
splitinputs true
54+
startframe 0
55+
endframe {{parent._frames_number}}
56+
}
57+
Output {
58+
name Output1
59+
xpos 0
60+
ypos 350
61+
}
62+
end_group

0 commit comments

Comments
 (0)