forked from liuyuan-pal/NeRO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
relight.py
27 lines (23 loc) · 797 Bytes
/
relight.py
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
import argparse
import subprocess
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--blender', type=str)
parser.add_argument('--mesh', type=str)
parser.add_argument('--material', type=str)
parser.add_argument('--hdr', type=str)
parser.add_argument('--name', type=str)
parser.add_argument('--trans', dest='trans', action='store_true', default=False)
args = parser.parse_args()
cmds=[
args.blender, '--background', '--python', 'blender_backend/relight_backend.py', '--',
'--output', f'data/relight/{args.name}',
'--mesh', args.mesh,
'--material', args.material,
'--env_fn', args.hdr,
]
if args.trans:
cmds.append('--trans')
subprocess.run(cmds)
if __name__=="__main__":
main()