Theses are multiple technical experimentations I have done : computing metaballs in vertex shader, creating shadow maps from scratch, and playing with these custom-made shadow maps to try some subsurface scattering effect.
Concerning metaballs, the idea was to deform some existing meshes (sphere) in order to approximate a virtual metaball surface. This is done in vertex shader : vertices are moved (by raymarching in the metaball distance field) and normals are recomputed to hide seams between different spheres (these are 'only' deformed meshes, not a new generated mesh using marching cubes or something else).
Rendering shadowmaps was mainly a good exercise and an occasion to play with matrices (creating a custom projection matrix, transforming coordinates from worldspace to lightspace...). Not very useful in UE4 as such. But it was a good challenge to reproduce a simple diffuse shader and shadows from scratch. (This was also the beginning of the idea of creating a real-time C++/opengl engine, but I am speaking about that in another post)
I then tried to use theses shadowmaps to simulate some scattering effect. The concept was to sample the shadow map to estimate the distance light has travelled into the mesh, and to shade accordingly.
Technical experimentations : Metaballs using custom vertex shader on sphere meshes. Custom lighting : no UE4 light is used, shading and shadow maps are manually computed.
These are meshes : vertex shader moves each sphere vertex so it fits the metaball shape, and recomputes vertex normals to hide seams between deformed spheres.
We compute metaball distance field and each vertex raymarchs it to find its position on metaball surface. To average normals, we sample distance field again using Inigo Quilez technique : "https://www.iquilezles.org/www/articles/normalsSDF/normalsSDF.htm"
Once we have the metaball distance field, vertices can raymarch along their normal direction until they are close enough to the metaball virtual surface. We can then sample the distance field again to compute surface normal.
Another technical experimentation : reimplement spotlights in UE4 (including custom diffuse shader and shadow maps rendering). Not very usefull but it's a fun exercise to do ! Also, We will later use these shadowmaps for a custom SSS shader.
Some SSS experimentation using the shadow maps previously computed to estimated the distance that the light has travelled into the mesh.