Blenderproc: Time for rendering 1 image ?

Created on 4 Feb 2020  路  10Comments  路  Source: DLR-RM/BlenderProc

Hello,
I had generated images by Blender in order to provide datasets for training deep learning model (classification, instance segmentation, pose, ...) with Physics integration, object randomly placing...

But my biggest problem is about the time for rendering 1 image. For me, it takes about 1 min.
Iam so surprised about your rendering time, about 50 images in 1 min ( 3000 images in 1 hr)
I was also using Cycle mode for rendering.

Can you give me some info about the image resolution and maybe other things to achieve that amount of time ?

Thanks in advance.

question

Most helpful comment

Of course the render time depends greatly on the choose resolution. But did you know that there are at least ten things ,you can do to speed up the render process in blender? We spent a month on optimizing the speed to make it as fast as possible.

Nonetheless, it is not as fast as Unity or other Game Engine related projects. But we believe that generating data is not something you do everyday (at least for most problems), so doing this once or twice, will mostly be sufficient for most problems and then you can easily generated over a weekend, enough data to train your model.

We tested a lot of configurations to see what is fasted, from choosing an automatic tile size, to reducing the number of transmission paths, switching to the new denoizer from Intel, which makes it possible to even further reduce the sample amount, and many more. In particular, for everything, which is not color we only use one sample, which is as fast as it take to load the scene.
We are also trying to figure out, how to reduce this loading, if the scene itself does not change.

If you want to know which specific values we put in check out this function:
https://github.com/DLR-RM/BlenderProc/blob/f2836de174bd240febecba42a63040dac87a9b88/src/renderer/Renderer.py#L54

Does this answer it?

All 10 comments

Of course the render time depends greatly on the choose resolution. But did you know that there are at least ten things ,you can do to speed up the render process in blender? We spent a month on optimizing the speed to make it as fast as possible.

Nonetheless, it is not as fast as Unity or other Game Engine related projects. But we believe that generating data is not something you do everyday (at least for most problems), so doing this once or twice, will mostly be sufficient for most problems and then you can easily generated over a weekend, enough data to train your model.

We tested a lot of configurations to see what is fasted, from choosing an automatic tile size, to reducing the number of transmission paths, switching to the new denoizer from Intel, which makes it possible to even further reduce the sample amount, and many more. In particular, for everything, which is not color we only use one sample, which is as fast as it take to load the scene.
We are also trying to figure out, how to reduce this loading, if the scene itself does not change.

If you want to know which specific values we put in check out this function:
https://github.com/DLR-RM/BlenderProc/blob/f2836de174bd240febecba42a63040dac87a9b88/src/renderer/Renderer.py#L54

Does this answer it?

@themasterlink
Thank you for such a detailed answer.
Iam looking into it and will explore by myself first, I will review if I achieve faster time then.

@themasterlink
1 more thing is that if in Blender 2.8 EEVEE mode they provide Pass index in render layer as in ver2.79 and lower.
The speed problem will be solved easily.
But unfortunate, that feature is not available now.

That sounds interesting, so far we are only using blender 2.81 with cycles, EEVEE is in our opinion not suited for creating realistic data. Mostly, because Game Engines usually make a lot of assumptions about human vision, which means they exploit our weaknesses to make images look more realistic, by focusing the computational power on things humans are good in recognizing.
However, this is not the same as generating images, which look like the real life, that's why we believe cycles has an advantage in training neural network over common game engines.

@themasterlink

I had added some parameters from your code to my code. But I can see that the time didn't improve.
I was rendering the image with 1920x1200 resolution.

I think it's worth to try with EEVEE, I also converted my code from "CYCLES" to "EEVEE" but the disappearance of Pass index in EEVEE mode is such a big problem :((( There're differences between the quality of 2 modes but I think the EEVEE's image quality is still acceptable. I also used some of them to train my deep learning model.

Hope that they will provide that feature in the near future.

1920x1200 is a quite high resolution, how many passes did you use?
Did you use the new Intel Denoizer?

We don't think it is about acceptable quality or not, we think it is about closing the gap between real and simulation, by generating images, which are closer to reality. If it is only about acceptable quality than I would suggest using Unity as Renderer, it is much faster than Blender and there are already ports for deep learning applications available.

@themasterlink
Yeah, the image which generated from EEVEE mode is pretty real.

I didnt use Intel Denoizer yet because my Python script is for Blender 2.79
With newest version of Blender, I dont have much exp.

I see, then I close this issue now?

@themasterlink Yeah, thank you!

@trungpham2606

You are welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soans1994 picture soans1994  路  5Comments

ggaziv picture ggaziv  路  3Comments

soans1994 picture soans1994  路  3Comments

soans1994 picture soans1994  路  4Comments

eugval picture eugval  路  3Comments