Intro
Hi,
I am using the MuJoCo Unity plugin to test MJCF import workflows in Unity. While importing sample MuJoCo models into a fresh Unity 6 Universal 3D / URP project, I noticed that the imported materials initially render magenta until Unity's Render Pipeline Converter is used to upgrade the materials.
My setup
- MuJoCo version: 3.8.1
- Unity plugin source:
unity/package.json from the MuJoCo repository at tag 3.8.1
- Unity version: 6000.3.10f1 LTS
- Unity template: Universal 3D
- Render pipeline: URP / SRP
- OS: Windows
- Architecture: x86_64
- Native MuJoCo package:
mujoco-3.8.1-windows-x86_64.zip
What's happening? What did you expect?
When importing MJCF models into a fresh Unity Universal 3D / URP project, the generated/imported materials render magenta.
This appears to happen because the imported materials are not compatible with the active render pipeline. Running Unity's Render Pipeline Converter with Material Upgrade fixes the rendering, after which the same imported model displays normally.
Actual behavior:
- The MJCF model imports successfully.
- The model appears in the scene.
- The imported materials render magenta in a URP project.
Expected behavior:
- Imported materials should use a shader compatible with the active render pipeline, or the importer/docs should clearly mention that URP users need to run Unity's material converter after import.
Workaround:
- Open
Window > Rendering > Render Pipeline Converter
- Select
Built-in to URP
- Run
Material Upgrade
- The imported materials render correctly afterward.
Steps for reproduction
- Create a new Unity project using the
Universal 3D template.
- Add the MuJoCo Unity package from
unity/package.json.
- Import an MJCF model using
Assets > Import MuJoCo Scene.
- I reproduced this with
model/humanoid/humanoid.xml.
- I also saw the same behavior with
model/balloons/balloons.xml.
- Observe the imported model in the scene.
The model imports successfully, but its materials render magenta until they are upgraded through Unity's Render Pipeline Converter.
Minimal model for reproduction
This reproduces with existing sample models in the MuJoCo repository:
model/humanoid/humanoid.xml
model/balloons/balloons.xml
No custom model is required.
Code required for reproduction
No code is required. This reproduces through the Unity editor import flow:
Assets > Import MuJoCo Scene
- Select
model/humanoid/humanoid.xml
- Observe the imported model in a Universal 3D / URP project
Confirmations
Intro
Hi,
I am using the MuJoCo Unity plugin to test MJCF import workflows in Unity. While importing sample MuJoCo models into a fresh Unity 6 Universal 3D / URP project, I noticed that the imported materials initially render magenta until Unity's Render Pipeline Converter is used to upgrade the materials.
My setup
unity/package.jsonfrom the MuJoCo repository at tag3.8.1mujoco-3.8.1-windows-x86_64.zipWhat's happening? What did you expect?
When importing MJCF models into a fresh Unity Universal 3D / URP project, the generated/imported materials render magenta.
This appears to happen because the imported materials are not compatible with the active render pipeline. Running Unity's Render Pipeline Converter with Material Upgrade fixes the rendering, after which the same imported model displays normally.
Actual behavior:
Expected behavior:
Workaround:
Window > Rendering > Render Pipeline ConverterBuilt-in to URPMaterial UpgradeSteps for reproduction
Universal 3Dtemplate.unity/package.json.Assets > Import MuJoCo Scene.model/humanoid/humanoid.xml.model/balloons/balloons.xml.The model imports successfully, but its materials render magenta until they are upgraded through Unity's Render Pipeline Converter.
Minimal model for reproduction
This reproduces with existing sample models in the MuJoCo repository:
model/humanoid/humanoid.xmlmodel/balloons/balloons.xmlNo custom model is required.
Code required for reproduction
No code is required. This reproduces through the Unity editor import flow:
Assets > Import MuJoCo Scenemodel/humanoid/humanoid.xmlConfirmations