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.

Author
Message
M00NSHiNE
22
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 26th Oct 2003 04:39
Could someone please tell me what the limit is on the number of lights at one time is in DBPro please? In DBC it was 7 I think, what about Pro?

Cheers.

ZEDWARE website coming soon... //END TRANSMISSION//
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 06:50
8 ... alot of peopel forget the ambient light is light(0) which is also useable and editable.

8 is the number of Hardware Lights useable, and if you ever have all 8 going it'd slow the program down quite a bit even on the lastest cards.


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 26th Oct 2003 10:46
It hasn't changed from DBC. This is a hardware limitation of graphics cards, which only allow 8 lights in most cases.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 11:40
the restriction is actually DirectX, which only alows 8 lights... and the light(0) is not the ambient light... well not sort of... the light is at 0,0,0... if you place an object away from the light... the back side is shaded where the front side is lit up...

a feature i personnally dont like

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Oct 2003 12:51
Nah, Rob was right about the number of light - DirectX supports as many lights as the hardware does, and DBC/DBPro supports as many as DirectX does
Juso
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 26th Oct 2003 14:01
What about lights as in Midnight Club II, can you make them with DBPro's lights?

adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 26th Oct 2003 14:34
I've been playing Unreal Tournament at the office lately, and I've noticed that with each pulse gun shot, there's a nice green light which affects nearby surfaces. Now, if every player starts shooting that gun, there can't possibly be 3452 hardware lights going on. I figure it must be more to do with clever lightmapping.

While lightmapping in this way maybe more difficult to implement, it overcomes the hardware light limitation, through software.

I have no idea how you do it, btw.

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 15:04 Edited at: 26th Oct 2003 15:05
lighting in game is NOT hardware lighting... most games only use a single light and thats the Zero Light or Ambient Light.

You have many ways to create light

Lightmap, Vertex, Pixel, Sprite, Volumetric, Stencil, Buffer Overlay

each have thier advantage and disadvantages, most of them are because they're SLOW.
Best is combining the different types for what you particularly need within that scene...
I mean all lights do is react with the textures to brighten or dim them from standard brightness. Really should be accenting them for real lighting effects but hell that would be more expensive too.

Lightmap - you use a premade greyscale image and then blend it with the texture of a face to achieve a light effect.
Vertex - you alter the vertex colour of the vertex point and the engine should blend this automatically with your texture
Pixel - same as vertex only using shaders on the pixel level
Sprite - its how it sounds you uses a sprite light image, as it overlaps ghosted it achieves a similar effect to lightmapping
Volumetric - this is an object that represents a light within the scene, you can either use the plain coloured alpha map
... with this you can also use a texture and it become a 3D sprite
... or you can use the image's alpha as a selection area, you then create a backfacing version and take both the for face and back face versions to calculate depth - then use that depth with the lights colour and blend from origin to targer raster
Stencil - not possible in DBP, but with this you basically project a stencil and use the stencil buffer to fill in the colour - works similar to volumetric only it only affects the intersected surfaces, better for flashlights.
BackBuffer - using a copy of the scenes backbuffer and alpha cuts of the target and origins you then put in a 2D beam trace effectively a clever 2D light variation of volumetric ... cna look odd at times though

[edit-] noticed i'd forgotten projected, but ho hum


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 26th Oct 2003 16:29
The Midnight Club II lighting looks like per-pixel lighting to me. DBP doesn't have a "one-command" way of doing this, I'm pretty sure you could do it via an FX shader though.

Re Unreal Tournament:

Quote: "Now, if every player starts shooting that gun, there can't possibly be 3452 hardware lights going on. I figure it must be more to do with clever lightmapping."


I suspect it is just vertex colouring. ie. All verticies near the pulse are coloured green to give the impression of light. Could be lightmapping though.

Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 18:40
so IanM or Rob K... how can you find out how many you can use... cuz the DB documnetation says only 7 user-defined lights can be created?

ive ran some tests and running 5 lights slowed even MY computer down to 2 FPS on a simple 30 poly level... so im not going to use that many... i am just curious

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 18:58 Edited at: 26th Oct 2003 18:58
just lightmapping in UT Rob... well technically actually its a decal shader, but if you know anything about Quake3's shaders then you understand the fundimentals pretty well

as for Midnight Club2, personally I'd say the headlights are Vertex Lighting - the lamposts are just sprites and the reflection is standard cubemapping, might be RT Cubemapping but i doubt it.

[edit-] if you wanna know why i think that its vertex look at the diagonal outside edge of the light


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 19:01
how many you can use Genesis is dependant on your graphics hardware... you have a 9800pro you should be able to copy with all 8 lights with upto 300,000 untextured polygons per-scene

even my pathetic FX5200 is capable of all 8 in a scene with a nice 160,000 polygon dragon
odd for you eh


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 19:01
if you use vertex lighting... like to show lighting from a pulse-weapon... how would it effect a completely FLAT surface?

im assuming vertex will light the vertices... guessing here... and a flat rectangular object has only 4 vertices... (like i said... just guessing at this lighting thing)

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 19:10
well it depends which lights your refering to on the pulse weapon.
but generally UT2K3 uses something called 'Shaders' these are not the same as Pixel/Vertex Shaders that you hear in graphics terms, these are basically texture blending effects using premade textures/lightmaps and such.

So the light from the Pulse Rifle would just be a premade lightmap that flickers based on if your firing or not, or might even be tied into the muzzle flash.

This is a totally different thing to the Vertex Lighting show in Midnight Club2 above.


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 19:31
cant really describe what im trying to ask... guess i will have to play around with it a little bit more... and hopefully dont rip the rest of my hair out

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2003 20:01
why don't you get a picture from a game that you've seen it in and ask a way to achieve it...
i'm pretty good with figuring stuff like that out.


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 20:08
the UT2K3 is what i was thinking about... when you shoot the pulse gun it shoots out a glowing green ball... and it shines on the surrouning environment as green... but it does this for EVERY one shot... like 'adr' stated above

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 26th Oct 2003 21:50
create a green light and keep it hidden..
then play with show/hide light and light range and position light at the moment of shooting
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 26th Oct 2003 23:38
Quote: "Now, if every player starts shooting that gun, there can't possibly be 3452 hardware lights going on."

like 'adr' said above, this effect can NOT be actual hardware lights, but some kind of shader or other trick effect.

==Main Computer==
Athlon XP 3000+, 1024mb, Radeon 9800 Pro 128mb 8xAGP, XP Pro
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Oct 2003 00:33
yeah its a lightmap decal... plus a lightpoint for the vertex lighting - would be my guess without tracking down the DvD and installing the bloody thing again.


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
M00NSHiNE
22
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 27th Oct 2003 01:39
So how would someone go about lighting up the immediate area with muzzle flash in DBPro without using the 7 lights?

ZEDWARE website coming soon... //END TRANSMISSION//
Juso
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 27th Oct 2003 16:39
Here is one more shot of Midnight Club2:
Headlights light street ground, wall on left and even lower part of lampost. How this can be done? Lights in tunnel affect on street ground too.

BTW, pedestrians are never lighted at all.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Oct 2003 17:44
Moonshine EVERYTHING in UT2K3 is Shader Mapping... Quake3 style either overlay or projected decal blended textures.
There is nothing complex about it.

It's just a volume based vertex lighting...
you make yourself a cylinder to represent the light, then each frame you check the collision if any of the vertex are inside it, you then colour them white/orange/blue (car lights) in thier vertex colour which'll blend with the texture and produce a lite effect.
If you use 128,128,128 grey as normal colour, then you can also have shadows in the vertex colours to accent the lightmapped shadows

As the levels are all one mesh this is why it affects the levels and not the people There are just too many mesh and polys to actually do something like that with.

and btw the picturelink is broken


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Juso
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 27th Oct 2003 18:59
Thanks Raven, but can you or someone make couple of cubes, one plain and one light to show the above effect

I think all these very impressive effects are too complex to do in DBP
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Oct 2003 00:24
oki ... with the second screenshot now working, i'm 100% sure that its just vertex lighting.

I'll see if i can't whip up a quickie demo after work


To Survive You Must Evolve... This Time Van Will Not Escape His Fate!
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 07:04
@raven
2 things...

1)
Quote: "even my pathetic FX5200 is capable of all 8 in a scene with a nice 160,000 polygon dragon "
found my problem... i have a 9800pro 8x agp... somehow windows was treating it as a PCI card?... reason why Unreal2 wasnt working that good (they helped me fix it)... so i can run 8 lights now... but still this will slow down lower-end pc's... or might not get the same kind of effect im looking for...

2) any update on a quick demo? personnally i have no idea how to do any of the lighting effects that you have been talking about... exept for a lightmap (basic light map... set lightmapping on)

Jess T
Retired Moderator
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 9th Nov 2003 09:36
Hmm, yes, getting a demo would be really nice thanks Raven...

especially if it involves;
Quote: "you make yourself a cylinder to represent the light, then each frame you check the collision if any of the vertex are inside it, you then colour them white/orange/blue (car lights) in thier vertex colour which'll blend with the texture and produce a lite effect.
If you use 128,128,128 grey as normal colour, then you can also have shadows in the vertex colours to accent the lightmapped shadows "


Thanks again...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th Nov 2003 18:00
i dont see how this can be done... i havent looked at the vertex things that much... but it seems like its just like applying a static light map... no interaction or real-time modifications?

hopefully im wrong... but that will take a DarkBASIC Elite to help us out on this... hopefully Raven will have time to help us out!

Jess T
Retired Moderator
22
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Nov 2003 13:19
*coughbumpcough*


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2026-07-26 19:47:05
Your offset time is: 2026-07-26 19:47:05