Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Lights Limitation in DBpro/Direct3D

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 30th Apr 2003 18:29
Hi,

I heard that DBpro is limited to 8 lights due to the limitation of Direct3D.

Does that means I am limited to:

1. Create 8, directional lights, 8 point lights, and 8 spot lights?

or

2. 8 lights in total which comprised of directional, point and spot lights?

Thanks in advance!
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Apr 2003 18:38
Option 2.

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
AtomR
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 30th Apr 2003 18:40
8 lights in total. But i am still a bit skeptic about the truth in that. Surelly that has changed in more recent versions of DX. Hasn't it?? :-s

Take care
AtomR
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 30th Apr 2003 18:56
Isn't it a hardware restriction though?

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
Richard Barnes
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Canada
Posted: 30th Apr 2003 19:52 Edited at: 30th Apr 2003 19:55
It is a hardware restriction as I understand it.

Richard

"Aut viam inveniam aut faciam."
(I'll either find a way or make one.)
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 30th Apr 2003 19:56
Just seems a bit silly if MS impose a software limit on the number of lights any scene could have, LOL would be funny if they did, just think of the law suites <gg>

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Apr 2003 20:49
"8 lights in total. But i am still a bit skeptic about the truth in that. Surelly that has changed in more recent versions of DX. Hasn't it?? :-s"

It is not a DX restriction, it is a hardware restriction. Scenery lighting in games are genereally lightmaps or fakes, only prominant characters and special FX will use lights.

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Apr 2003 23:14
Microsoft have Developed ways around only 8 lights at a time, called point lights ... there's a specific demo for it in the DirectX 9.0 SDK i've had upto 73 lights without a major slowdown but after than it slugs like glue on a wall.

it's still not really a perfect solution though because it is more expensive for older cards, because it utilises TnL for its speed.
the way i see it though you don't really need that many lights per scene as lighting is only really done through the Normals and Textures - all you need to do is use Vector points for lights, and then adjust the normals and texture blending accordingly

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 1st May 2003 06:07
Thanks Raven! Can you explain a little bit more on the last paragraph?

"the way i see it though you don't really need that many lights per scene as lighting is only really done through the Normals and Textures - all you need to do is use Vector points for lights, and then adjust the normals and texture blending accordingly "

Perhaps with some examples will be good.
Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 1st May 2003 06:38 Edited at: 1st May 2003 06:39
Isn't it 7 point/directional/spotlights and one ambient light?

I would use lightmaps if at all possible. They would have to be precalculated though...

There are a couple tools that do this tho, and I know Max can "bake" textures, either pure lightmaps or merged with the texture...

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st May 2003 07:47
well what i mean Bulleye is quite simple
each surface uses a texture right? well this texture is merged with the normal index of the 3 vertex points to form a shaded version based on an ambient light (which is a static light which is always the same place in the world meaning that all shadows one the polygon come from the centre).

well to achieve a form of real-time lightmapping as it were as to have more light possible, what you're to do is get the position & strength of your light source.
after this you basically calculate per surface the normal points based on the lights position (a calculation for this is below on Normals on a Matrix post) ... this will add the main blend for the texture - but what if that isn't enough?
easi we take a Matrix4 (4x4) and we use this to project a light map over a surface of textures... you can precalcuate lightmaps prior to game use and then you just project the texture later to get the effect you want.

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 1st May 2003 11:14
Hmm... thanks a lot! That's definitely informative. But I guess the only way I can do this in DBpro is through the use of vertex and pixel shader, right? Since there is no way I can get the vertex and normal information except this.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 1st May 2003 11:49
i'd suggest you look over how your DarkBasic Pro works... as you can get this information in DB Enhanced and that doesn't have PVS

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 14:37
I suppose therefore that one could fake point lights in DBP? (ie. in DBA code)

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 1st May 2003 14:46
Raven, don't want to sound like a complete idiot but by which do you refer to as DB Enhanced? Just that I'd be interested in looking at the technical issues of DBPro, or is this a DBDN member only option?

Cheers

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
AtomR
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 1st May 2003 20:19
DB enhanced is v1.13 that comes with Darkmatter. It has the fully working dll commands and memblocks and a whole lot of other cool features.

Take care
AtomR
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 1st May 2003 20:51
Ahhh right, thanks for letting me know

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.

Login to post a reply

Server time is: 2026-07-10 19:47:23
Your offset time is: 2026-07-10 19:47:23