I'd like to have dynamic but baked lights

I know it sounds weird.
I’m making a videogame with different rooms, everytime you enter the game, every room gets a different positions, is like a procedural house, more or less…
The problem I’m having is that I don’t want to use dynamics lights because of perfomance issues, so I tried to bake that lights. But that is not working because the house is changing everytime, so the shadows and reflections look weird.

I hope you understad what I’d like to do.
In brief: I want to calculate or do something with that lights to calculate what’s exactly they have to do with reflactions and all of that rendering stuff without using dynamics…
Thank you so much!

Can you explain a bit how do you structure the house? Do you have a number of pre-made rooms, and you spawn them with different locations and rotations as streaming levels?

Also, what’s exactly “shadows looking weird”, can you show us a screenshot?

I can’t show any screenshot because of dna contract…
But what i was meaning is:
rooms are instantiated in different places everytime depending on a seed, that seed is generated just once for player.
The problem is that sometimes the light looks different even the room is the same, is like the light is changing dependind on his world location, BUT, the only lights that affect the room are from inside that room

So you basically want bake your light/reflections at runtime? Or rebake the lights and reflections, as soon, as your rooms are rearranged in your house?

Alright, but your rooms are steaming levels, on which you have built lights? Or where / when in light built?

Yeah, i was trying to do that…
But we just discovered the real problem!
We can move all the rooms to different positions with their own baked lights.
BUT we also have dynamic objects that you can use and manipulate, that’s obvious that objects doesn’t have baked lights.
So, to have that dnyamic objects we created like a “cloud of reflections coordinates”, the REAL is that we can’t move that cloud to different positions, is like that cloud remains on his initial position, so… The dnyamic objects get different reflections everytime…
Do you know how could I move that “cloud of reflections data”?

I am not sure, what you mean by that ^.^ What do you use to get reflections working for dynamic objects right now? Do you use Reflection captures and the position of those are stored in your cloud? Or are the positions of your dynamic objects stored there and then something else uses those coords to calculate the proper reflections?
What happens, if you update those coordinates according to the movement of your dynamic objects?

Maybe you should wait for UE5 and Lumen, i guess, this would solve your general lighting and reflection problem for all moving objects, your performance however might take a heavy hit :slight_smile:

Theoretically this could work if you sub-section and bake the rooms as separate levels, then load them in.

The shadows are baked to whatever you set the lights to be, so if you work off a persistent level with consistent lights - without a directional - then whatever you baked is whatever you get, and rotating the room (because of no directional) won’t look off.

If you are using a directional, then you need to bake and load one of 4 different versions of the room with the most approximate light position possible.

Though, it’s kind of a moot point if you set the directional light up properly, to only cast shadows on select items, you won’t really get a performance hit.

I’d also suggest you disable cascade entierly and go with distance field only.
That’s very light weight and still somewhat dynamic even if it increases memory footprint.

If the purpose is to light up a window “God ray” effect without making the effect completely yourself (which you probably should), then DFAO is probably much better. You would only need to set the window mesh and wall DFAO…

I also have no idea what you are talking about. But it sounds like it’s a bad system/idea for what you need.
A cube map per room is probably better. Can also be real time.

Thats not how it works. But, you can selectively load and unload dynamic lights, and limit what casts shadows.