forked from lookbothways/vfxTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noiceGen_linux
58 lines (42 loc) · 3.38 KB
/
noiceGen_linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import re
# /mnt/projects/global_sandbox/sequences/londonSeq/lonTestShot/LGT/work/maya/images/lonTestShot_LGT_arnoldFiveTest_v005/masterLayer
# only change these variables
filename_input = "/mnt/projects/global_sandbox/sequences/londonSeq/lonTestShot/LGT/work/maya/images/lonTestShot_LGT_arnoldFiveTest_v010/creature_adult_env/lonTestShot_LGT_arnoldFiveTest_v010.creature_adult_env.####.exr"
filename_output = "/mnt/projects/global_sandbox/sequences/londonSeq/lonTestShot/LGT/work/maya/images/lonTestShot_LGT_arnoldFiveTest_v010/creature_adult_env/lonTestShot_LGT_arnoldFiveTest_v010.creature_adult_env_denoiced.####.exr"
arnold_bin_path = "/mnt/pipeline/ATK_PIPELINE/maya/modules/2017x64/mtoa_3.0.0.2/bin"
startframe = 1001
endframe = 1003
variance = 0.5
pixel_search_radius = 9
pixel_neighborhood_patch_radius = 3
temporal_range = 6
# NOT DENOICED: Z, motionvector, P, N, UV, crypto_mat, crypto_object, all albedo passes
light_aov_names = ["AO", "coat", "diffuse_direct", "diffuse_indirect", "emission", "shadow_matte", "specular_direct", "specular_indirect", "sss", "transmission", "volume", "L_hdr", "L_key", "L_rim", "L_fill"]
# Full AOV list (SHR) "AO", "N", "P", "UV", "Z", "coat", "crypto_material", "crypto_object", "diffuse_albedo", "diffuse_direct", "diffuse_indirect", "emission", "motionvector", "shadow_matte", "specular_direct", "specular_indirect", "sss", "transmission", "volume", "L_hdr", "L_key", "L_rim", "L_fill"
#light_aov_names = ["frontlight", "backlight"] # if no light aov denoising needed, just leave list empty: []
filename_input_sequence_number = re.sub(r'#+',lambda m: r'{{:0{}d}}'.format(len(m.group(0))), filename_input)
filename_output_sequence_number = re.sub(r'#+',lambda m: r'{{:0{}d}}'.format(len(m.group(0))), filename_output)
for i in range (startframe, endframe + 1):
temporal_range_string = ""
light_aov_string = ""
for j in range(-temporal_range/2, temporal_range/2):
if (j==0) or (i+j < startframe) or (i+j > endframe):
continue
temporal_range_string += "-i " + filename_input_sequence_number.format(i+j) + " "
for k in light_aov_names:
light_aov_string += "-aov " + str(k) + " "
print arnold_bin_path + "/noice " \
+ "-patchradius " + str(pixel_neighborhood_patch_radius) + " " \
+ "-searchradius " + str(pixel_search_radius) + " " \
+ "-variance " + str(variance) + " " \
+ light_aov_string + " " \
+ "-i " + filename_input_sequence_number.format(i) + " " \
+ temporal_range_string + " " \
+ "-output " + filename_output_sequence_number.format(i),
if i is not endframe:
print " &&",
"""
Output
/mnt/pipeline/ATK_PIPELINE/maya/modules/2017x64/mtoa_3.0.0.2/bin/noice -patchradius 3 -searchradius 9 -variance 0.5 -aov L_fill -aov L_fill2 -aov L_hdr -aov L_key -aov L_neon -aov L_rim -i /mnt/projects/global_sandbox/sequences/londonSeq/lonTestShot/LGT/work/maya/images/lonTestShot_LGT_arnoldFiveTest_v009/creature_adult_env/lonTestShot_LGT_arnoldFiveTest_v009.creature_adult_env.1001.exr -output /mnt/projects/global_sandbox/sequences/londonSeq/lonTestShot/LGT/work/maya/images/lonTestShot_LGT_arnoldFiveTest_v009/creature_adult_env/lonTestShot_LGT_arnoldFiveTest_v009.creature_adult_env_denoiced.1001.exr
Modified from: https://github.com/zpelgrims/noice_command_generation/blob/master/noice_command_generation.py
"""