MixedReality-GraphicsTools-Unity icon indicating copy to clipboard operation
MixedReality-GraphicsTools-Unity copied to clipboard

MeshOutlines effect is really bad. Is it possible to use the post processing in built-in Render Pipeline or Renderer Feature in URP?

Open Hanning-Liu opened this issue 1 year ago • 3 comments

As the title saying.

Hanning-Liu avatar Apr 13 '24 14:04 Hanning-Liu

Hi @Hanning-Liu, thanks for asking. Many modern mesh outline techniques are done using post processing. Post processing provides great quality outlines but can be prohibitively expensive on most mobile mixed reality devices (like HoloLens 2, Quest 2 & 3, etc.).

If you are targeting a device that is powerful enough to do post processing, I'd recommend exploring a technique like this: https://roystan.net/articles/outline-shader/

Else, you may be limited to mesh outlines. Do you have any scenarios which are particularly bad? I may be able to provide some advice.

Cameron-Micka avatar Apr 15 '24 17:04 Cameron-Micka

Hi @Cameron-Micka, thank you for your reply! I've seen the post you mention. And I'm using a similar package named "OutlineToolkit" downloaded from Asset Store: https://assetstore.unity.com/packages/tools/particles-effects/outline-toolkit-98020 And I also saw a method to implement this effect in URP: https://www.youtube.com/watch?v=LMqio9NsqmM

I'm developing an app on HoloLens2 only run with Holographic Remoting for now, so I think maybe it's ok to use post processing method to calculate the outlines. But it's definitely better if the ideal effect can be implemented using the MRTK MeshOutline package.

The ideal effect should be:

  1. The silhouette lines and the sharp lines inside the silhouette can both be displayed.
  2. The mesh object itself should be transparent.
  3. The front and rear occlusion and the intersection effect of lines should be correct.

The ideal effect looks like the image below: image

The problem with MRTK MeshOutline is that when the material of the gameobject attached with meshoutline script is changed to transparent, the outline will become a solid silhouette rather than lines. And it cannot display the sharp corner lines inside the silhouette. Like the image below showing: image

Hanning-Liu avatar Apr 16 '24 01:04 Hanning-Liu

Oh awesome, yes if you are using Holographic Remoting then rendering is happening on your PC so the use of post processing should be fine!

Thanks for the detail breakdown of where Mesh Outlines don't work and how you would like them changed. I'll keep this issue open to track this work.

Cameron-Micka avatar Apr 17 '24 16:04 Cameron-Micka