Vertex Light Limit on Terrain?

Hi, I have a massive terrain (4km). It’s lit in real-time by a day/night cycle, however I’m using vertex point lights to spruce up some points of interest with different colors.

Knowing there’s a limit on how many point lights can affect an individual object, I was wondering if Terrain had this limit too, or if it handled lighting differently.

If there is a limit: Assuming I went ahead with, for examples sake say, 200 vertex lights on the terrain in the end, how would those over the limit be culled? Would the furthest ones not draw at all (acceptable), or would they randomly chose which drew and which didn’t (I think older versions of the Unreal Engine had this problem when you got over 8 lights on their terrain).

Thanks in advance for any information!

bumpity

Halp! Please! :slight_smile:

vertex lights, especially when they fall back to real ones on the hardware, are limited to 7 per object at maximum (or 15 on the last generations)
and it will be the first 7 pushed that the hardware will render, the rest will be ignored.
If that will be the closest 7 depends on your setup (realistic light ranges) and if you correspondingly enable and disable them.

But 200 vertex lights does not sound realistic at all, what kind of planet has 200 suns? :wink:
At least I assume you don’t intend to use the point light types in vertex form as neither the terrain nor average models have enough vertices to give smooth lighting. For point lights and ‘atmospheric lights in the environment’ I would definitely go with short range pixel lights (depending on how many you have active in view, testing against deferred might be a good idea too)

Well, my sunlight is one massive pixel directional light which hits all of the terrain, then I have a second vertex directional light which also hits all of the terrain and functions as a fill light. All other lights in the environment are small, 5-10m radius point lights that are set near little alcoves in the terrain to simulate bounce lighting, and basically put more color into the surroundings.

There probably aren’t more than 8-10 point lights per 100-200 sq. meters of landscape, but the landscape is 4k sq. meters in size total, which gave me my total of somewhere in the hundreds (being a generous estimate).

So what I’m getting from your explanation is that if I cull the number of point lights back to ~6 per ‘area’, the distant ones won’t draw? That’s the real catch, I suppose. I’d love some clarification, but thanks for your reply either way! :slight_smile: