"Half Lambert" or "Wrap diffuse" shader with default nodes?

Hi guys :slight_smile:

Is there a way to create “half lambert” shader without HLSL coding? Half Lambert - Valve Developer Community
It looks like it possible with UE3 material editor. http://www.moddb.com/games/unreal-tournament-3/tutorials/tf2-shading-in-ut3

Maybe some one trying to do it on ue4?

Hello,

You acutally can’t change the lighting of the Engine. The only way is changing the Engine it self by adding some cpp line and HLSL lines.

You can easily edit the .usf files and modify some current shading model to use wrap diffuse. Adding new shading model is bit more involved task. What kind of material you are trying to do?

Just want to experiment with that type of shader for fake GI.

1 Like

ever figure it out?

Replace SkyAtmosphereLightDirection with whatever your light vector is.

This should only really be used on unshadowed meshes, because it effectively removes the shadow terminator, which will cause jagged aliasing from the shadow depths.

hmm. Any idea how to do it with default lit? I’m willing to do some hlsl / modify then engine

Absolutely no idea, sorry. There is a tutorial on the learning hub about adding a new shading model though, which may have some relevant information. It’s a bit old though…

1 Like

how about this. I have dynamic lighting, but I’m not casting any shadows.

If you use emissive, then the material can behave as if it were dynamically lit (just update the light vector) and it will be able to cast shadows on other objects in the scene, but it can’t receive them. (technically, you could re-implement shadows too, but it will require using a scene capture to get the shadow depth which will be expensive)

Another issue with using emissive lighting is that it is difficult to manage more than maybe 3 light sources at most, so if you need this you will probably have to customize one of the shading models.

Edit: Also you can’t access the reflection scene so if you need reflections, you’re stuck with specifying a static cubemap

I wanted to use this for clouds. Not bad so far, need to figure out some sort of “density” that mimics subsurface.

Could try baking a thickness map

1 Like

I’ve heard something about that. The guys from sea of thieves seem to have baked that data into vertex color