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.

Dark GDK / Set Light to Object

Author
Message
Ancores
12
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 21st Sep 2011 22:17
What function should I use to set light to an object?
I've tried dbMakeLight and it works as I want it to, but I can only make 7 different lights with it.
And I need ALOT more light objects than 7
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Sep 2011 00:51
If you're using the hardware lights, then you are going to have to move them around depending on where you are in your scene. 7 is the hardware maximum.

The only way around this is to use a level editor with light-mapping which will give the impression of scene lighting by embedding the lighting into the textures. Try DeleD http://www.delgine.com/, which is a free and easy to use level editor with light-mapping and has a plugin for exporting .dbo files.

Warning! May contain Nuts!
Ancores
12
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 22nd Sep 2011 01:03
The thing is that I make the lights in-game, I'm running around placing objects and some of them are supposed to make light.
And I would use more than 7 lights in the place I am in the game, they're just small torches supposed to give a little light.

So isn't there any other ways to do it?
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Sep 2011 05:52 Edited at: 22nd Sep 2011 05:53
If your scenes are pretty much closed off (ie rooms) you may get away with it. Apart from that you may have to cheat with some of the effects you're after. Particles can simulate lighting but you might have to 'flicker' the ambient or local light to that object.

I'm sure there's tons more ways to cheat with lighting effects but I've not got that far myself yet. Local lighting and particles are about as far as I've studied, and light-mapping.

Warning! May contain Nuts!
Ancores
12
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 22nd Sep 2011 19:46
Thanks for helping, but I still don't know how I should do it.
I'm just trying to create some random particles using dbMakeParticles() etc, but that doesn't give any light.

Sorry for being noobish, I haven't really been programming for long.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Sep 2011 21:04
We all start somewhere, I did too and didn't have others to ask.

The particles won't emit light so you will have to add the light manually to where they are placed.

Using the hardware lights will limit you. Going from room to room, you will need to reset the lights to the new room.

ie.

light on ceiling
light from holding a torch
light from a tv or monitor screen
light from particles used to emulate a flame

Most of the above can be placed into a light mapped texture. But doing that will be at the expense of shadows. Although as you may notice, most games do not use 'very real' shadows anyway from all light sources.

I would check out something like DeleD first and see the effect the light mapping gives you and then add the extra lights when needed...

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-05-04 10:38:53
Your offset time is: 2024-05-04 10:38:53