|
-
Apr 25th, 2005, 10:17 PM
#1
Thread Starter
PowerPoster
Global, Dynamic Lighting System
Currently I have a class for each type of a light, a static class used for global communication with no externs and no instantiantions. I can manage a dynamic list of lights stored within d3d's SetLight parameters and enable them as needed by objects, the world, or just always...given the max
From here since each light will have its own unique id in a master class I can relay that ID to building class' for example which need to light themselves.
So a few questions:
- Does D3D have a max when it comes to SetLight?
I know it does with LightEnable, the max can be found in the caps.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Apr 25th, 2005, 10:24 PM
#2
Re: Global, Dynamic Lighting System
Hardware based lighting I know goes upto 8 lights on many cards. Software lighting is unlimited.
-
Apr 26th, 2005, 03:15 AM
#3
Hyperactive Member
Re: Global, Dynamic Lighting System
How do games have dynamic lighting with >8 lights affecting a model in realtime?
-
Apr 26th, 2005, 10:35 AM
#4
Thread Starter
PowerPoster
Re: Global, Dynamic Lighting System
8 lights Jacob????
Well D3DCAPS9 shows MaxActiveLights on my system to be 0....
Which makes no sense since I am using several programs as tutorials to aid my light quest, and they all work fine...with lots of lights.
Now, I have found out one thing:
IDirect3DDevice9->SetLight(...) can be used for ANY number of lights, since everytime you call SetLight the appropriate ammount of memory is allocated on the system. So you can SetLight until you run out of memory.
IDirect3DDevice9->LightEnabled(...) can be only used for a certain number of lights, now this max is suppose to be in the CAPS but for me it shows a 0, which makes NO SENSE. Even in apps where multiple lights are at work the caps show MaxActiveLights = 0x00000000;
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Apr 26th, 2005, 11:21 AM
#5
Thread Starter
PowerPoster
Re: Global, Dynamic Lighting System
Any place where I have set ambient, diffuse, specular...etc.
My material, my lights.
It is always 1.0f all the way so I get white light.
Yet anything my lights touch turn RED....
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
May 1st, 2005, 08:53 PM
#6
Good Ol' Platypus
Re: Global, Dynamic Lighting System
Games usually have premultiplied lights, such as Half-Life and that. Their dynamic lighting really consists of premultiplied lightmaps being superimposed at certain degrees of translucency. Where you'll see the "dynamic lighting" is on the gun you're holding in your hands, which may have a green glow under it with a yellow one above.
And remember the (stupid) principles of lights on computers: anything that is 0 will be black no matter what. It's really a LDR problem, though, which is a whole 'nother ballgame.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|