Hey guys, recently I started working on Translucency Shader since I didn’t find any free solution that suited my needs - namely something that reproduced light scattering inside the object, not just view-dependent light transmission based on depth. So I wanted to write a shader that approximated the light propagation inside the object’s volume.
I tried to approach the subject in a few different ways. First I wrote a custom raytracer to map the light scattering and produce a volume texture.
It works fine for simple objects but it takes a long time to calculate for complex objects in order to achieve a good result. Still, it was a good starting point.
Then I figured out a way to do it much faster while still retaining most of the quality. It still requires a custom pre-calculation (which unfortunately cannot be done externally on xNormal for example) which I’m trying to improve, but I’m very pleased with the results so far.
Here’s a bit of an extreme example, a cylinder with a directional light at noon. There’s no light falloff, no light hitting at the sides and the top of the cylinder normals aren’t “smoothed”.
Very nice. I’ve wanted to work with translucency shaders, but haven’t had time. I could use one for some of the current stuff I’m doing for my game Aeronautica.
I’m not sure yet. They’re probably not very friendly with mobile devices and what not, but at least they work with both Forward and Deferred cameras.The problem is that these shaders require some setup, they’re not plug-and-play. I’m trying to automate it and make it as simple as possible.
amaze. I was re-watching Jurassic World earlier this week and Jurassic World Spoiler when Chris Prat is first chased by the Indominus Rex, the dino bends down and you can see the flesh stuck on the INSIDE of the teeth, WOW, whoever spent time on that awesome , my jaw drops with some good Sub Surface Scattering.
I’ll work on cleaning the code next week and see how it goes, but no promises. If I feel confident that I can deliver something stable and intuitive I’ll publish it.
No specific project but the lack of subsurface scattering shaders in general is something that has bothered me for some years now.
I’m in the process of rewriting the shader, which due to my limited spare time might take a while, so no time frame. Basically learning the new stuff that came in 5.0 and how to integrate it. I also hit a bit of a brick wall trying to make one of the variants energy-conserving.
I think no current asset uses the same method that I do, so I’ve decided that I’ll release it on the Asset Store when I’m done. Again, I can’t promise on a time frame, but if I feel like this is gonna take longer than it should I’ll release the simpler version used in the first post (the green thing) for a reasonable price.