URP stencil sample not exporting correct

Just built URP Stencil Sample in Unity 2022.2.1f1 using Exporter 2.59.3-pre, URP 14.0.4 in a fresh project and I get this:

Original Post on Discord

by user 103054507105067008

Scene Render Pipeline script seems to be deprecated too

by user 103054507105067008

I talked to the SRP team at Unity about this some months ago… they’ll bring it back, but right now one has to live with that ugly warning

Does it work in earlier Unity versions?

I will try an older version now and feed back if it does - In the current version from above got the central object to appear on a Full Export and Play but in both Unity Scene View and Needle export the stencils don’t work

by user 103054507105067008

If it doesn’t work in the Unity scene please generally don’t assume anything would work in the export :upside_down_face:

It’s certainly an issue with the sample if it doesn’t, and I’ll take a look, you can fix it in Unity and then check if it’s correct in the export (it should)

Yup same on a fresh project with fresh import of the sample in Unity 2022.1.23f1 with Exporter 2.59.3-pre, URP 13.1.8 the URP stencils don’t show in the viewport of Unity. I was assuming that it might have been something that only worked in Three.js/Needle

by user 103054507105067008

I think the sample is broken because the layers don’t come across
image.png
image.png

by user 103054507105067008

On trying to fix, I also get these errors as I assume the meshes are not fully accessible for what URP wants to do from Library cache
Not allowed to access vertices on mesh 'Face1' (isReadable is false; Read/Write must be enabled in import settings)

by user 103054507105067008

Confirmed can fix it by copying the Stencil Portals folder itself to project files and assigning the UniversalRenderPipelineAssetStencil asset to the Quality and Graphics settings area

by user 103054507105067008

On export I am getting this amongst other errors on build and deploy dev to Glitch:

../../../Library/PackageCache/com.needle.engine@2.59.2-pre/package~/engine-components/Renderer.ts(171,14): error TS2420: Class 'Renderer' incorrectly implements interface 'IRenderer'.
Open C:\Unity_Projects\##ProjName##\Needle\URPStencil\Stencil Portals/../../../Library/PackageCache/com.needle.engine@2.59.2-pre/package~/engine-components/Renderer.ts

by user 103054507105067008

by user 103054507105067008

Just tried the stencils sample again in 2022.2, and there everything works fine. Can you try if that fixes your issue above?

Stenciling away
20230128-003005_chrome.mp4

Sorry for bringing this old thread into life, I have a couple of questions.

  1. Which demo is this? I only got one iphone portal demo, which did not work when I export.
  2. I created my own stencil in URP, it works fine on Unity, but does not show right result on the browser. Cant we use our own stencil shader?

by user 373346625025736705

for reference, this is how it looks

by user 373346625025736705


by user 373346625025736705

On left my unity , right on web

by user 373346625025736705

  1. The iphone portal is the successor to that sample. It’s strange that it’s not working for you.

  2. We’re using URPs renderer feature setup for stencils. Are you on URP or on BiRP? Also, which Unity version?