Autodesk / Autodesk/maya-usd

[EMSUSD-2565] Performance degraded for PointInstancer when using depth peeling mode

Open
#4,047 3 comments 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 5h
Merged PRs (30d)
16

Description

**Describe the bug**

Hi,

Our production has reported a performance degrade when switching from default 'object sorting' to 'depth peeling'.
This happens for **PointInstancer** but seems better for **non-instanced** prims.

Example - **non-instanced** prims: all the tiny cubes in the viewport are just regular prims:
- 🆗Navigate the viewport on 'object sorting' in smooth shaded mode: performs reasonable;
- 🆗Navigate the viewport on 'object sorting' in wireframe mode: performs reasonable;
- 🆗Switch to 'depth peeling', **without** changing display mode: performs reasonable;
- 🆗Then switch to either smooth shaded or wireframe mode: becomes unresponsive at first and then becomes reasonable later, Maya might be doing something at the beginning but as long as the viewport responses normally, I think it's acceptable.

![non_instanced_prims](https://github.com/user-attachments/assets/b1c33a90-a055-4b7c-9973-757b8861fd94)

Example - **PointInstancer** prims: all the tiny cubes positions & numbers match exactly the non-instanced example:
- 🆗Navigate the viewport on 'object sorting' in smooth shaded mode: performs reasonable;
- 🆗Navigate the viewport on 'object sorting' in wireframe mode: performs reasonable;
- 🆗Switch to 'depth peeling', **without** changing display mode: performs reasonable;
- 🚫Then switch to either smooth shaded or wireframe mode: becomes unresponsive, needs to wait for much longer than non-instanced example until Maya UI responses, but then keep navigating the viewport, it's still unresponsive for a long time before coming back to user.

![point_instancer](https://github.com/user-attachments/assets/06339d6d-389c-49c3-86bc-bb580d441c71)

Example - Navite Maya geometries: imported (converted) from non-instanced example into Maya as native geometries, just for reference:
- No matter which transparency mode and/or shading mode combination, viewport runs quite good actually.

![native_Maya_geom](https://github.com/user-attachments/assets/b32adc8c-8fe8-4deb-b1ea-63f88224defa)

**Steps to reproduce**
Steps to reproduce the behavior:
1. Launch Maya and load either the example USD file **example_non_instanced_prims.usda** or **example_point_instancer.usda**
2. Change the transparency mode from default 'object sorting' to 'depth peeling'
3. Switch viewport shading mode to either smooth shaded or wireframe mode
4. Navigate in the viewport and observe the responsive time

**Expected behavior**
Improve the viewport performance for PointInstancer when using depth peeling mode.

**Attachments**
Example USD files:
[performance_degrade_example_USD_files.zip](https://github.com/user-attachments/files/18121816/performance_degrade_example_USD_files.zip)

**Specs (if applicable):**
- OS & version: CentOS 7.8
- Compiler & version: gcc 6.3
- Maya version: Tested on Maya 2022 / 2023.3
- Maya USD commit SHA: Tested on official v0.23.0 / v0.26.0 / v0.30.0
- Pixar USD commit SHA: Tested on official USD-22.05/24.03

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.