Is any way to force HDRP to use cluster lighting instead of tiles in deferred mode?
Hi, this is not supported currently. Deferred only support fptl.
Could you provide reasons for such request? I suppose you are aiming to avoid the fptl build light list at all? But in this case what you will win can be easily loss by wrong positive of cluster.
Tiled lighting is fine for short-range, 2D or shooter like environment. But my game have a long highways, so 32 lights that avaible for 1 tile is immediately get fully saturated. But according debug view, it’s just 4-8 lights per cluster. And i personally prefer clusters or XZ tiles, instead of XY tiles.
Alright, so correct me if I am wrong but then you problem isn’t being tile or cluster, your problem is the maximum limit of 24 light that we have per tile. As chose of tile vs cluster shouldn’t be based on preference but on performance (and isn’t related to being a 2D shooter, 3D game benefit a lot of tile tested against depth buffer for opaque material).
What we usually do in game for long highways is to use light lod. Far lights are replace by emissive cards to save performance. And thus you usually don’t end with such amount of light in a tile. More than 24 light per tile should be a warning that you can get performance issue.
If you still want to get more than 24 light per tile, then In HDRP right now there is only two way to solve your problem:
- change to forward lit mode and uncheck the enable FPTL in lightloop debug , thus you will be full forward cluster (but performance maybe affected)
- Disable tile mode in light loop debug (i.e dont’ use tiled/cluster lighting at all), but if you have a lot of light, it will be a huge performance overhead), all depends you context.
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@6.5/manual/Frame-Settings.html Lightloop section
Classic.
Multiplayer racing game, 16 cars, 2 light per car(maybe more). Players gathered in one place. Voila - disco of flickering lights in the middle of the screen.
Hi,
Note that it is 24 light per tile, not on screen.
But I can see what kind of issues you have. Good point. Sadly as explain above we can’t go above this limit for now. Changing this limit is not trivial at all. There is work on this but it will come only in 2021 version.
I don’t think Cluster can help here, but you can still try it by moving Lit shader mode to full forward (and disable area light in shaderConfig.cs/hlsl to save performance).
Is there more tight restrictions on xbox/ps? Don’t have a devkit, but guys i working with says that on consoles all screen is covered with small black squares, mainly where light/ground intersects.
Normally, head lights of cars use only one light source. The shape is faked with a light cookie. So you should not wasting to light sources for a car.
For a night time street scenario: The lights are normally faked with billboards of emissive lens flares. This technique is heavily used in GTA V.
In the times of HD4k8k, nex-nex-gen consoles, and 30tflops hardware we still need to use 25 years old fake tricks? No, thanks. This is not a problem of performance, this is a problem of tech that used in HDRP.
It’s just not always about performence. For example caustics are not there yet, yes even after 25 years, so you can display better details and realism by baking your lamps and use cookies. You won’t get these caustics and fine shadows in a real time renderer. RTX is not there yet nor everybody has it. For the lamps in the distance: Why using a real light if a normal player would not see the difference when the light is a small spot, so it is either a billboard or a real light source? If your game has so many resources left just for graphics, you can go the real time way but I think you could spend the resources in other areas better. It’s about the ratio of costs and benefits. Even the manual of Unreal states to use a few light source as possible and faking car head lights. I’m not against another lighting mode for different scenarios, in fact HDRP needs to be improved in many fields but I’m just saying there are other ways to achieve the desired effects.
Faking stuff has developer cost, it takes up my time, so I don’t understand what your “you can fake it” argument is about.
And processing things in real time has cost for the consumer and the fps. So what?
If you already have the machine in order to try many real time lights, than you can also do a render for a light cookie. Setting up billboards is also not so much work. You would already need billboards for other LODs.
And if the studio cannot afford the costs, it maybe should drop some high quality visuals or a map scenario that needs so much light sources? Many developers think, when they drop some spot lights or point lights, they created stunning lighting. But it’s not. Many games actually miss the opportunity of creating better and rich lighting with light cookies.* Just because you could do everything in real time does not mean it’s worth it or better. It depends highly on the free resources and the studio which I don’t know. You can take the recommendations of faking strategies like everyone is using, even AAA or try real time techniques. Your choice.
*Nice guide from Unity: https://blogs.unity3d.com/2019/02/05/create-high-quality-light-fixtures-in-unity/
Nice platitudes. I should be able to choose which parts I want to spend resources on and which parts I want to have processed at real-time.
Unfortunately Unity has made a lot of these decisions for me, most of which I disagree with.
You are free to choose the lighting techniques and the engine that fits the budget and needs.
Yes, to overcome this light issues i do fake stuff, projectors instead of lights, billboards, reduce angle for spot lights, manual light culling. But still… HDRP is pretended to be “modern, hi quality, cinematic, mind blowing graphics, buzz, buzz, etc” but have this basic lighting problem.
I don’t think AAA titles do anything so much different. Any big map with a lot of light sources will use at some extend faking strategies for distance lighting and cull / fade out lights. Why processing things which are so small in the distance or not the main point of interest? Your scenario perfectly would fit for the techniques GTA V is doing (many car lights, many street lamps). Nevertheless it’s not an excuse that Unity needs to be improved regarding the lighting performence and features.
GTA V is a 7 year/2 generation old game.
Sure, but GTA 6 and graphics studies for it are not out yet.
Next generations will use the extra power for one or two RTX effects, mostly real time reflections or better shadows. So I don’t think there will be room for hundreds of light sources soon. They better spend the power in their physics and amount of animated rigs (people walking around). Distance lights will be always low priority.
Again, there are techniques that allow for hundreds of lights, new and old alike.
Than use the engine which allows doing so?