Sharing with you my workaround for Back Scattering on SSS Skin.

Hey guys,

As you know currently the skin shader in Unreal Doesn’t have Back scattering. So this is my method for a workaround, (Please note that i’m relatively still new to Unreal and I’m not a programmer) but coming from an animation/art background this is what I could do so far with the tools as i understood them in order to push our characters further.

I feel some of you guys out there can pitch in with better and more elegant ways of going about this, so please feel free to share any ideas you may have!

  • I was hoping to avoid a rig-like setup in this case and just have a material setup with a proper mask, but i reached a dead end there since i couldn’t find a way to create a clean mask in the material alone that was facing the light direction without resorting to the sphere mask and this setup. I got close with another setup that includes pixelnormals and that worked overall but Pixelnormals created shadow cavities and that wasn’t working with what we are trying to achieve. If only there was a way to remove the cavities, that would’ve been a better setup IMHO.

*Gifs may take a bit to load, sorry.

Thanks.

Very cool trick! Thanks for sharing! :smiley:

Thanks !

Continuing with my little adventure on the side here. So basically the help I seek revolves around the general setup concerning minimizing the amount of elements required to achieve the correct mask for it.

Right now its faking it OK and we can live with it but the sphere mask setup is sort of an extra work that I would like to be avoided if possible, I am hoping someone out there can pitch an idea or two in order to do produce something close to the sphere mask results without the sphere mask.

To illustrate what I mean (including the pixelnormals i was looking into) I attached an image below for whoever is interested.

Yea a clean material solution would be nice :stuck_out_tongue:
You could calculate the sphere position in blueprint like this maybe?

Sorry offset should be in X instead of Z :stuck_out_tongue:

Thanks man, edit (just read again your post was in a hurry earlier): My previous BP setup is attached below, I will try yours, since right now i’m driving the cube through BP and have the sphere parented to that, from what i understand your setup is suggesting to remove the cube parenting and instead parent the sphere directly to the head bone with an offset rotation?

In any case will give it a try soon Thanks!

I’ve come to a dead end regarding doing one with material alone without the outside rig sphere setup, so i think my next objective would be to try to put all this sphere mask setup and rig into one blueprint object which could be dragged and dropped onto a character (just to keep things simplified) + add a second setup in the same BP for a second light source (useful for rim lights for the opposite ear or any other strong fill light that would be used).

Cheers.

Yea removing both the cube and sphere. But that assumes the head has the pivot where you want it :slight_smile:
The “Sphere” in my example is the head in your setup I guess.
I’ll do some more testing too. Keep me posted =)

sure thing, Will check it out.

Just to keep something in mind, the reason for the cube driving the sphere mask was because the head itself is going to be driven by bone objects so it wont have any coordinates so to speak but the head bone will, and that needs to have a socket that would have the sphere mask later attached to it (in this case i used a cube but maybe like you suggest i can bypass the cube thing).

Current limitations I hope we can resolve goes around the fact that the “mask” should also understand when it’s in a shadow area from the sun light source.
So currently looking into ways to see if we can tell unreal that “Surface A” with “material ID A ie. head only if possible” from “light source A” is now in shadow area and use this information to play around with the radius+opacity of the sphere mask in the material editor, hopefully that would fake the effect. I don’t know yet if using a trace or something similar would do this trick. Maybe there a is much better way around it but that’s the first thing i could think of right now.

Suggestions are always welcome.

Will update if anything comes up.

So I decided to come back to this after a while, here it is now finally working with the shadows.

Its not perfect yet but for outdoor scenes or one main light source should do well (I hope to add in a second light source later).

I’m using the above setup plus 2 very low res scene captures on both sides for the ears and feeding that info to the sphere mask to occlude shadow areas, the scene captures are very cheap because they only see one monochromatic cube object with very low resolution while everything else is turned off for them.

At this stage should work for most of my requirements maybe it will also help someone out there as well.

https://gifyu.com/images/BackSctShadowing.gif

Awesome workaround! I still hope Epic will integrate back scattering into their skin shading model as mentioned two years ago…

Hey there, Im trying to implement your workflow … but not quite sure how you setup the capture spheres…

Any help would be greatly appreciated :slight_smile:

Here is my progress so far:

Although I found that Subsurface profile skin shader has an issue with emissive color… it gets whitewashed a bit, for a full red value you need to revert to the old r.sss.checkerboard 1.

Anyway works pretty well, but the shadow capture part :slight_smile: beat me … Thanks anyway, for the help with your post… its still better than nothing!

Man…pretty awesome workaround! Sadly, with paragon being now cancelled and fortnite ■■■■■■■■ money, I am not so sure how much new and fancy rendering features we will see, coming directly from epic :frowning: But let’s see…maybe they have something else in the pipeline :slight_smile:

Hi guys,

I will try to post more details about the shadow workaround once i get the time, but it was relatively a simple approach. I had to move on from all this since while this setup proved to be an interesting concept it is unfortunately not practical for production scenarios and hiring a graphic programmer to create a custom shader with proper back scattering built in is ultimately the better option : ). I’m glad it has helped some of you though!

Exactly what I was thinking when they announced the cancellation. My hope is that they’ll show an amazing in-house cinematic at GDC that pushes the engine forward!

For those who’ve asked regarding the shadow workaround.

1 - Create a scenecapture2d (as many as you want, ideally 3 areas left right ears and front face)

2 - Create a white plane object (for each of these areas) this will be used as a mask for the material.

3 - place white plane(s) onto the parts you have SSS

4 - Make these plane objects hidden to the player and only visible to the scenecaptures (some tutorials maybe online for this).

5 - Make scenecapture 2d very low res even 32 by 32 pixel or lower can sometimes work, remove most flags also, you can optimize this a lot as you only need simple color information and shading.

6 - place the scene captures in the material through lerp to occlude the sphere mask.

7 - parent these objects to head bone of your character etc…

That’t it. Now whenever the planes get shaded or light changes on them so would the captures and they would act like simple greyscale masks to cut off the emissive areas.

Augh, I was overcomplicating myself :)) Thanks alot for the help, ill try to implement, and post my results…

And yeah, Paragon getting axed was sad indeed, but if they have success with Fortnite, it makes sense from a business point of view to keep up the standards of the engine as well, plus having that nice income makes for better R&D,

Hi guys,

So this is my version …

Im not really a programmer + im new to ue4, so I struggled a bit with hiding the planes… in the end i changed the owner to the character/cinematic camera… and set them to invisible to owner. Im pretty sure this is not the best way :))) if you have any suggestions … i’m all ears :stuck_out_tongue:

This is what i did for the planes: blueprintUE | PasteBin For Unreal Engine
Im pretty sure the approach is wrong, but works as long as i have only one CineCamera in the scene:)

Augh … Almost forgot … with 3 scenecapture2d`d i loose about 4-5 fps …ill just stop the ears when the hair is loose

Cheers.

I’m not having any luck with setting this up so far. Were you able to get this working with the ue4 skin shader? Also what does your material collection actually look like?