Reducing redraw lag in layout brushes

   235   0   0
User Avatar
Member
1 posts
Joined: 9月 2024
Offline
Hi all,

I'm currently working on enhancing the feedback that artists receive from brushes within a layout node. To do this, I’ve created a simple brush that utilizes Houdini's scene graph highlight feature. The brush tracks affected points and passes instances to be highlighted to the onDrawGuides method.

The setup is mostly functioning as intended. However, I’ve run into an issue where the highlighted meshes are being redrawn with every mouse move event, even when the list of highlighted meshes hasn't changed. The mesh redraws are causing performance issues.

I suspect the problem is related to hou.GeometryDrawable, which the brush uses to display handles. It appears that the brush handles and the scene graph highlights are sharing the same buffer. So, when the brush handles are redrawn, the highlighted meshes are also redrawn.

This can be easily reproduced with the vanilla Layout node by selecting any instance leaf and moving the brush around. The result is significant sluggishness. I’ve attached two screen grabs to illustrate the issue:

Non-selected instance: The brush draw is responsive when nothing is selected in the viewport.



Selected instance: When a leaf instance is selected (causing the outline to be drawn), the redraw becomes sluggish.



Is there a way to make the hou.GeometryDrawable used by the brush handles use a different buffer? From what I understand, the draw_handle argument holds a memory address to the current buffer, which Houdini manages internally. However, is there a way to request a separate buffer for the brush handles, so I can layer the different drawings and prevent unnecessary redrawing of the highlights or selection?

Thanks in advance for any insights!
Edited by hpotin - 2024年10月8日 12:05:21

Attachments:
non_selected_fine.gif (1.2 MB)
selected_slugish.gif (1.4 MB)

  • Quick Links