Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Currently the lightmap texture that i used are using BC6H DDS, that i exported using Blender DDS addon, not sure if this is ideal we might need RGBM Encoding/Decoding in stride to for HDR Texture |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current Implementation
Currently if we want to use baked lightmap from 3d software (In this case blender) is not quite straight forward and there's several issue due stride doesn't support shading from external lightmap.
Issue 1 The issue that we get is we have to multiply diffuse texture with lightmap manually.



This is not ideal, because it make the diffuse shading darker and the lightmap are incorrectly blended with the diffuse shading. And making the material setup bit cumbersome.
Ideally Lightmap Setup should have it's own texture slot similar to Cel Shading Diffuse Model. In proper setup when we use Lightmap Diffuse Model there's should be additional slot for the Lightmap Texture under Diffuse Model just like the Ramp Function Input in the Cel Shading.
Another requirement is the Intensity slider for the lightmap, as we are baking the lightmap from external software there's a chance that the exposure that we want are missmatched. Example of the intensity slider is similar to the specular map input.
in Summary for the Lightmap Input setup, an additional Lightmap Diffuse Model, when this is selected it enable additonal texture input for Lightmap along with the Intensity Slider for the Lightmap input.
Issue 2 Another issue is double lighting. This is caused by Diffuse texture are multiplied by lightmap and then multiplied again with environment diffuse lighting (skybox/lightprobe).


This is also the cause why the lighting looks darker, and the lightmap display incorrectly.
This is how it should be if we used baked lightmap. Any mesh that used baked lightmap should be excluded from environment light contribution.
Update : Shader and code updated, it should fixed the Issue 1
Still not quite convinced with the blending between the lightmap and realtime light, i'll might tweak the shader again.
But for now it's should give you a better workflow if you want to use lightmap, just place these into your project
LightMapDiffuseModel.zip
Beta Was this translation helpful? Give feedback.
All reactions