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.

Newcomers DBPro Corner / Lighting problems in DBC

Author
Message
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 6th Aug 2004 11:58 Edited at: 6th Aug 2004 11:59
I have a light, the only problem is that light from that light shows up in the wrong places. This image explains my problem:



"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 6th Aug 2004 18:53
It would help if you gave us the commands you are using in building and pointing the light...
S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Aug 2004 01:15
Sorry.

make light 1
set point light 1

that is all. I am using DBC. The light is positioned at the position of the wireframe blue rectangle.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 7th Aug 2004 08:57
Okay, then you probabkly want to change to SET SPOT LIGHT or SET DIRECTIONAL LIGHT instead of a point light source, because a point source it kind of like having a bare bulb hanging in midair.

SET SOT LIGHT number, Inner, Outer
Deines a spot with an inner cone of Inner, outer cone of Outer.

SET DIRECTIONAL LIGHT numer, X, Y, Z
Point the light at in the direction of X, Y, Z from the origin of the light.

S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Aug 2004 09:21
Yes, that is what I want. (a bulb). Whoever, a spotlight would work too, but I am unsure of what the angle values do.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 7th Aug 2004 09:47 Edited at: 7th Aug 2004 09:53
Uh....
The angles are a little difficult to describe correctly, but I'll give it a shot...

Each spot light has two "cones" of light coming off of it, an inner one and an outer one. If they were square they'd look something like this;

|--------------|
|--------------|
|--++++++--|
|--++++++--|
|--++++++--|
|--++++++--|
|--------------|
|--------------|

[edit] Rats! still doesn't look right.

The angles define how far from the exact center the cone's circle is, the inner cone being the full bright light ( the + signs) and outer cone being the half light of the unfocused beam. (the - signs)

Hope that helps.
S.

Any truly great code should be indisguishable from magic.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 7th Aug 2004 10:10
Oh yeah...

While I am thinking of it, did you remember to reduce the ambient light too? What effect are you trying to achieve?
S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Aug 2004 11:07
Yes, the spot light is my ambient light.

I understand what you are saying, but a weird thing happens:
when I have it set to set spot light 0,90,180 I see no light.

But when it is set spot light 0,180,360 it is as if I have not turned ambient light off!

It isn't a gradual transition either, It just suddenly jumps (at least I think it does. I haven't been able to find the exact point it makes the difference).

My code follows, so you can see what I am talking about. Warning: it is an entire game that I am working on, so it is long. Then lighting parts have been pointed out with an obscene number of comment lines.



Thank you SandraD for your time and effort.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 7th Aug 2004 19:32
Okay, I have it.. minus your title.bda. Will look it over and get back to ya.
S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 8th Aug 2004 01:39
Thanks.

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 8th Aug 2004 07:23
Okay, I finally have your code running on my machine, after taking out all the references to any media you used...

Now, tell me what you WANT the light to do versus what it does not do now.

Thanks.
Sandra

Any truly great code should be indisguishable from magic.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 8th Aug 2004 09:41 Edited at: 8th Aug 2004 09:43
Okay....

Judging from the apparent style of play that the code exhibits, I'm assuming the light source is supposed to be a targetting helper which lights up the objects to be shot when they get in range. For that purpose, your rotate light command is off, which explains the wide angle you had to give the spotlight. I've just been playing with it a little and found that the lines below seem to work this purpose, though the light distance and angles may need to be adjusted more.

set spot light 0,30,60
set light range 0,1500
rotate light 0,0,0,0
color light 0,rgb(255,0,0)

I also note that I'm getting some "odd effects" of the firing square when I actually shoot, but that's another issue.

Good luck,
S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 8th Aug 2004 10:04
Yeah, what I had intended for it to do was actually light up the plane that is used for the floor.

As for that firing problem, I refer to that as the "Bug that Will Not Die".

My problem appears to be that it only lights up the balls and not the actual floor of the surface.

Thanks - Ocean Runner

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 8th Aug 2004 23:17
Well???

I got your posting last night and have been dinging around the thing ever since, and so far -- I'm as frustrated as you are! I've even changed the plane to a box, tried texturing it, all sorts of things and the only way to get any light appearing on the plane surface is to move the light off one of the corners along the edge. Then it lights up as shading coming from that corner.

So... here's my best suggestion for doing what you want: Make a CONE object that points its peak at your firing square and ghost it so it shows over the plane, coloring that sucker red like the light we're trying to use. It's a bother I know, but I can see no other way to get there at this point. It would appear that the lighting controls don't do genuine ray casting.

I'll keep dinging around with it for a while to see if I can find another solution or even a solution to that problem that won't go away, but I believe the cone is your only option.

Good luck,
Sandra.

Any truly great code should be indisguishable from magic.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 9th Aug 2004 01:52
Okay...

This works somewhat for the lighting situation you mentioned, but has trouble when we rotate the direction of firing. (I guess you'll have to work that out, I'm not sure what's going on.)

btw; this also removes any media reference as well...

Again, good luck.
S.

Any truly great code should be indisguishable from magic.
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 9th Aug 2004 02:24
I used the cone idea, and it works pretty much like I wanted it too. Thanks!

"Computers in the future may weigh no more then
1.5 tons. - Popular Mechanics, 1949

Login to post a reply

Server time is: 2024-09-22 20:18:39
Your offset time is: 2024-09-22 20:18:39