-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbloom.py
More file actions
executable file
·29 lines (21 loc) · 787 Bytes
/
bloom.py
File metadata and controls
executable file
·29 lines (21 loc) · 787 Bytes
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
#!/usr/bin/env python3
try:
import torch
except ImportError:
pass
from easypbr import *
config_file="./config/bloom.cfg"
view=Viewer.create(config_file)
mesh=Mesh("./data/head.obj")
Scene.show(mesh,"mesh")
#puts the camera in a nicer view than default. You can also comment these two lines and EasyPBR will place the camera by default for you so that the scene is fully visible
view.m_camera.set_position([ 0.113911, -0.307625, 8.70148 ])
view.m_camera.set_lookat([ 0, -0.846572, 0 ])
# spotlights can be moved in the scene as if they were a camera
light=view.spotlight_with_idx(2)
light.set_position([ -8.25245, 8.19705, -3.44996 ])
light.set_lookat([ 0, -0.846572, 0 ])
#hide the gird floor
Scene.set_floor_visible(False)
while True:
view.update()