10-05-2021, 10:52 AM
(This post was last modified: 10-05-2021, 11:07 AM by josemendez.)
(10-05-2021, 10:49 AM)davidsedrakyan Wrote: Thanks a lot, and also one "advice", if you have time, you can make some kind of fake ray marching thing with your shader and techniques me and lots of guys like me will buy that asset, just for having that kind of effect out of the box!
What do you mean by "fake raymarching"? Isn't exactly that what the fluid renderer does already?
Ray marching works by generating a distance field of the fluids surface (or any other surface), then "marching" along a ray and calculating the distance to the closest point on the surface using its distance field. Once you hit the surface, you get its depth along the ray, surface normal, and any other info you need for rendering. This is done at least once per pixel.
Obi's fluid renderer generates the fluids surface by smoothing particles in screen space and generatingĀ a fullscreen normal+depth buffer, which is what the output of ray marching would look like. So this is quite literally "fake raymarching" since the results are similar to ray marching, but arrived at in a much cheaper and faster way since you don't need to have a distance field to begin with.