Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  New Obi Rope Chain Renderer URP version 7
#1
Hi,

I'm unable to get any visuals of the chain in New Obi Rope Chain Renderer in URP. Even the sample demo that came with the project only works with Built-In pipeline, it does not work in URP even I don't see any pink shader for the chain, when I upgrade its materials to URP I still don't see any chain, not even a pink error shader. Its just blank. I have tried everything including GPU Instancing. I'm on Android Platform for Quest 2. Using Unity 2023.2.19f.

Step to reproduce

Create a new URP Project (2023.2.19f)
Import OBI version 7
Open Chains Demo from OBI
(upgrade pink shaders to URP)
Reply
#2
(06-08-2024, 08:48 AM)vrtraining Wrote: Hi,

I'm unable to get any visuals of the chain in New Obi Rope Chain Renderer in URP. Even the sample demo that came with the project only works with Built-In pipeline, it does not work in URP even I don't see any pink shader for the chain, when I upgrade its materials to URP I still don't see any chain, not even a pink error shader. Its just blank. I have tried everything including GPU Instancing. I'm on Android Platform for Quest 2. Using Unity 2023.2.19f.

Step to reproduce

Create a new URP Project (2023.2.19f)
Import OBI version 7
Open Chains Demo from OBI
(upgrade pink shaders to URP)

Hi,

Thanks for reporting this! We could reproduce and find the issue. This is due to a bug in Unity: initializing a RenderParams struct using the default constructor results in it having an invalid renderingLayerMask value. This parameter is unused in the built-in pipeline, but used by URP to determine whether an object should be rendered or not. As a result, the built-in pipeline renders instances just fine but URP fails to do so.

The workaround is to explicitly set the value of renderingLayerMask after creating the RenderParams instance. Open up BurstChainRopeRenderSystem.cs and in line 56, add this:

Code:
rp.renderingLayerMask = UnityEngine.Rendering.GraphicsSettings.defaultRenderingLayerMask;

The vicinity of that line should look like this:

Code:
var rp = batch.renderParams;
rp.renderingLayerMask = UnityEngine.Rendering.GraphicsSettings.defaultRenderingLayerMask;
rp.material = batch.material;
rp.worldBounds = m_Solver.bounds;
rp.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
rp.receiveShadows = true;

let me know if I can be of further help,

kind regards
Reply
#3
Thanks for the quick response. The fix you provided did the job. Its working well now
Reply