Alternative to "Directional specular" in Unity 5.6

  • GI: Deprecated the directional specular lightmap mode in Unity 5.5, since it will disappear in Unity 5.6 (as part of the lighting modes functionality).

Directional specular lightmap is very important for my game and I dont see alternative for it in Lighting window preview 2

E.G. i have such room without lightmaps:

It can be correctly baked in Unity 5.4 in “Directional specular”

But it is totally broken in new Unity light system and I dont see any way to fix it:

Okey, Directional specular is deprecated, but what should I use instead of it?

Is here anyone who can answer my question?

The alternative is to rely more on reflection probes/SSR and switch some of those lights to stationary (as they are called in the new 5.6 beta) so you can get “real” speculars.

I have the same question as OP.
Reflective probes and SSRR are on expensive side in deferred pipeline. I assume that if OP use baked lighting that means that performance is a bottleneck.
And regarding stationary lights. It’s a cool addition. I’ve been waiting for such functionality for very long time. But again. If performance is a bottleneck than stationary lights wouldn’t help. For example. Forward rendering pipeline gives good performance and we could get more or less good lightmaps with directional specular approach. But now we would need to use stationary lights. But there is a limit for number of pixel lights. And pixel light = more performance cost. Reflection probes works OK in forward rendering if there is one probe per room and rooms are separated objects. And rooms should have simple shape.
So it looks like that we have to find a workaround get specularity back without big performance hit.
I’d love to know official solution.
Because right now it looks like:

  • Oh, we’ve deprecated this feature in new update and we don’t have any alternatives for you. Good luck.
    UPDATE:
    It looks like that I’ve missed the update of Reflection probes for forward rendering path. They work just fine now. But deferred probes are broken :slight_smile:
    Forward rendering, box projections:

    Deferred rendering, box projections:

Nah, sorry, probe blending issue is still there in forward rendering path:

And it’s not better in deferred:

So, broken :(.




In deferred path, change the reflection probes’ “Blend distance” to 0 and then they will be as “accurate” as the forward ones.

Also, if graphics performance is a bottleneck, you shouldn’t be using Directional Specular in the first place, since it was quite expensive.

Means if you want some specularity, you can add a couple of realtime lights without shadows and you will have proper speculars and be on par performance wise.

I agree, it’s more expensive. But wouldn’t it be more expensive to use only reflection probes and realtime lights for specularity? I mean there would be way more than just 1-2 reflection probes/lights for scene like de_dust2 or similar, wouldn’t it?

And regarding adding lights it really depends on level setup. Night street with street lights. There probably would be a bit more than 2 lights.

But anyway, I’ve got your point. Unfortunately reflection probe isn’t a silver bullet.

Directional Specular wasn’t a silver bullet either though, I mean I experimented with it a lot early on and it was messing things too often to be usable (you sort of had to design the lighting around it, since if the scene had multiple strong sources of light, it would mess things up, and that was very restrictive, for me at least).

And the impact of lights, at least in deferred and without shadows, is only for the pixels they actually affect, so if they are out of view, they don’t impact performance at all. And reflection probes, when they are not realtime and not box projected, are pretty cheap.

In short, it’s kind of a bummer that Directional Specular worked for you and that’s it’s not available any more, but it was a deeply flawed method. And I think between adding some realtime lights and using reflection probes, you can get better results with similar performance.

I see your points.
I’ve tried to work with deferred rendering in my current project. It has it’s pros and cons. And at this point in time cons overweight pros for me.

But I dont have “a couple of realtime lights”, I have hundreds and it works great (really, 60 fps) even on very slow notebook with Directional Specular. I have a ship with up to 100 separated rooms (several point lights in each) and you can see all rooms at one time. Look at this screenshot, here is only 10 rooms (~50-150 point lights), but you can zoom out and see whole ship and hundreds of rooms,

2902735--213743--all-rooms.jpg

Also you can zoom in and see only one room on full screen. And I cant switch off the shadows of point lights, because light of neighbour room will affect central room and it will work very slowly (hundreds of point lights, remember?)

2902735--213744--wrong-specular.jpg

And now, in Unity 5.4 it works fast (60 fps) even on low-end devices, I have beautiful shadows and beautiful reflections.

And I cant get it with reflection probes

1 Like

When the full screen is something like this:
2902746--213747--TZvgUVF.png

You can see 18 rooms at one time. Look at this gif and on reflections in the Smeltery while camera is moving:

2902746--213746--KFO6DPxRre.gif

Two lights per pixel (if it’s without shadows), if we’re talking about deferred.

Looks awesome.
BTW. Have you tried new light modes in 5.6 beta? Looks promising. Especially shadowmask approach.

Thanks)

Yeap, it becomes flat. Here is example (light is not cloned from game, but it is similar).

In 5.6 light is not baked (looks good):
2924295--216086--56-dynamic.png

Light is baked:
2924295--216087--56-no-probe.png

Light + Reflection Probes:
2924295--216088--56-with-probe.png

Config:
2924295--216089--56-config.png

Currently in game (with dual lightmaps):
2924295--216090--54-ingame.png

1 Like

Try to use Shadowmask approach. Not Distance Shadowmask. I’ve got quite good results in terms of performance and visual quality with Shadowmask approach. If it fits in your performance budget try to use deferred rendering.
I use forward rendering + reflection probes + emissive materials. One main light + multiple emissive materials as secondary lights + reflection probes. If I remember correctly, realtime shadows are true resource hogs especially for point lights. So having possibility to bake those shadows is a big win.
Anyway good luck and keep up the good work.

P.S. I’ve experimented with fully baked lighting some time ago. The issue with baked light sources is that they aren’t added to reflection probes so get flat image without any specularity. Try to add emissive sphere to separated layer which would be ignored by the camera but not reflection probe. Here is a short video.

https://www.youtube.com/watch?v=82pFNcZDnds

Here is an example. Not the same but you can get some specularity back.

2930595--216705--Screen Shot 2017-01-22 at 17.24.52.jpg

1 Like

The main problem, that in 5.6 version I can get only bad and slow result while 5.4 version gives me cheap and beautiful result.

Shadowmask approach is bad because of “Shadows are handled with realtime shadows”. I have hundreds of point light, its very slow. And it renders the similar picture.

GenaSG, interier in your video looks great. Very good work with light.

1 Like

Hi,

I have similar concerns to @TheShock . We’re creating an atmospheric VR game, lighting, shadows and spec so important the get the atmospheric tone right. We are satisfied with Directional Specular, we have 10 plus lights in our scene and can run at a stable 90fps.

So, is the solution to bake all our lights as Directional then duplicate the lights as non-shadow casters? Aren’t all those lights going to destroy performance especially considering we’re forward rendering?

I wish we had the same option for lightmapping as we do for shadows.

For example, cast shadows and receive shadows.

So we could have “Affects Lightmap” and “Receives Lightmap”

This way, non-static objects in the scene could contribute indirect lighting to bakes.

1 Like

Seconding this request - there’s been plenty of times when I wanted this over the years.