Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Fluid with Sprites.
#2
(16-08-2020, 08:28 PM)FoxButler Wrote: Hello,

I was doing a few preliminary tests with Obi Fluid and sprites, It would appear that fluid transparency doesn't work on sprites or at least it doesn't with my tests.

I placed a sprite 2d and a plane mesh side by side behind(Z) a simple fuild simulation, The mesh with a default diffuse material applied could be seen through the transparant liquid but the sprite is completely rendered over and can't be seen, I'm guessing this is a limitation of the default sprite shader since a standard material works just fine.

My question is if Obi Fluid can be used on 2d Projects which primarily use sprites how can I achieve rendering fluid on top of sprite with transparancy? Would I need a custom shader or am I missing something real obvious?

Thanks for any help in advance Sonrisa .

Sprites are almost always rendered in the transparent rendering queue, instead of the opaque one like the standard material is by default. Moreover, sprites use their own sorting system (custom axis/sort groups) to be rendered relative to each other.

Fluid is always rendered after all opaque objects (before the transparent queue), making use of depth testing. So if you wish to mix sprites with fluid, you will need to use a custom sprite shader.

For more info, see Unity's docs on sprite sorting: https://docs.unity3d.com/Manual/2DSorting.html
Reply


Messages In This Thread
Obi Fluid with Sprites. - by FoxButler - 16-08-2020, 08:28 PM
RE: Obi Fluid with Sprites. - by josemendez - 17-08-2020, 07:51 AM