Autodesk / Autodesk/maya-usd

[EMSUSD-2152] Viewport does not update for animated point instancer with instances

Open
#4,117 2 comments 0 reactions 1 assignee Assigned to @santosd View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

**Describe the bug**

Hi,

We have encountered viewport drawing issue for animated point instancer where prototypes are instances.
The point instancer has time samples (animated) and expect to move frame by frame (1-5), but viewport does not update when scrubbing timeline.

The example has three type of prims:
- a static cube (for reference)
- a point instancer with **non-instances** which moves along Z-axis at frame range 1-5 - animating correctly
- a point instancer with **instances** which moves along XY-plane at frame range 1-5 - does not animate as expected

Here is how it should look like in usdview (correct one):

![Image](https://github.com/user-attachments/assets/afd8d42f-0406-4cb8-946b-c038fa7def82)

And this is how it currently behaves in Maya:

![Image](https://github.com/user-attachments/assets/9523f42a-4c86-4e8b-b24e-7e50e9141c84)

The point instancer with instances does not get updated unless selecting/deselecting the point instancer.

**Steps to reproduce**
Steps to reproduce the behavior:
1. Load the provided USD example in Maya
2. Scrub the timeline or just click any frame between 1 to 5
3. The point instancer with instances should move but it remains still
4. Select (or deselect) the problematic point instancer, viewport will suddenly get updated as expected

**Expected behavior**
Expect to get animated point instancer with instances moving correctly.

**Attachments**

Example USD scene:
```
#usda 1.0
(
defaultPrim = "root"
upAxis = "Y"
endTimeCode = 5
startTimeCode = 1
)

over "flattened"
{
def Mesh "geo"
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
int[] faceVertexCounts = [8, 3, 3, 3, 3, 3, 3, 3, 3]
int[] faceVertexIndices = [0, 7, 6, 5, 4, 3, 2, 1, 0, 1, 8, 1, 2, 8, 2, 3, 8, 3, 4, 8, 4, 5, 8, 5, 6, 8, 6, 7, 8, 7, 0, 8]
point3f[] points = [(0.7071067, 0.7071067, -1), (0, 0.9999999, -1), (-0.7071067, 0.7071067, -1), (-0.9999999, -2.220446e-16, -1), (-0.7071067, -0.7071067, -1), (0, -0.99999994, -1), (0.70710677, -0.70710677, -1), (1, -2.220446e-16, -1), (0, 2.220446e-16, 1)]
uniform token subdivisionScheme = "none"
}
}

def Xform "root"
{
def PointInstancer "point_instancer_with_instaces"
{
float3[] extent = [(-1, -1, -1), (4, 1, 1)]
point3f[] positions = [(0, 0, 0), (3, 0, 0)]
quath[] orientations = [(1.0, 0.0, 0.0, 0.0), (0.7071067811865476, 0.7071067811865475, 0.0, 0.0)]
int[] protoIndices = [0, 0]
rel prototypes = [
,
]
float3 xformOp:translate = (2, 0, 0)
float3 xformOp:translate.timeSamples = {
1: (2, 2, 0),
2: (3, 3, 0),
3: (4, 4, 0),
4: (5, 5, 0),
5: (6, 6, 0),
}
uniform token[] xformOpOrder = ["xformOp:translate"]

def Scope "Prototypes"
{
def "cone_instance" (
instanceable = true
prepend references =
)
{
}
}
}

def PointInstancer "point_instancer_with_non_instances"
{
float3[] extent = [(-1, -1, -1), (4, 1, 1)]
point3f[] positions = [(0, 0, 0), (3, 0, 0)]
quath[] orientations = [(1.0, 0.0, 0.0, 0.0), (0.7071067811865476, 0.7071067811865475, 0.0, 0.0)]
int[] protoIndices = [0, 0]
rel prototypes = [
,
]
float3 xformOp:translate = (0, 0, 2)
float3 xformOp:translate.timeSamples = {
1: (0, 0, 2),
2: (0, 0, 3),
3: (0, 0, 4),
4: (0, 0, 5),
5: (0, 0, 6),
}
uniform token[] xformOpOrder = ["xformOp:translate"]

def Scope "Prototypes"
{
def "cone_non_instance" (
prepend references =
)
{
}
}
}

def Xform "static"
{
def Cube "cube"
{
}
}
}
```

**Specs (if applicable):**
- OS & version : CentOS 7.8
- Compiler & version : gcc 6.3
- Maya version : Maya-2023.3.3
- Maya USD commit SHA : tested official v0.30.0 and latest dev (as of today, dd5b7082c)
- Pixar USD commit SHA : official USD-22.05 and 25.02a

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.