@@ -50,15 +50,18 @@ def SceneOps():
50
50
scene = pyluxcore .Scene ("scenes/luxball/luxball-hdr.scn" , 1.0 )
51
51
52
52
def RenderConfigOps ():
53
- renderConfig = pyluxcore .Scene ("scenes/luxball/luxball-hdr.cfg" , 1.0 )
53
+ props = pyluxcore .Properties ("scenes/luxball/luxball-hdr.cfg" )
54
+ config = pyluxcore .RenderConfig (props )
54
55
55
56
def SimpleRender ():
56
57
# Load the configuration from file
57
58
props = pyluxcore .Properties ("scenes/luxball/luxball-hdr.cfg" )
58
59
59
- # Change the render engine to PATHCPU
60
- props .Set (pyluxcore .Property ("renderengine.type" , ["PATHCPU" ]))
61
- #props.Set(pyluxcore.Property("opencl.devices.select", ["0100"]))
60
+ # Change the render engine
61
+ props .Set (pyluxcore .Property ("renderengine.type" , ["PATHOCL" ]))
62
+ props .Set (pyluxcore .Property ("opencl.devices.select" , ["01000" ]))
63
+ props .Set (pyluxcore .Property ("film.hw.enable" , ["0" ]))
64
+ props .Set (pyluxcore .Property ("opencl.native.threads.count" , [0 ]))
62
65
63
66
config = pyluxcore .RenderConfig (props )
64
67
session = pyluxcore .RenderSession (config )
@@ -78,15 +81,15 @@ def SimpleRender():
78
81
session .Stop ()
79
82
80
83
# Save the rendered image
81
- session .GetFilm ().Save ()
84
+ # session.GetFilm().Save()
82
85
83
86
84
87
################################################################################
85
88
86
89
def MemoryUsage ():
87
90
import psutil
88
91
process = psutil .Process (os .getpid ())
89
- mem = process .get_memory_info ()[0 ]
92
+ mem = process .memory_info ()[0 ]
90
93
return mem
91
94
92
95
def PropertiesTest ():
@@ -169,9 +172,9 @@ def main():
169
172
170
173
print ("LuxCore %s" % pyluxcore .Version ())
171
174
172
- PropertiesTest ()
173
- SceneTest ()
174
- RenderConfigTest ()
175
+ # PropertiesTest()
176
+ # SceneTest()
177
+ # RenderConfigTest()
175
178
SimpleRenderTest ()
176
179
177
180
if __name__ == '__main__' :
0 commit comments