Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Using obi fluid with masked objects
#1
Hello,

In my project, I am using stencil buffering technique to masks some specific objects. Lets say A object is the object that I am masking and B object is my mask.

In Mask Shader (Shader that is used for object B) I am using following stencil buffer settings:

Stencil
     {
         Ref 1
         Comp Always
         Pass Replace
     }


In Mask Subject Shader (Shader that is used for object A) settings are like that:


Stencil {
             Ref 1
             Comp NotEqual
         }
         
             

With these settings when B object overlaps within A objects in pixel-wise those pixels are not being rendered. While it is working as expected within other objects (objects having no stencil settings), obi fluid is not being rendered as expected.

At the attached screenshot A object is the blue one. And the square shape is created with my mask object which is B object.
As you can see red object  (Having standart shader) is being rendered through my mask as expected. However fluid rendering is being cut by A object even there is a mask object at those pixels. 

I am not an expert within shaders and honestly, I am learning stencil buffering within this project. Is it possible to render fluids through masks that are using stencil buffering. I have tried to change DielectricFluid shader with different stencil settings but I couldn't achieved any progress. 

Thanks in advance Sonrisa


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Using obi fluid with masked objects - by umurcg - 24-04-2020, 06:12 PM