Category: SDK
Reproducibility: Always - Its complicated
Summary: Masked materials do not create precomputed shadows for static lighting.
Description: Essentially for well over a year the SDK has not been able to create precomputed shadows for light maps when you bake static lighting. This means very big objects that cast interesting and large shadows (such as foliage/tree leaves, gratings, fences) that would be critical for level design cannot be properly utilized. For a number of Mappers, this is basically a show stopper as Lighting makes or breaks maps. This was reported a couple of times to devs but it has yet to be addressed.
Current Shadows on Zed Landing: https://i.imgur.com/1GJLmwd.png
Public SDK Rebuild of Shadows: https://i.imgur.com/fk8MY1f.png
There is a fix for this in-house, as Zed Landing which bakes shadows from lots of foliage was rebaked for the update. We would like this fixed for beta2 of the current update please.
Please download the following testmaps:
Here are some notes for map 1:
Author Notes:
All Materials are Blend_Masked and 2sided.
All map package textures (wire fence texture most importantly) were imported using default import settings.
All Materials have "Opacity Mask" plugged into main Diffuse "Texture Sample" node alpha channel unless told otherwise noted on signs.
Reference Notes:
OrignalTexture= Original Diffuse texture from TWI Package.
Reimported= Diffuse texture was reimported into map's package.
Basic Mat= Basic Material with diffuse texture plugged into both Diffuse and Mask nodes.
Complex MIC= MIC using a custom made base material with complex node structure.
Here are some quick reference for the notes in the map 2:
This was an additional test map from Max: https://drive.google.com/open?id=15T...NzSr1KXqOQgXm9
According the Max, The bug is inconsistent, any current standard textures that use an Alpha channel for an Opacity Mask flat out do not work with the current materials. However this is highly inconsistent if you check the above provided maps; some materials work, some don't it's mostly a total gamble in some cases.
A partial workaround is to export the texture, edit it Photoshop/GIMP to save the Alpha channel into a separate Texture or reexport the texture with a new Alpha channel and reapply it to a Basic Material (that only contains 1 Texture sample to Diffuse/Opacity Mask). TWI's own Materials DO NOT WORK.
However through my own testing these are the results can also be inconsistent:
The issue continues to get more complex with more complex materials.
From further investigation of my own it looks like there might be some broken interaction when a Diffuse goes through modifications to the original Texture (ie through WPO, brightness adjustmens, multiplies/adds, etc). If it is required for diffuse as Mask - a separate texture sample of the original Diffuse needs to be used for the cutoff.
For the below I used the exact same Parent Material the Zed Landing Foliage/Tree Leaves used I just split off a separate input for the Opacity Mask. See here: https://i.imgur.com/W4tLPvG.png
One final thing to note is that not all TWI materials suffer from the bug as the following material seems to cast shadows fine: https://i.imgur.com/t226pDz.png
Online/Offline: NA
Reproducibility: Always - Its complicated
Summary: Masked materials do not create precomputed shadows for static lighting.
Description: Essentially for well over a year the SDK has not been able to create precomputed shadows for light maps when you bake static lighting. This means very big objects that cast interesting and large shadows (such as foliage/tree leaves, gratings, fences) that would be critical for level design cannot be properly utilized. For a number of Mappers, this is basically a show stopper as Lighting makes or breaks maps. This was reported a couple of times to devs but it has yet to be addressed.
Current Shadows on Zed Landing: https://i.imgur.com/1GJLmwd.png
Public SDK Rebuild of Shadows: https://i.imgur.com/fk8MY1f.png
There is a fix for this in-house, as Zed Landing which bakes shadows from lots of foliage was rebaked for the update. We would like this fixed for beta2 of the current update please.
Please download the following testmaps:
- https://drive.google.com/file/d/14Xg...KA3RoTNSm/view
- https://drive.google.com/file/d/10qR...y_znAQAV4/view
Here are some notes for map 1:
Spoiler!
Author Notes:
All Materials are Blend_Masked and 2sided.
All map package textures (wire fence texture most importantly) were imported using default import settings.
All Materials have "Opacity Mask" plugged into main Diffuse "Texture Sample" node alpha channel unless told otherwise noted on signs.
Reference Notes:
OrignalTexture= Original Diffuse texture from TWI Package.
Reimported= Diffuse texture was reimported into map's package.
Basic Mat= Basic Material with diffuse texture plugged into both Diffuse and Mask nodes.
Complex MIC= MIC using a custom made base material with complex node structure.
Here are some quick reference for the notes in the map 2:
Spoiler!
- SingleTextureSample= Single diffuse with alpha channel.
- DualTextureSample= Diffuse + Mask texture
- Complex= Complex Material (I.e lots of nodes.)
- Complex_Steven= Complex Material by Steven.
- 2sided= 2sided Material (All materials are 2sided, but 2sided code is mentioned specifically on Complex Materials for remembering and to take in account as a possible variable in bug research.)
- FIXSEARCH= (INVALID, IGNORE, I DON'T REMEMBER)
- TWIORIGINALTEXTURE= Used Vanilla texture from Vanilla package.
- Orignal= Used Vanilla texture from Vanilla package.
- PhotoshopSaved= Vanilla Texture opened in PS then saved as new TGA file. -ExportedReimported= Literally exported Vanilla texture then simply reimported it. -WireFence= (IGNORE)
This was an additional test map from Max: https://drive.google.com/open?id=15T...NzSr1KXqOQgXm9
According the Max, The bug is inconsistent, any current standard textures that use an Alpha channel for an Opacity Mask flat out do not work with the current materials. However this is highly inconsistent if you check the above provided maps; some materials work, some don't it's mostly a total gamble in some cases.
A partial workaround is to export the texture, edit it Photoshop/GIMP to save the Alpha channel into a separate Texture or reexport the texture with a new Alpha channel and reapply it to a Basic Material (that only contains 1 Texture sample to Diffuse/Opacity Mask). TWI's own Materials DO NOT WORK.
However through my own testing these are the results can also be inconsistent:
- Saving a separate Alpha Texture results in non-cutout shadow: https://i.imgur.com/sPyJC9N.png
- Using the Alpha Channel of a Reimported Diffuse results in correct shadows: https://i.imgur.com/Ry10TWj.png
The issue continues to get more complex with more complex materials.
From further investigation of my own it looks like there might be some broken interaction when a Diffuse goes through modifications to the original Texture (ie through WPO, brightness adjustmens, multiplies/adds, etc). If it is required for diffuse as Mask - a separate texture sample of the original Diffuse needs to be used for the cutoff.
For the below I used the exact same Parent Material the Zed Landing Foliage/Tree Leaves used I just split off a separate input for the Opacity Mask. See here: https://i.imgur.com/W4tLPvG.png
One final thing to note is that not all TWI materials suffer from the bug as the following material seems to cast shadows fine: https://i.imgur.com/t226pDz.png
Online/Offline: NA
Last edited: