# DX11 DX11 - Lighting - Does it affect the mesh?

This topic is 2023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys! Again!

Lets imagine that I have a sample scene where I have a huge plane and a point light. Now I'm trying to figure out if the light is going to affect the plane.

I would Imagine that in this example I had to use sphere to plane collision, but Imagine that I had a more complicated mesh, like a building, what would I do there?

So the question is, how can I check weather that the point lights is going to affect a complex mesh on the CPU, real time?

##### Share on other sites

I would make 6 light "cameras" (like for cube map reflection) and cull (frustum, occlusion queries...) objects for each. But first normally  you cull from player view each light face.

##### Share on other sites

But just because the point light can see the mesh as a camera, doesn't mean that the light reaches the mesh

##### Share on other sites

Camera has a far clip plane (light range) so it doesn't reach mesh.

Edited by belfegor

##### Share on other sites
Mesh has a bounding sphere, light has a bounding sphere; do an intersection test -> if they intersect then the light effects it.

##### Share on other sites

Mesh has a bounding sphere, light has a bounding sphere; do an intersection test -> if they intersect then the light effects it.

That will not work for Directional Lights. Just wanted to give my two cents on it.

Edited by BornToCode

##### Share on other sites

Mesh has a bounding sphere, light has a bounding sphere; do an intersection test -> if they intersect then the light effects it.

That will not work for Directional Lights. Just wanted to give my two cents on it.

His only concern is just point lights at this moment. But if he would check for directional lights he can just use the camera's generated PVS frustum culling.

1. 1
2. 2
3. 3
Rutin
20
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633655
• Total Posts
3013175
×