Sharp lightmap ?

is that possible to make lightmapps like this in unity?
2411433--164830--Screenshot_2.png
with a lightmap res like this :
2411433--164831--Screenshot_3.png
in ue4 im using stationary lighting.

can i do something like this with a shader and if so how

is there anyone from the unity team that can answer my question?

No, not without writing your own lightmapper (it’s way more work than you think).

UE3 (and presumably UE4) had special handling of the main sunlight shadows. What got baked into the light map color channels was essentially just the ambient lighting (and additional static lights) without any lighting from the main directional light. The shadow cast by the main directional light is stored as a distance field, kind of a blurred version of the shadow, that then uses something akin to alpha test to add in the sunlight color on top of the stored lightmap.

The closest to this in Unity, though not quite the same (and certainly not as fast), would be using the precompiled bounced lighting and a real time hard shadow.

edit: UE3 https://udn.epicgames.com/Three/DistanceFieldShadows.html

UE4 might actually be doing something like my Unity example.

I already use that type of config .thanks.

No you don’t. That’s a baked shadow.

1 Like

yes i know that is a baked lightmap but i posted the baked map to show how can it work. thanks anyway.
By the way amazing game best graphic on mobile i have ever seen.

any idea why when i use baked gi and reatime shadow the shadows are really dark ?
is this the way it work or is it only me ?

(thanks :slight_smile: )

Do you have an image? I’m not sure what it is exactly you are seeing and there could be a number of causes.

What you need is to replace unity’s blending of lightmap with signed distance field technique. This is a non trivial task, but made easier if you are blending your own lightmap in shader.

@Tim-C did some work on SDF in Unity Signed DIstance Field Textures - Community Showcases - Unity Discussions so I imagine somehow you would apply it to the lightmap blending.

baked gi

realtime gi

Hmm are you using Directional or Directional Specular GI?

Can you try switching to non directional and see if that helps?

no i searched a bit and the mixed light doesnt work it will be fixed on 5.4

Mixed doesn’t.

Baked and realtime does. What you’re seeing is something else.

but i use baked gi and realtime shadows this is mixed i think.
and i have tried all the 3 lightmap type dir,spec,no dir.

No, mixed is setting the light to mixed (there is an option called mixed)

but yes i have set it on mixed other ways it doesnt cast shadows

If you want to lighten the “shadow”, adjust the ambient color.