Make Material not cast shadows

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

KiCk3R

FNG / Fresh Meat
Mar 20, 2009
390
57
0
Shropshire UK
Far as i am aware, a light casts a shadow. To a static mesh.

I didnt think materials cast shadows. Isnt it just a static mesh casting a shadow onto it?
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,068
743
0
34
liandri.darkbb.com
Yes, but StaticMeshes have materials on them too. In my case I have a StaticMesh which contains glass, but the glass casts shadows as if it was solid.
Now, I could split my StaticMesh in two seperate models, one for the glass and without the glass, but if there was a possibility of making a material not cast a shadow (like a texture with a completely transparent alpha channel or the black parts of a masked texture) I could just apply that to my glass.
It's possible to turn off the collision per material, so I figured it might be possible to turn off that it can cast shadows.
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,068
743
0
34
liandri.darkbb.com
What about a masked wirefence texture? Or not masked but with a completely translucent alpha channel? The translucent parts won't cast shadows. So the material definitely has something to do with it.
 

Rouven

FNG / Fresh Meat
Jun 26, 2009
22
0
0
What about a masked wirefence texture? Or not masked but with a completely translucent alpha channel? The translucent parts won't cast shadows. So the material definitely has something to do with it.
really ? mostly a shadowmap is used in combination with a wirefence or something like that. but maybe I`m completly wrong.
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,068
743
0
34
liandri.darkbb.com
I don't know what a shadow map is, but you can do it via projector, which is the best way to do it because it's the most versatile and you can make it project on moving things (like players and their weapons) too, but if the resolution if the lightmap is high enough you can get pretty cool looking shadows on it too if you let light shine through a wire-fence.
 

Imajus

FNG / Fresh Meat
Jul 6, 2009
12
0
0
NC
depending on how many instances of this window you have it may be easier to split it into two different models, and on the glass part go into the properties and set cast shadows to false. you can still use the same texture for both models.
 

[TW]DrGuppy

Tripwire Interactive Staff
Nov 22, 2005
1,039
36
0
36
Atlanta, Georgia
Does the frame really need to cast shadows? I would just set the whole mesh to not cast shadows. You can use a projector on the ground if you really want to have a nice looking shadow. Or just split the mesh into two parts as mentioned before.