My situation is the following: I have some wall sconces placed in my level, each of which holds three lit candles. Since these three candles are very close together and I’m using baked lighting, I’ve placed a single stationary light with an intensity of 3 Candela above each sconce. The problem now is that the reflections in the surrounding surfaces (which are very shiny), of course, reveal that there’s only a single light source where there should be three.
Thus, my question is: how would I go about making it look like there are three light sources in the reflections without actually adding three stationary lights (but still stick with stationary lighting for the scene as a whole)?
Screens (please ignore the texture work, it’s a WIP):
What hasn’t worked so far:
I’ve tried adding three dynamic, non-shadow-casting lights and making their attenuation radius so small that their light doesn’t visibly affect the baked lighting too much but then I get no reflections on any surfaces that are outside the radius which is basically all surfaces because the radius is so tiny. I’d either need a “Doesn’t Affect World But Shows up in Reflections” option (LOL) or find a way to make reflections show up outside the attenuation radius to make this method work.
I’ve also tried playing around with the particle material that I’m using for the candle flame but I cannot for the life of me get it to create a reflection that’s nearly strong enough. Even when I bump the emissive value way up, it still only barely shows up in the reflection. However, I’m not very knowledgeable when it comes to particles (I simply bought the ones I’m using off the Marketplace) so it’s possible that I missed something while trying out this method.
I have even tried simply increasing the stationary light’s min roughness without adding any new reflections as a replacement but that simply makes the shiny surfaces look fake. Even the single reflection I have now looks better than having none at all :p.
One thing I have noticed while playing around with this is that light source reflections seem to be neither affected by screen space reflections nor by reflection captures. When I turn the capture brightness down to 0, the light source reflections stay the same, when I turn off SSR, the light source reflections stay the same. So how exactly are those light source reflections created? That seems to be the major question one would have to answer in order to attempt and fake them (I had previously assumed that they were normal capture and/or SSR reflections). Though going off of my experiments, I’m starting suspect that they cannot be properly faked at all.
EDIT: Ah, I believe I’m not at all talking about reflections but specular highlights? Sorry, I’m not that knowledgeable when it comes to lighting so I didn’t really know the difference. But yeah, I can find even less info on specular highlights than on reflections.
After discovering that what I was after were, in fact, specular highlights, not reflections, I’ve finally managed to find a solution. It’s somewhat hacky and may not work well in all circumstances but it works well enough for my current situation. Here’s what you need to do to get “fake” specular highlights:
- Place a simple plane mesh just above/in front of the surface you want the highlights to show up on. Make sure the normals are facing away from the surface/into the room.
- Set this plane to use a lighting channel other than your default lighting channel. (I’ve also set the plane to be moveable but I’m not sure if that makes a difference here.)
- Create a material. Set the lighting mode to Surface Forward Shading and the Blend Mode to additive. Use black for the base colour, an opacity value of 1 and a roughness value that matches the roughness of the underlying surface (I simply used a low-res version of that material’s roughness map). If you want a smooth transition at the edges of the plane, you can use a simple opacity map that has white in the center and a soft black gradient towards the edges, like so:
- Apply the material to the plane.
- Set the lights whose highlights you want to show up but which you do not want to light the scene to use the same lighting channel as the plane. Make sure you set them to be dynamic and non-shadow-casting. Also make sure that their attenuation radius is big enough to reach the plane. (You may also have to adjust the lights’ source radii and soft source radii in order to get acceptable results.)
- Depending on your scene, you may want to either crank up the min-roughness on the stationary/static light that you use for lighting or leave it at default. If you leave it at default, you will get the highlight from this light in addition to the “fake” highlights from the dynamic lights which may be undesirable. However, if your scene is complex, you will probably not be able to place those translucent planes in front of every surface that should get the highlight(s) which might leave some surfaces without any kind of specular highlight. In this case, I would suggest just leaving the min-roughness for the stationary light at default since, on far-away surfaces, it’s usually less noticeable that it’s only a single highlight where there should be three. (It also helps if the static light is in roughly the same location as one of the dynamic lights, that way one of the highlights may be a bit brighter than the others but you still get the correct number of highlights.)
Be advised that the material has a high shader complexity so you should try to keep the plane as small as possible and not use too many of them at once. I also have no experience with using the Surface Forward Shading mode so if there are any additional pitfalls associated with that, I wouldn’t know.
Results:
And in case anyone comes here actually looking for a way to fake light reflections, not specular highlights, I’ve found a sort of hacky way to do that, as well (though I ended up not needing it):
- Create a simple emissive material in UE4.
- Place sphere meshes roughly where your “fake” light sources are in the scene and apply the emissive material to it. (Scale them so they’re roughly the same size as your light sources.)
- Place a sphere reflection capture between the sphere meshes and the surface (I already had this in place but if you don’t, you should add it). You may have to scale the influence radius way down in order to get acceptable results. (This would be especially necessary in a case like mine where the reflection surface, light sources and reflection capture are so close together.)
- Build reflection captures.
- Play around with the emissive brightness, reflection capture influence radius and sphere size and placement until you get acceptable results.
- Disable visibility on the sphere meshes. (Note that you will need to reenable it every time you rebuild reflection captures.)