[Hybrid Renderer] Entity Conversion Breaks "Mixed" Meshes?!

Hey everyone,

I'm facing an issue with the Hybrid Renderer and/or the Entity Conversion process. Some meshes seem to render just find with URP itself, but break when going through the entity conversion and get rendered with the Hybrid Renderer. The easiest is to probably just watch what happens:


I also attached the project that causes this weird behavior.

Packages

[spoiler]

{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.ads": "3.4.4",
"com.unity.analytics": "3.4.0",
"com.unity.burst": "1.3.0-preview.7",
"com.unity.collab-proxy": "1.2.16",
"com.unity.device-simulator": "2.1.0-preview",
"com.unity.dots.editor": "0.4.0-preview",
"com.unity.entities": "0.8.0-preview.8",
"com.unity.ide.rider": "2.0.1",
"com.unity.ide.vscode": "1.1.4",
"com.unity.inputsystem": "1.0.0-preview.6",
"com.unity.jobs": "0.2.7-preview.11",
"com.unity.performance.profile-analyzer": "0.6.0-preview.1",
"com.unity.physics": "0.3.0-preview.1",
"com.unity.polybrush": "1.0.1",
"com.unity.probuilder": "4.2.3",
"com.unity.progrids": "3.0.3-preview.5",
"com.unity.render-pipelines.universal": "7.3.1",
"com.unity.rendering.hybrid": "0.4.0-preview.8",
"com.unity.test-framework": "1.1.11",
"com.unity.test-framework.performance": "2.0.7-preview",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.12",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}

[/spoiler]

Scene:
5621398--583057--upload_2020-3-23_12-14-54.png
Game (Running):
5621398--583060--upload_2020-3-23_12-15-20.png
The mesh:
5621398--583063--upload_2020-3-23_12-15-38.png

Anyone has an idea what's going on and/or how to fix it?

Thanks,
Nicolas

5621398--583054--Project.zip (1.52 MB)

The exact same issue happens with HDRP, so it's not a URP issue. (Note: I didn't bother to fix the texture issue :roll_eyes:)
5621899--583102--upload_2020-3-23_14-30-3.png

You have a skinned mesh. You need DOTS animation package to support skinning in DOTS. I don't know much about this package myself. However the package owner said that it requires some extra setup compared to traditional Unity skinning. We definitely should have better documentation to describe the required DOTS packages for each feature.

2 Likes

Hey, as Sebastian mentioned you need to use Dots.Animation to create a working setup for SkinnedMeshRenderers in the current state of things. The Dots.Animation Samples are a good starting point to understand what is required to get things working.

In particular to get SkinnedMeshRenderers to convert properly you need to setup a SkinMesh component on the same GameObject. Furthermore, the material used by the SkinnedMeshRenderer needs to be setup for skinning. This requires a ShaderGraph. The graph used in the samples can be found in Assets/Shaders. Lastly, you need to check "enable GPU instancing" on the material itself. Olivier provides some illustrations on this in his first reply in this thread .

My apologies for the involved setup. We are actively working on improving this.

1 Like

Hi @Jebtor . Does URP mobile support is coming to Dots.Animation anytime soon?

Hybrid URP support needs Unity 2020.1. Seems that you are using Hybrid URP in 2019.3. This is not officially supported and has lots of random issues.

1 Like

Thanks for the responses! I’ll just file it under “weird behavior because it’s not officially supported yet” :slight_smile:

Fwiw on this issue though, I’m was not even trying to get the animation working. It was just confusing that it worked for some skinned meshes (as in they render properly in place without the animations), and some others go crazy and end up with weird rotations.

I’m actively experimenting with the animation package separately with great success (given the early state of the package):
https://github.com/Unity-Technologies/Unity.Animation.Samples/issues/1#issuecomment-581769560

Can’t wait for it all to come together :slight_smile:

I’m looking forward to the GPU instancing for the animations and the HybridRendererV2 with great excitement :slight_smile:

Again, thanks for all the amazing work!