Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenderEngineVtk cloning yields rendering artifacts #22044

Open
SeanCurtis-TRI opened this issue Oct 15, 2024 · 2 comments · May be fixed by #22053
Open

RenderEngineVtk cloning yields rendering artifacts #22044

SeanCurtis-TRI opened this issue Oct 15, 2024 · 2 comments · May be fixed by #22053
Assignees
Labels
component: geometry perception How geometry appears in color, depth, and label images (via the RenderEngine API) type: bug

Comments

@SeanCurtis-TRI
Copy link
Contributor

SeanCurtis-TRI commented Oct 15, 2024

What happened?

In #22025, a test in render_engine_vtk_test.cc had to be disabled for EGL. This failure is not unique to the EGL backend. More robust testing shows that EGL merely provided a context which exposed an underlying problem.

Do the following:

bazel run //tools:model_visualizer_private -- --show_rgbd_sensor \
    package://drake/geometry/render/test/meshes/rainbow_box.obj

As you rotate the view and look at the box's blue face, you'll observe something like the following:

output

What you see is that the blue, green, and red faces are always drawn. However, they are drawn with incorrect classification of "in front". The red face is always considered in front of the green and the green is always considered in front of the blue. And this is with the GLX backend. In fact, the test in render_engine_vtk_test.cc would also fail if it were phrased differently. It's simply insufficiently sufficient to recognize this failure.

In fact, from bisection, it becomes apparent that the failure was introduced in #20944. Checkout 949aa20 and run the command above and you'll observe the same artifacts. (For this older commit, it may be necessary to place the .obj in a dummy .sdf file to facilitate the parsing functionality at the time of that commit.)

Note: this only happens with the cloned RenderEngineVtk engine. The original render engine produces correct images (which can be observed by looking at the test output for the MultiMaterialObject.

Version

No response

What operating system are you using?

No response

What installation option are you using?

No response

Relevant log output

No response

@SeanCurtis-TRI SeanCurtis-TRI added type: bug component: geometry perception How geometry appears in color, depth, and label images (via the RenderEngine API) labels Oct 15, 2024
@SeanCurtis-TRI SeanCurtis-TRI self-assigned this Oct 15, 2024
@SeanCurtis-TRI
Copy link
Contributor Author

I just killed the hypothesis that cloning is the cause of the problem. I created a commit that eliminated cloning (by sharing render engines across contexts). The problem persists. So, this is something more fundamental, but finicky enough that it's problems aren't obvious.

@SeanCurtis-TRI
Copy link
Contributor Author

The true resolution is in #22053 -- the description there describes the resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: geometry perception How geometry appears in color, depth, and label images (via the RenderEngine API) type: bug
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant