Possible for unlit material to receive shadows?

Not sure if its possible or not but is their anyway I can allow my mat to receive shadows using a unlit lighting model, or failing that some way to fake a shadow cast upon it?

Cheers :slight_smile:

To fake a shadow, just blend a darker texture on top of it. But that would require the light to be static, and you would have to paint the shadow precisely.

The point of unlit materials is that they do not participate in lighting. If you want shadows to be cast, then you want the material to participate in lighting. Why do you want it to be unlit? What is the actual effect you want?
Perhaps you want a material that is actually lit, but also has some amount of emissive property?

I see. The challenge with the red building picture is that different surfaces actually have different amount of light depending on angle to the sun, so there is some diffuse lighting there. Meanwhile, the grass doesnā€™t have that effect ā€“ itā€™s as if all the normals of the grass mesh are pointing in the same direction.

Maybe the real solution for you is to model the grass mesh with explicit normals that just point ā€œupā€ everywhere, rather than in the direction of the triangle face. Then the lighting received will be uniform.

Hey, Thanks for the reply. Yeah I did consider blending a darker texture to fake shadow. The effect I am after is roughly thisā€¦

With a lit material using emissive properties could I achieve the ā€˜flatā€™ look as seen in the above image but also keep shadows?

I am trying to create very stylized grass that is very flat but receives shadows.

Cheers

Also this is my current grass.
the left patch is default lit which receives the shadows I want but doesnt achieve the flat look that the right area uses using unlit lighting.

ahh I see, I will experiment with altering the normals of my grass plane and get back to you if I have and success. Thanks jwatte :slight_smile:

I have managed to alter the normals in maya but am really stuck as to making the normal direction recieve light uniformly. Do you know specificly how I should go about doing this?
Thanks again

If you import the mesh as a static mesh, make sure you ā€œimport normalsā€ and donā€™t re-calculate the normals. You should be able to see in the static mesh preview that the grass lights uniformly and changes uniformly as you spin the mesh around.
Also, if you click ā€œnormalā€ view in the static mesh previewer, it should show all the normals pointing up (in the same direction.)

I have been experimenting with different normal directions on my grass plane and importing them back, but cannot see to get the plane to be lit equally on both sides once in UE4. In maya it appears to be uniform but after imported (with import normals selected) it still seems to not work.

See how some grass planes in this image are dark despite facing towards the sun.
Thanks

Have you set the specular color to all-black?
Also, you need to turn off shadow casting for this geometry. Else it may self shadow.

Yeah I had done both, still unable to achieve an unlit effect with shadows. I was able to crank up the emissive color enough to make it appear evenly lit, however this faded the shadows out untill it was barely visible on the grass.

I may have to do as you suggested first and fake the shadows, although this may take a while.

Cheers

Had another crack at this and finally managed to achieve the look I was after.

The method that worked involved making sure all normals were facing up as jwatte suggested, along with turning off Tangent Space Normal and adding the color value 0.22,0.22,1 into the Normal.
Additionally checking the Emissive (Dynamic Area Light) turning off cast shadows and ensuring the grass color is similar to the ground mesh in order to meld the colors, when the grass is viewed from higher angles.

It seems as though the 2 most important settings, besides proper normals on the model itself, are disabling Tangent Space Normal and setting the Normal value to (0.22,0.22,1). Can you explain what these do, exactly? Especially, why those numbers for the Normal?

Also, I canā€™t seem to notice any effect whether toggling ā€˜Emissive (Dynamic Area Light)ā€™ actually does anything. Seems to look the same either way.

Do you think its possible to use this material on a higher poly mesh? Iā€™m trying to make it look cell shaded? I tried using the grass material as described on a building but it looks weird.

reading this conversation made an idea pop in my head - I too use unlit

I am going to try and use decals to work as shadows - I know they work with unlitā€¦ if I could find the right shapes and a way to offset things in a logical wayā€¦ it technically could work