Jump to content

  • Log In with Google      Sign In   
  • Create Account


DX11 - Lighting - Does it affect the mesh?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 MiniMigi   Crossbones+   -  Reputation: 1430

Like
0Likes
Like

Posted 26 May 2013 - 05:13 AM

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?



Sponsor:

#2 belfegor   Crossbones+   -  Reputation: 2358

Like
0Likes
Like

Posted 26 May 2013 - 05:43 AM

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.



#3 MiniMigi   Crossbones+   -  Reputation: 1430

Like
0Likes
Like

Posted 26 May 2013 - 06:15 AM

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



#4 belfegor   Crossbones+   -  Reputation: 2358

Like
0Likes
Like

Posted 26 May 2013 - 06:36 AM

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


Edited by belfegor, 26 May 2013 - 06:36 AM.


#5 phantom   Moderators   -  Reputation: 6785

Like
3Likes
Like

Posted 26 May 2013 - 07:23 AM

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

#6 BornToCode   Members   -  Reputation: 900

Like
0Likes
Like

Posted 26 May 2013 - 06:45 PM

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, 26 May 2013 - 06:50 PM.


#7 BrentChua   Crossbones+   -  Reputation: 1066

Like
0Likes
Like

Posted 27 May 2013 - 12:31 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS