26-07-2021, 08:19 AM
(This post was last modified: 26-07-2021, 08:19 AM by josemendez.)
(25-07-2021, 08:24 PM)davidsedrakyan Wrote: hey, I'm trying to achieve this effect, but I generally need kind of 3D Object with collisions and rigidbodies to use as a single "blob" material, do you have any idea how I can achieve that? Would be perfect If I can use some fluid shader on unity basic sphere, or cube , but I understand that it's not possible, is there any workaround ?
Tried to adapt the fluid shader to arbitrary meshes in the past, but it's not possible.
The reason for this is that "thickness" as seen from the camera's pov is approximated by summing the individual thickness of each particle (which can be calculated using a closed-form formula, since they're ellipsoids). For an arbitrary mesh this wouldn't work. Something along the lines of rendering backfaces, front faces and then subtracting their depth would be required, and even then that would only work for convex shapes.
I don't think is possible to use the fluid shader (or a variant) on arbitrary meshes.