Lightmass GI Calculation without baking direct lighting
I'm looking for a solution to use static precalculated Lightmass GI together with realtime dynamic shadows of a skylight. Basically i'm trying to recreate the interior of a moving train. I plan to have it moving around slight bends but not make full turns so diffuse interreflection should likely still look convincing enough as the sun will always shine from a similar direction.
I need a dynamic skylight for casting shadows of the windowframing, seats, tables etc into the wagon.
Yet i would also like to use the fidelity of lightmass GI. The lightmass documentation shows images of each bounce step (click here). Basically i would like to just use bounce 1 to X without the direct light baked into the lightmap
Can anyone give me a hint on how to achieve this? I'm also open for workarounds.
asked Feb 18 '16 at 05:17 PM in Rendering
You're essentially asking for Dynamic GI since static lighting cannot handle something like this. When static lighting is built the mesh cannot be moved otherwise the lighting for that object would break and no longer be accurate.
As of right now the only options for Dynamic GI that I'm aware of are:
As far as workarounds, if you're moving the train through your level, getting static lighting to stay on a movable object is going to be very troublesome. The dynamic skylight should provide some lighter shadowing, but it won't provide the bounce that baked GI would. At the moment, if you need GI, I would recommend testing with LPVs, but I wouldn't be surprised if you ran into some performance hiccups since it's still experimental, and dynamic GI can be very expensive to use.
I hope this helps.
answered Feb 18 '16 at 10:52 PM
Tim Hobson ♦♦ STAFF
thanks for your quick answer and sharing your insight. I'm not a 100% convinced though - there's always a way to make things work inside a game engine - it's a matter of finding the best way to achieve the desired results.
Maybe it makes sense to broaden this discussion by explaining more of my concept.
What i'm after, as explained earlier, is to create game with a moving train interior seen from a first person view. The goal is to have it lit as good as the engine can offer. I know there will be compromises but i won't call it a day just yet :) Basically it's a moving platform game, with the train passing through an environment along an freeform, manually created path. A possibility to step outside isn't planned.
I've already gotten the train, which consists of multiple imported static meshes, moving along a straight path. I set the static mesh actors to movable and ticked light as if static. The environment meshes (some trees and placeholder blocks) outside, actually only the ones that are positioned on the side where the sun light is coming from, are set to dynamic shadowing, to cast dynamic shadows into the interior, as the train moves along its straight path. So far this is working nicely! There are two compromises for me to accept with this approach:
Okay, so i've got a nicely lit train interior with dynamic shadows moving along a straight path. So far, so good. Now how do i get the train moving around bends? As mentioned before, my ideal goal is to have it moving along an arbitrary (but manually created) path. I've found three approaches for the movement side of this.
To sum up my findings for the train movement i am somewhat confident to get either the second or the third approach to work. I guess it's a matter of implementation here. Either i get the skeletal, socketed approach to work stutter free, or i manage to create a convincing movement through blueprint.
That brings me to the drawback both those approaches share: the GI lighting :)
Again, i'd love to make use of the super nice indirect lighting / GI i get from using lightmass. The realtime GI solutions are sadly not practicable for me yet so i need to focus on some sort of hack or workaround to use the precalculated lightmaps lightmass provides.
to visualize the prominent issue i currently experience i created this image. sadly, right now, i can't share any of the scene work - so this will have to do for now.
Just as it is supposed to do, lightmass is calculating the direct light, first bounce, second bounce etc, and combines them all together into a final lightmap after completion. Because with both practicable movement approaches the static mesh is set to movable and "light as if static" ticked, it also casts a dynamic shadow as well. And once the train starts to move around a bend (rotation) the dynamic lights shadow will stray away from the starting position, revealing TWO shadows (see image). This is obviously to be avoided!
I find the realtime cascaded shadow of the DIRECT DYNAMIC LIGHT to be visually convincing enough to replace the BAKED IN STATIC LIGHT. To be able to achieve this i need to prevent lightmass from writing the DIRECT LIGHTING into the final lightmap. I understand that Lightmass needs to calculate this direct light to calculate the important Diffuse Interreflection afterwards. Let me illustrate this with the following image.
As visible in the Lightmass documentation there is an example of the first and second bounce light pass SEPARATED from the direct lighting pass though. So atleast for debug/technical presentation purposes there seems to be a way to extract each separate lighting pass during/after lightmass calculation. What i would like to do is exclude the direct light result from the final lightmass bake result.
What i hope to get in return is a cheap but high quality GI solution that works with limited dynamic light movement. The indirect light reflections (GI) will hold up as long as the dynamic light is only moved in a limited space/directionality (like just a few degrees). The visual result would only break if the dynamic light source would point from or move to completely different positions (like from the opposite side).
Is this somewhat understandable? I would absolutely LOVE to learn that this is actually possible. I know that the chances are massive that this not achievable right now. But still, maybe there's a way to hack around, find compromises etc to get closer to what i want to achieve.
Help of ANY KIND is greatly appreciated here. Thanks in advance!
answered Feb 19 '16 at 11:22 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here