Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple renderers in URP
#1
Hi,

Is it possible to have multiple renderer passes in URP specific to separate emitters? I aim aiming to have distinct fluids in a scene with different refraction and blending modes, but I can't seem to find where to select specific emitters in the obi fluid renderer feature. I thought this was possible using the standard pipeline when the renderer script was attached to a camera, apologies if I've missed something obvious.

Cheers!
Reply
#2
(13-02-2021, 04:31 AM)corel Wrote: Hi,

Is it possible to have multiple renderer passes in URP specific to separate emitters? I aim aiming to have distinct fluids in a scene with different refraction and blending modes, but I can't seem to find where to select specific emitters in the obi fluid renderer feature. I thought this was possible using the standard pipeline when the renderer script was attached to a camera, apologies if I've missed something obvious.

Cheers!

Hi there,

From within a URP Renderer feature there's no way to access scene objects, other than use FindObjectsOfType() or filter by layer/tag. The reason for this is that renderer features are project assets, and as such, they're not tied to any scene in particular and they can't hold references to GameObjects. I know this is less than ideal, but it's just how URP works Triste. You can't specify individual renderers as you can in the built-in pipeline, so you're limited to a single fluid material. Note you can still change fluid color using the particle renderer, or individual per-particle colors.

In the built-in pipeline you could just place a script in any object in the scene, get references to objects that should be rendered in a special way and just latch onto the render pipeline to render these objects. This isn't possible in URP as of now. See: https://forum.unity.com/threads/srp-rend...sk.988202/

Quote:It is not possible to get a list of the objects that are going to be rendered, as this would currently be too inefficient. If you are drawing using DrawRenderers, you can use the FilteringSettings.renderingLayerMask
Reply
#3
(13-02-2021, 08:26 PM)josemendez Wrote: Hi there,

From within a URP Renderer feature there's no way to access scene objects, other than use FindObjectsOfType() or filter by layer/tag. The reason for this is that renderer features are project assets, and as such, they're not tied to any scene in particular and they can't hold references to GameObjects. I know this is less than ideal, but it's just how URP works Triste. You can't specify individual renderers as you can in the built-in pipeline, so you're limited to a single fluid material. Note you can still change fluid color using the particle renderer, or individual per-particle colors.

In the built-in pipeline you could just place a script in any object in the scene, get references to objects that should be rendered in a special way and just latch onto the render pipeline to render these objects. This isn't possible in URP as of now. See: https://forum.unity.com/threads/srp-rend...sk.988202/
Thanks for the thoughtful reply, I may need to look into switching back to built in for this project as different fluid transparencies was an important feature.
Reply
#4
(15-02-2021, 09:15 AM)corel Wrote: Thanks for the thoughtful reply, I may need to look into switching back to built in for this project as different fluid transparencies was an important feature.

If all you need is several different transparencies, you could slightly modify the fluid shaders so that particle color alpha drives absorption. That would allow you to have per-particle varying absorption.
Reply
#5
(15-02-2021, 09:27 AM)josemendez Wrote: If all you need is several different transparencies, you could slightly modify the fluid shaders so that particle color alpha drives absorption. That would allow you to have per-particle varying absorption.

I will experiment with this, hopefully it should do the trick even without the other render parameters. Thanks very much!
Reply