Skip to content

Fix Unity importer materials for URP - #3499

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/unity-urp-import-materials
Open

Fix Unity importer materials for URP#3499
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/unity-urp-import-materials

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #3273.

Summary

The Unity asset importer currently creates opaque MJCF materials with Unity's Built-in Standard shader and clones a Built-in transparent material template. In projects using the Universal Render Pipeline, those materials render magenta.

This change:

  • detects when URP is the active render pipeline and uses Universal Render Pipeline/Lit;
  • configures transparent URP materials with alpha blending;
  • maps MJCF color and smoothness properties to the corresponding URP material properties;
  • uses a URP-compatible fallback material for geoms without an explicit material;
  • preserves the existing Built-in Render Pipeline behavior.

Validation

  • Final diff: 1 file, +60/-21 lines, one commit, with no unrelated changes.
  • Branch is based on current upstream main at f7da3d295b828478e0171967a7fa3fe6bb2ec922.
  • Existing Unity material-import tests exercise the Built-in path. Unity/URP tests were not run locally in this environment, so upstream CI and maintainer validation are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unity importer creates URP-incompatible materials that render magenta

1 participant