In my game, players are able to place lights wherever they like in the bases they construct. The lights are PointLightComponents.
I've already implemented some very basic performance handling whereby I disable shadow casting if performance starts to drop. However I'd like to revisit this with some better solutions.
2 things I'm considering:
1) Have some manager class that batches lights in close proximity to each other (at a given distance from the player), such that 5 lights close to each other would choose to use only one, and increase it's radius and translation appropriately.
2) Using some kind of fake lighting fx in the materials emissive channel of the building pieces.
I've seen other games such as Ark Survival Evolved that also allow players to add unlimited lights, and they seem to manage the performance cost well.
Just putting this out there in case anyone has other ideas.
Cheers
Edit: Forgetting about shadow casting, is there no way to cache the lighting cast (without having to recompute each frame)?
I've already implemented some very basic performance handling whereby I disable shadow casting if performance starts to drop. However I'd like to revisit this with some better solutions.
2 things I'm considering:
1) Have some manager class that batches lights in close proximity to each other (at a given distance from the player), such that 5 lights close to each other would choose to use only one, and increase it's radius and translation appropriately.
2) Using some kind of fake lighting fx in the materials emissive channel of the building pieces.
I've seen other games such as Ark Survival Evolved that also allow players to add unlimited lights, and they seem to manage the performance cost well.
Just putting this out there in case anyone has other ideas.
Cheers
Edit: Forgetting about shadow casting, is there no way to cache the lighting cast (without having to recompute each frame)?
Comment