Blender的Cycles和eevee都支持使用AMD APU进行渲染。首先,要确保已安装最新的AMD Radeon驱动程序。然后,在Blender的渲染设置中,选择使用OpenCL来进行渲染,并选择AMD的GPU。以下是一个简单的示例代码,使用AMD APU进行Cycles渲染:
import bpy
bpy.context.scene.render.engine = 'CYCLES'
bpy.context.preferences.addons['cycles'].preferences.compute_device_type = 'OPENCL'
bpy.context.preferences.addons['cycles'].preferences.devices[0].use = True bpy.context.preferences.addons['cycles'].preferences.devices[0].type = 'CPU' bpy.context.preferences.addons['cycles'].preferences.devices[0].use_opencl = True
bpy.ops.render.render()
下一篇:blender怎么微调模型