Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-02-09 22:17:51



Reply to topic  [ 7 posts ] 
Selection outlines cause 100% GPU usage 
Author Message

Joined: 2014-04-01 20:11:20
Posts: 21
Reply with quote
I've been having a problem for a while with 100% GPU usage when selecting any of my mesh text displays, and other large mesh linksets. It consistently goes to 100% GPU usage with a linkset that has more than six 8-face mesh objects (only 16 triangles each). I've been able to work around it for editing object contents, by selecting the root as a linked part. But moving an affected object still requires keeping the entire linkset selected.

I finally figured out that it's something with the selection outlines, because it's normal GPU usage with "show selection outlines" turned off. But turning off the animation for the outlines or changing the alpha in debug settings doesn't reduce the GPU usage with it on. It also doesn't matter if the selected object is in the camera view. The "show render info" HUD does say there are thousands more vertex buffer binds than the number of vertex buffers when the object is selected. The number of vertex buffer binds never exceeds the number of vertex buffers when "show selection outlines" is turned off.

I've tried a lot to figure it out on my own, but I still have no idea if it's just my computer. I can send a demo object to see if it does the same for anyone else.


2023-10-21 00:29:39
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
This is inherent to how the feature is coded. It is extremely taxing since it renders a lot more vertices, and in a rather inefficient way.
It also worsened with some (relatively) recent needed changes (mainly for animesh) implemented in LL's code, for bounding box and line segment intersection algorithms...

You will see much better performances in the v1.31.0 branch (when in PBR rendering mode), for which the outlines rendering was improved.

Note also that LL's viewer now got "Show hidden selection" disabled by default (this is the opposite for my viewer), and mainly because this feature is even more taxing: you might want to keep "Show hidden selection" disabled, at least while not editing objects (I will add a setting to do this automatically).


2023-10-21 08:34:47
Profile WWW

Joined: 2014-04-01 20:11:20
Posts: 21
Reply with quote
Thanks for explaining, the new settings are very much appreciated! I was finally able to do some testing before I saw your reply, and found out that the first affected version was 1.30.2.3. So 1.30.2.2 was the last version where the selection outlines don't cause abnormal GPU usage. I'm not sure if that helps now, since you explained what the cause is, but I'll add my research below since I already did it. I'll try to test with 1.31.0 in PBR mode.

I set up some test objects at https://maps.secondlife.com/secondlife/ ... 4/192/3000

The Example A board made of mesh with only 722 triangles is an example of something that gets stuck at 100% GPU when selected.

The Example B board made of prims with 26028 triangles has normal GPU usage. It's 25% for me with outlines on or off, which is also the same GPU usage as nothing being selected at all.

The Example C board made of mesh with only 130 triangles is another example of something that gets stuck at 100% GPU when selected.

The mesh shirt and pants with 16538 and 13456 triangles are also only 25% GPU for me, with outlines on or off, and also the same GPU usage as nothing being selected at all.

So it's strange how the outlines for the optimized meshes with such few triangles cause such extreme GPU usage, compared to the ones with 20 to 200 times the number of triangles that have practically no more GPU usage when selected. It only started with something that was changed in 1.30.2.3 at the end of February. GPU usage in 1.30.2.2 and earlier with full selection outlines is still the same as no object being selected, for any object.


2023-11-09 14:13:33
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
sayrahparx wrote:
It only started with something that was changed in 1.30.2.3 at the end of February.
There is strictly nothing that changed between 1.30.2.2 and 1.30.2.3 and that could explain such a difference (see the release notes by yourself).

Beside the "GPU usage" is totally irrelevant. Only the FPS rate is. The GPU usage may be higher in the same scene with higher FPS rates due to an optimized C++ code sending more frames each second for the GPU to draw...

In any case, I do not plan on optimizing the outline drawing routine for the (soon legacy) EE renderer. The PBR renderer already solved this issue...


2023-11-09 16:30:19
Profile WWW

Joined: 2014-04-01 20:11:20
Posts: 21
Reply with quote
It works perfectly for me in 1.31.0.13 with PBR enabled! The only difference for me from 1.30.2.2 is only half the triangles in a mesh are highlighted. It was great to see all the triangles again when testing 1.30.2.2. It's not really a big deal, but only half the triangles have been shown in a selected mesh for a while. Is there a new setting for that I'm not able to find?


2023-11-09 16:31:51
Profile

Joined: 2014-04-01 20:11:20
Posts: 21
Reply with quote
I was definitely confused when I checked the release notes for 1.30.2.3 before and didn't see any major related change. But all I can do is report what I found. I'm just glad I found out I wasn't crazy, to think there was a change at some point. But it works perfectly now in 1.31.0.13 with PBR mode, so that's all that matters.


2023-11-09 16:52:10
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
sayrahparx wrote:
It works perfectly for me in 1.31.0.13 with PBR enabled! The only difference for me from 1.30.2.2 is only half the triangles in a mesh are highlighted.
That is a bug (introduced in v1.30.2.25)... I did not even pay attention to the missing vertices (as an excuse, they are not always obvious to notice with some meshes, especially the simplest ones). Fixed for next release.

I however can confirm that there was strictly not the slightest difference (in rendering, fps rates or GPU usage) between v1.30.2.2 and v1.30.2.3: I even went as far as recompiling them to test and verify...


2023-11-10 12:53:12
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.