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 / alright, a new one.

Author
Message
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 8th Apr 2003 18:45
o.k., i fixed my fog but now when i set the ambient light to a really low level, i get dark shadows on my matrix but overall it is still pretty well lit. i even tried setting my ambient level to 0 and i still get the same thing. i think that it might have something to do with my sky sphere but i toggled the light and ambient light values on and off and it doesn't appear to do anything for me. my sky sphere has a fade value of 0, which should let the ambient light affect it, but i get no results. here's my code:

#include "LoadMatrix.dba"

sync on
sync rate 0
hide mouse

`array for matrix info
Dim BigMatrix(600,600,1)
Dim StartLoc_X(1): Dim StartLoc_Z(1)im Info(2)
Dim TArrayX(1): Dim TArrayZ(1): Dim FKey(10,1)
Dim ColData(100): Dim ZoneData(100): Dim Tiles(500,500)
Dim OverTexture$(100): Dim OverName$(20): Dim ReplaceTex(100)
Dim MOffsetX(25): Dim MOffsetY(25)
Dim MWire(20): Dim MGhost(20): Dim Lock(20)
Dim MatX#(20): Dim MatY#(20): Dim MatZ#(20)
Dim MatWidth#(20): Dim MatHeight#(20)
Dim TilesX(20): Dim TilesZ(20)
Dim MatHi#(20): Dim MatLo#(20)

`load level
LoadMatrix("EXILE",1)

fog on : fog distance 2300
fog color RGB(128,128,128)
set ambient light 30

gosub water

gosub sky

position camera 8200,10,9330

`main-------------------------------------------------------------
do

fps# = screen fps()
set cursor 0,0
print x#
print y#
print z#
print fps#

gosub player_movement

`make the sky follow the camera
position object 1,camera position x(),camera position y(),camera position z()

sync
loop
`end of main---------------------------------------------


`subroutines
water:

load image "water.jpg",1
a = 500
b = 501
c = 502
d = 503

`make the lake
make matrix a,4600,4600,40,40
prepare matrix texture a,1,2,2
set matrix texture a,1,1
ghost matrix on a
position matrix a,2600,-55,0

`make the river
make matrix b,2500,5000,40,40
prepare matrix texture b,1,2,2
set matrix texture b,1,1
ghost matrix on b
position matrix b,6000,-55,4600

`make the waterfall
make object plain c,210,210
texture object c,1
ghost object on c
position object c,8210,-51,9336.23
xrotate object c,65

make object plain d,125,250
texture object d,1
ghost object on d
position object d,8233,70,9515
xrotate object d,45
yrotate object d,357

return

player_movement:

rem mouse control for camera
position mouse 320,240
cx#=wrapvalue(cx#+mousemovey() )
cy#=wrapvalue(cy#+mousemovex() )
cz#=wrapvalue(cz#+mousemovez() )

Rem Rotate camera
if cx#>270
if cx#-270 > 90 then cx#=270
else
if cx# > 90 and cx#-270
You're ate up like a soup sandwich.
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 8th Apr 2003 18:46
why won't this thing post my code right? i'll try again.



You're ate up like a soup sandwich.
Ben
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location: United Kingdom
Posted: 8th Apr 2003 18:53
well done you found the code button.

Tha D'lithi'om CRR'ist'lls Can'na Tek it Cap'n!
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 9th Apr 2003 00:15
1) you must set your objects (including sky) to be affacted by ambient light
(set object obj,1,1,0,1,1,1,1)

2) light changes do not affect fog, so if fog is present , near and bright , most likely it will not allow you to see the changes in the sky,
(to affect the fog you must change its rgb colors to 0,0,0)

turn fog off and try to set ambient light low (like 0) and high (like 90-100) to see the difference

and of course: camera far range must be bigger than skysphere AFTER SCALE UP if any..
Many set camera range like 1,5000 on a 4000 skysphere and after they scale up the sphere like 200,100,200 and that brings your sky distance in x# and z# directions at 8000, well beyond camera range.

Login to post a reply

Server time is: 2024-11-24 09:19:13
Your offset time is: 2024-11-24 09:19:13