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 Discussion / more than one light sourse?

Author
Message
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 4th Oct 2006 04:24
is i possible tohave 2 light sourses show at the same time?

like light0 and light1 pointing at different objects?

i cant seem to get any more lights besides light 0 even if the other light is here but i cant see it

dont hate people who rip you off,cheat and get away with it, learn from them
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Oct 2006 15:34
If you're searching for some nice light effects, you'll have to use a lightmapper like Cartography Shop or 3D World Studio. Deled is a free solution.

Lights only affect verteces. And not the textures on them. This means that if you have a high poly plain, you'll have a more detailed light effect than an ordinary plain primitive.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 4th Oct 2006 17:02
all i am trying to do is illuminate an object from al sides, not just one side. for this i want to use 2 light sourses one from the back other from the front but only one of them (the light0) shows up

dont hate people who rip you off,cheat and get away with it, learn from them
Profit
20
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 5th Oct 2006 02:42
You could just make more ambient light.

common people are walking in line.

Mitsu Fly Ride.
Lukas W
22
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 6th Oct 2006 11:50
try this code:



the sphere should be white on the left side, and yellow on the right side.

if it is not, buy a new graphics card!

PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 7th Oct 2006 20:15
no, maybe it doeset work because i need to do something else since my thing is a little more complicated.

i sphere vertically rotating around a matrix. i attached a light source to the sphere which is pointing at the matrix. This is pretty much a rough simuation of day and night. Ill tell you now even though its simple it works VERY well with the sky lighting, makes sunsets look realistic. to make ths i put a big spherical skybox around the whole thing and moved it a little down so if you are on top of the matrix you see less than half of the sphere this way the line betwen light and dark is less noticable.

anyway, get to the point. no matter wht ligt sourses i try my sun sphere is black but the side facing away from me is white. i eve tried to attach lightsources to a limb attched to the sun.

but its always the dark side facing to me.

this is really mind boggling

dont hate people who rip you off,cheat and get away with it, learn from them
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Oct 2006 04:02 Edited at: 8th Oct 2006 04:17
Hello,

What types of lights are you setting:
point, directional, spot?

Are you aware that you can control whether or not an object is sensitive to light using the SET OBJECT command? The sensitivity for light 0 and the other lights (1-7) are controlled with two separate flags

SET OBJECT Object Number, Wireframe, Transparency, Cull
SET OBJECT Object Number, Wireframe, Transparency, Cull, Filter
SET OBJECT Object Number, Wireframe, Transparency, Cull, Filter, Light
SET OBJECT Object Number, Wireframe, Transparency, Cull, Filter, Light, Fog
SET OBJECT Object Number, Wireframe, Transparency, Cull, Filter, Light, Fog, Ambient

You can turn off light 0 (ambient light) all together and rely on the other lights.

Check out the DBC lighting example 1 that shows a spot light moving around.

Also, what are you building your objects in? If it's an external app, make sure it's exporting the normals properly. The normals control the objects response to lighting and color. Also check the culling of the object. If the object is "inside out" you will get a similar effect to what you described.

Enjoy your day.
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 8th Oct 2006 08:03
oh man, i am still a noob

is there a set of commands somewhere out there that has more coands or more combinations than the DB manual?

thanks man ill screw around with your code stuffs there

dont hate people who rip you off,cheat and get away with it, learn from them
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 8th Oct 2006 08:07
oh yeah, the light that comes from the sun object is the original light 0 i made it into a directional light, does it make a difference?
and my objecs are made by DB

dont hate people who rip you off,cheat and get away with it, learn from them
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Oct 2006 08:46
Quote: "is there a set of commands somewhere out there that has more coands or more combinations than the DB manual?"


The manual listed here is the one I use, I think:

http://darkbasic.thegamecreators.com/?f=upgrade_language

I think it's better to light 0 alone except to turn it down or change it's color and stuff. I'm not positive, but I think it's purpose is to provide generic light for the entire scene. You can turn it down very low or off completely. Before messing around too much with it, I'd suggest using the other light numbers.

Turn it down with the SET AMBIENT LIGHT command - then play around with the other lights to test their effect.

Enjoy your day.
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 8th Oct 2006 09:30 Edited at: 8th Oct 2006 11:34
for some reason, no other lights that i make don't show up.

But thats because the objects dont recogise the other lights right?

i figured out how to amke the sun object illuminated by fiddling with your code. I still need to figure out how to get the other ligts to work. One ambiet light wont do it. I still need something togive light when the sun is down or else you cant see a thing.

is there jst a way to make more than one ambient light?

dont hate people who rip you off,cheat and get away with it, learn from them
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Oct 2006 12:34
Try this out:

It puts two spot lights on a cube an orange one and a green one:



Enjoy your day.
PAGAN_old
20
Years of Service
User Offline
Joined: 28th Jan 2006
Location: Capital of the Evil Empire
Posted: 8th Oct 2006 23:27 Edited at: 8th Oct 2006 23:30
DBC had some very good examples and tutorils. to bad i dont ave it anymore.

and for some rason all i see is a spinning white cube and no other colors.

i use DBP if that could be the problem

dont hate people who rip you off,cheat and get away with it, learn from them

Login to post a reply

Server time is: 2026-07-06 10:34:08
Your offset time is: 2026-07-06 10:34:08