[SOLVED]Mind-boggling problem with lights!
Posted: Sat Apr 23, 2011 10:13 pm
Hi Folks,
Ok, here's a tough one thats been boggling my mind for the past 48 hours.
I have two applications. I load the same level with the same lights and they display the lights differently. The code that is loading the level and the lights is exactly the same. Lets look closely. Observe the image below:
We have 2 images, one on left and one on right.
We have 3 lights:
1. The main POINT light in the middle with is yellow.
2. A SPOT light on the right which is white.
3. A second POINT light on the left, showing the bounding box, which is red.
The first two lights have a radius of 100.
Light 3, showing the bounding-box, has a radius of only 2. Which means it should not be touching anything and therefore no red light should be visible. The application on the left show this correct behaviour.
But the application on the right, which has the SAME code, clearly shows the red light. It is as if the light is extending far beyond its radius.
Mind you, all the lights have exactly the same radius and same attenuation in both apps, and no, the radius is NOT changed after the attenuation is set.
Why is this happening?
I have tested this a zillion times over and there is ABSOLUTELY no difference between the lights. I collect all light-data directly from the lightSceneNode and display on screen, and all the data, position, rotation, radius, attenuation in boths apps is exactly the same.
Not only that, if you observe really carefully, the whole lighting is quite different.
What I'm looking for is ANY wild guesses as to why this could be happening? It just doesn't make any sense!
The only logical conclusion I have come to, is that there must be some other totally unrelated parameter, perhaps of the video-driver or some device setting, which is causing this.
If anyone wants me to post the code, please let me know.
Any help would be really really aprpeciated!
Many thanks,
/regards
Ok, here's a tough one thats been boggling my mind for the past 48 hours.
I have two applications. I load the same level with the same lights and they display the lights differently. The code that is loading the level and the lights is exactly the same. Lets look closely. Observe the image below:
We have 2 images, one on left and one on right.
We have 3 lights:
1. The main POINT light in the middle with is yellow.
2. A SPOT light on the right which is white.
3. A second POINT light on the left, showing the bounding box, which is red.
The first two lights have a radius of 100.
Light 3, showing the bounding-box, has a radius of only 2. Which means it should not be touching anything and therefore no red light should be visible. The application on the left show this correct behaviour.
But the application on the right, which has the SAME code, clearly shows the red light. It is as if the light is extending far beyond its radius.
Mind you, all the lights have exactly the same radius and same attenuation in both apps, and no, the radius is NOT changed after the attenuation is set.
Why is this happening?
I have tested this a zillion times over and there is ABSOLUTELY no difference between the lights. I collect all light-data directly from the lightSceneNode and display on screen, and all the data, position, rotation, radius, attenuation in boths apps is exactly the same.
Not only that, if you observe really carefully, the whole lighting is quite different.
What I'm looking for is ANY wild guesses as to why this could be happening? It just doesn't make any sense!
The only logical conclusion I have come to, is that there must be some other totally unrelated parameter, perhaps of the video-driver or some device setting, which is causing this.
If anyone wants me to post the code, please let me know.
Any help would be really really aprpeciated!
Many thanks,
/regards