DLR-RM / BlenderProc

A procedural Blender pipeline for photorealistic training image generation
GNU General Public License v3.0
2.79k stars 449 forks source link

How to build the BVH with CPU while rendering with GPU? #1151

Closed yiboz2001 closed 1 week ago

yiboz2001 commented 1 week ago

Describe the issue

Hi! I'm trying to use BlenderProc to render a scene that includes a BVH. When I set the render device to GPU, the BVH building process always gets stuck like this:

image

When I set the render device to CPU, the BVH building process will completes instantaneously, but the rendering process is impacted. I find this issue similar to mine (https://blender.community/c/rightclickselect/EPYl/), and I wonder how to build the BVH with CPU while rendering with GPU in BlenderProc. Thanks a lot!

Minimal code example

bpy.context.scene.render.engine = 'CYCLES'
bpy.context.scene.cycles.device = 'GPU'

Files required to run the code

No response

Expected behavior

Build the BVH with CPU while rendering with GPU.

BlenderProc version

BlenderProc 2.7

cornerfarmer commented 1 week ago

Hey @yiboz2001, this might be specific to your system. Which gpu are you using? Which script are you running (does the quickstart work)? Have you the latest gpu driver installed?

yiboz2001 commented 1 week ago

Hey @yiboz2001, this might be specific to your system. Which gpu are you using? Which script are you running (does the quickstart work)? Have you the latest gpu driver installed?嘿,这可能特定于您的系统。您使用的是哪种 GPU?您正在运行哪个脚本(快速入门是否有效)?你安装了最新的gpu驱动吗?

This situation occurs in both scenarios: rendering directly with Blender (GeForce RTX 4060) and rendering with the BlenderProc script (Nvidia A10 48G). Moreover, BlenderProc performs well on other scene (.blend) that not includes BVH. Therefore, I guess it may be an inherent issue with Blender. :(

cornerfarmer commented 1 week ago

ok yes then this is probably a blender issue. Maybe you want to open an issue here: https://projects.blender.org/blender/blender/issues