Download

Custom distance field shapes material

Hi, this was a side project for some time. Basically its a sdf shape integration without modifying the UE4 internal files. Its very simple and very wrong but it may be usefull for someone. Made a post about it, still having problems getting shadows to work (mainly because the shadowView in the engine is wrong) and the motion vectors. Hope you find it interesting!

PD: Sorry for the code, I dont know why but is all messed up, even a direct copy still messy. Will leave like that since there is too much code. If anyone knows how to proper copy paste code the help will be much appreciated.

1 Like

It‘s cool!

Only skimmed this, as I’ve done this before, but just a minor suggestion: Your camera clipping trick is very clever but afaik the way most people overcome clipping through the volume is to just invert the faces of the “cage” mesh so that it is inside out. I can’t remember where I originally saw this but I believe it was in one of Ryan Brucks articles.

Regardless I’m glad to see more people putting out more advanced shader content, I can only wait so long for Ryan Brucks to throw us a bone. :stuck_out_tongue:

This looks useful. You can have a neat metaball effect here that allows for more shapes than just spheres. Could you provide the project files for this? It’s a detailed explanation, but it’s hard to see how the material functions are put together and interact with each other.

You know you can use this with Niagara to create fluid simulations right?