Viewport rendering: strange GPU slowness

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
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Viewport rendering: strange GPU slowness

Post by marcatore »

Hi,
I've downloaded the latest daily BlendLuxCore build (24th of march) and installed on a daily Blender 2.83 Alpha released yesterday.

The viewport rendering using GPU in an "old" scene (as "old" I mean a saved scene build from scratch some versions ago and always updated until 2.3 with no problems) that seems have some problems: it's really slow compared to CPU (never be, I've a Quadro K5200 that was always at least 2 or 3 time faster) and the Blender interface is really laggish.
performance during viewport rendering
-CPU about 180k
-GPU about 40k

Just for info, if I open the default blender scene I've this performance
- CPU about 240k
- GPU about 3,2M

And if I start a standard rendering (as standard I mean no viewport rendering) GPU come back faster than CPU
CPU 250k
GPU 1M

what setting should affect the viewport rendering on GPU?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Viewport rendering: strange GPU slowness

Post by B.Y.O.B. »

I have the scene here and I can reproduce the problem, but can you post a link to the scene so others can test it?

Here's a video showing the problem: https://youtu.be/4mGIAl-AAtw

It is a pretty heavy scene, and for some reason RTPathOCL is worse at dealing with it than PathOCL.
Unfortunately, once a viewport render runs, the framerate of RTPathOCL and the Blender interface is coupled, so if the render performance is low and frames only trickle in, the whole interface stutters.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Viewport rendering: strange GPU slowness

Post by B.Y.O.B. »

Side note, you should put your assets on a different view layer and make them invisible on the main scene view layer, in order to save a ton of geometry, lights etc. that are not visible from the camera, but present in the scene. But this is off-topic, in an ideal world it shouldn't matter how heavy the scene is.
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Viewport rendering: strange GPU slowness

Post by marcatore »

Thank you for you suggestions.
Meanwhile I'll try it.

But do you think that it should be solved or i should live with it?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Viewport rendering: strange GPU slowness

Post by B.Y.O.B. »

I think it should be solved, but I don't know how best to achieve it yet.
marcatore wrote: Tue Mar 24, 2020 8:21 am it's really slow compared to CPU (never be, I've a Quadro K5200 that was always at least 2 or 3 time faster)
Can you double-check this with an older LuxCore version that worked for you, making sure that you are using OpenCL in viewport? Because in older BlendLuxCore versions, the viewport was using CPU by default even when the main engine was set to OpenCL.
It would be interesting to know if RTPathOCL worked better in this scene before v2.4.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Viewport rendering: strange GPU slowness

Post by Dade »

I need a test scene.
Support LuxCoreRender project with salts and bounties
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

Re: Viewport rendering: strange GPU slowness

Post by marcatore »

I've good news for you (for us... :) )

Probably I've found what slow down everything.
Probably also in the heavy scene I've sent and that you checked before, there is a mesh with a particle system to make fur for a carpet.
It should have this shape
blender_2020-03-24_11-42-38.png
It's near a cube with an empty object called "UV_Tappeto_Interface...."
If you remove the particles from the viewport render, it render fast as GPU can (1M samples/sec with out env cache, 2,2M with env cache on)

And, probably the standard rendering was faster with GPU cause the particle system was disabled on rendering (camera icon on particle system off)
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Viewport rendering: strange GPU slowness

Post by B.Y.O.B. »

I have tracked the problem down to one rug with a hair system.
It seems to be the sole object responsible for the slow rendering (when I hide it, the viewport runs fast).

It looks to me like there's a bug in our hair export, which causes the hairs to be generated from rug surface to world origin, creating very long strands. I created an issue for this: https://github.com/LuxCoreRender/BlendL ... issues/408
Attachments
marcatore_scene_isolated_rug.zip
(556.65 KiB) Downloaded 158 times
vp.PNG
render.PNG
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Viewport rendering: strange GPU slowness

Post by Dade »

B.Y.O.B. wrote: Tue Mar 24, 2020 10:50 am It looks to me like there's a bug in our hair export, which causes the hairs to be generated from rug surface to world origin, creating very long strands. I created an issue for this: https://github.com/LuxCoreRender/BlendL ... issues/408
So the slowdown can probably tracked back to BVH quality: it will be slow with normal PATHOCL too if rendering the same scene.
Support LuxCoreRender project with salts and bounties
Post Reply