Author Topic: light oclusion  (Read 4654 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
light oclusion
« on: June 30, 2013 »
hey guys,

im not quite sure the proper term for this so ill describe the problem ive ran into..

ive set an indoor scene up using a series of quad tiles for the floor roof and 4 walls then i put a supporting piller right in the middle of the room.

now i have a light source in one corner that produces specular and diffuse on all the textures in the scene..

which all look really nice. now if i move the camera behind the support piller so the piller obscures the light and look up or down the specular shines through the piller. not really caring if its hit an object or not which is obvious really as i havent provided any info ie if object is hit then stop..

thats the part im having a hard time with.. would creating shadow maps and using these too test for light fragments work. or is there a comonly used technique ive yet too find. i can provide an example if needed. cheers
« Last Edit: June 30, 2013 by ninogenio »
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: light oclusion
« Reply #1 on: June 30, 2013 »
in the interest of clarity as i don't think i explained myself very good i have attached an example,

use the arrow keys too strafe around and mouse too rotate.. if you move the cam too a corner that obscures the light source then look in the direction the light source would be you guys will see my problem.

could i also ask everyone that test too report that everything works ok.. im at a stage of my engine that i really need too make sure everything i have done is compatible.
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: light oclusion
« Reply #2 on: June 30, 2013 »
It runs fine here ninogenio :) Win7 x64 GTX-580

Haven't had long enough to view the problem you mention. I'll try and have another look tonight. As for shadow maps or another solution, I'm really not sure. I haven't really played much with shadows as yet.
raizor

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: light oclusion
« Reply #3 on: June 30, 2013 »
cheers mate! k+,

a big problem is trying too find correct information based on my limited knowledge, im not 100% but i think it might be light volumes i need too look into, im not sure how too implement this with bumpmapping though.

im currently working on shadow mapping but its a bit harder than i expected, i think im close though. im using fbo's and doing it in three shader passes.
Challenge Trophies Won:

Offline mazemaker

  • C= 64
  • **
  • Posts: 28
  • Karma: 11
    • View Profile
Re: light oclusio
« Reply #4 on: June 30, 2013 »
Shadow maps should be okay, and you will get shadow softening easily, but you might want to pick your shadow mapping method carefully depending on how your lights will be used.

For omnidirectional lights you could check out shadow cubemaps (6 passes), or the newer tetrahedron shadowmapping (4 passes). The former is typically simpler to implement than the latter.



With your simple test seen grid you could trace a ray using Wolfen3D method to Light in 2-D.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: light oclusion
« Reply #5 on: July 01, 2013 »
great points mazemaker! k+

i quickly realized that cube maps would probably be the best route for omni lights. i have got a simple single direction shadow map going, now im looking at gettin cubemaps integrated.

then i guess occluding light should be relatively simple.

i must confess i have never heard of the wolfen3d methode or tetrahedron.. ill have a look into these.

thanks very much.
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: light oclusion
« Reply #6 on: July 07, 2013 »
well after lots of work,

this is now pretty much done, it works quite well. although there is a few minor issues that i will have too work through. as usual if anyone has any problems running this or any suggestions please feel free...

cheers.
Challenge Trophies Won: