OpenCL+Metropolis won't render

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

OpenCL+Metropolis won't render

Post by lacilaci »

I wanted to test something and I'm getting an error that sample data buffer is too big for gpu.

Normally I would get this error when I'd try to render high res. image on opencl and have denoiser enabled, but now I get this error even in low res and denoiser disabled.

I don't know if it's a scene problem or bug so here's a test scene.
Attachments
glass_interior_test_279.blend
(2.06 MiB) Downloaded 108 times
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenCL+Metropolis won't render

Post by B.Y.O.B. »

Metropolis is a much more complex sampler than Sobol or Random, and on the GPU it consumes more memory (because there are more cores, and each core needs a copy of the sampler).
The scene probably fits barely in memory without it.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: OpenCL+Metropolis won't render

Post by lacilaci »

B.Y.O.B. wrote: Mon Jan 21, 2019 7:48 am Metropolis is a much more complex sampler than Sobol or Random, and on the GPU it consumes more memory (because there are more cores, and each core needs a copy of the sampler).
The scene probably fits barely in memory without it.
I was able to run metropolis on opencl in my "first steps" project at high resolutions. This is empty scene at 1200x1200.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: OpenCL+Metropolis won't render

Post by lacilaci »

Oooooh sh!t...

I know... I've set too many diffuse and other paths so that why it fails on gpu. Didn't expect that to make problems
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenCL+Metropolis won't render

Post by Dade »

lacilaci wrote: Mon Jan 21, 2019 6:47 am I don't know if it's a scene problem or bug so here's a test scene.
Metropolis needs to save a lot of information for each path vertices. GPUs are also running many hundred of thousands of threads for the rendering. The product of number of threads for max. path depth will determine the amount of ram required.

Your 100 max. depth setting requires a lot of ram. Just reduce the max. path depth (100 is really a huge number). The other option would be to reduce the number of threads (there is a parameter) but at the cost of some performance.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: OpenCL+Metropolis won't render

Post by lacilaci »

Yes yes, I understand now where was the problem. Thanks for explanation.

BTW. In this scene I realized I cannot get sunlight through 3 layers of thick glass panels unless I use bidir+metropolis. (I assume it's just too difficult)
This makes me wonder if cache could actually help even with something like this.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenCL+Metropolis won't render

Post by B.Y.O.B. »

You'll have to set the glass to "architectural" so direct light can pass through.
Otherwise, all light passing the glass is caustics, and those are obviously very hard to render for unidirectional path.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: OpenCL+Metropolis won't render

Post by lacilaci »

B.Y.O.B. wrote: Mon Jan 21, 2019 12:45 pm You'll have to set the glass to "architectural" so direct light can pass through.
Otherwise, all light passing the glass is caustics, and those are obviously very hard to render for unidirectional path.
I see... maybe the new caching could make this renderable though.

The problem with archglass is no refraction. Ideally there would be an option to make glass simply invisible for lights/shadows.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenCL+Metropolis won't render

Post by B.Y.O.B. »

lacilaci wrote: Mon Jan 21, 2019 12:55 pm I see... maybe the new caching could make this renderable though.
Maybe, but all the photons that shine through the glass will end up in the caustics cache and will probably still be harder to trace than direct/indirect photons.
lacilaci wrote: Mon Jan 21, 2019 12:55 pm The problem with archglass is no refraction.
For thin window glass (a few millimeters) this doesn't really make a difference.
See also https://wiki.luxcorerender.org/LuxCoreR ... hitectural

If you have a glass sheet without a frame, a trick to have the border visible is to use "real glass" only for the border, but architectural glass for the rest of the sheet.
Attachments
red = real glass, white = arch. glass
red = real glass, white = arch. glass
2019-01-21_14-23-25.png (8.44 KiB) Viewed 3546 times
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: OpenCL+Metropolis won't render

Post by lacilaci »

B.Y.O.B. wrote: Mon Jan 21, 2019 1:17 pm
lacilaci wrote: Mon Jan 21, 2019 12:55 pm I see... maybe the new caching could make this renderable though.
Maybe, but all the photons that shine through the glass will end up in the caustics cache and will probably still be harder to trace than direct/indirect photons.
lacilaci wrote: Mon Jan 21, 2019 12:55 pm The problem with archglass is no refraction.
For thin window glass (a few millimeters) this doesn't really make a difference.
See also https://wiki.luxcorerender.org/LuxCoreR ... hitectural

If you have a glass sheet without a frame, a trick to have the border visible is to use "real glass" only for the border, but architectural glass for the rest of the sheet.
hmm... Neat trick, thanks.

I still hope to see some path/visibility options per object in future
Post Reply