- Home /
Shadow Strength Of A Mesh
Hello. I have a hanging lamp model that looks like the image below and I've placed a Point Light where the bulb is but i want to decrease the Shadow Strength of the light because the shadows of the metal parts are too dark and it looks unrealistic. If i do decrease it, all the shadows from that light are being decreased making the light pass through walls. Is there any way i can just decrease the shadow strength of a specific object/mesh ? Or any alter ways i can achieve that ? 
Answer by MaT227 · Sep 25, 2015 at 09:20 AM
If you want to decrease the shadow strength of a specific object this needs to be handled in the material and so in the shader.
Depending on the shader you are using you need to create a version which allows you to control the shadow strength.
Edit: As you suggested, using light cookies is a good solution for your case because you can transfer the shadows of the cage in the cookie texture and use the classic shadow strength for other objects. Just don't forget to deactivated shadows for your cage mesh.
I'm using the Standard Shader that Unity 5 has. I took a look at the code and it's huge, not sure I know what to do exactly. I tried using the Transparent option ins$$anonymous$$d of Opaque and decrease the A in the Color window but it just hides some pixels of the shadow.
If you are not able to modify the Unity Standard shader code, I suggest you to take a look at Shader Forge. If you want to dig deep into Unity shaders, take a look at UnityStandardCore.cginc and fragment functions. If you want to know more about surface shader take a look at UnityPBSLighting.cginc.
I'm surprised that no one else has asked about mesh shadow strength or something similar. I checked the Shader Forge but it's not what I'm looking for. It looks too complex and too expensive. All i want to do is reduce the shadow opacity of specific meshes without reducing the light's shadow strength. Could I maybe achieve this with point light cookies ?
This is quite easy. You need to draw the shadows as a textures and applies it to the light as a cookie. You'll have to convert the texture to cookie. The good look of the texture depends on you but you can look at the documentation if you want to know more about light cookies.
Okay, but what about cubemaps. Wouldn't it be easier to just create a cubemap only for the shadows ?
Cubemaps at not used for this purpose. Even if the texture cookie can be mapped on a sphere depending on your import setting this cannot be considered as a cubemap.
Oh boy. How am i supposed to create a 3D texture of the shadows ?
Answer by Xx_Link_xX · Sep 13, 2017 at 12:40 PM
I've discovered an easy way to do this with the default material. Just activate illumination and add the albedo map as the color map. Make the intensity something small (like 0.2) and voila!
I know this is an extremely old question, but the answer needs to be known to anyone else looking. =]
Answer by OusedGames · Sep 13, 2017 at 01:15 PM
Hello buddy, that's really simple!!
Just go on your Point Light, an there's an option, shadow strength Jaja
Hope it works
Your answer
Follow this Question
Related Questions
Keep Shadows From Being Lit Up 1 Answer
How to use a sprite/mesh shader to light up behind it? 1 Answer
URP shadow problem 0 Answers
Directional Light Shadows with Cookies 1 Answer
No shadows with splitscreen 0 Answers