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 / fog disappeared

Author
Message
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 8th Apr 2003 08:30
well, i finally got a sky sphere to work. but i want the fog to be roughly 50-100 units inside the edge of the sphere. but i have everything set up for the fog, but there is no fog! on my other project, when i tried to have a sky sphere, i had fog on but i couldn't see my sphere. does the sky sphere obscure the fog? here's my code.

#include "LoadMatrix.dba"

sync on
sync rate 0
hide mouse

fog on : fog distance 200
fog color RGB(128,128,128)
backdrop on : set camera range 1,2000

Rem *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Rem !!!!!! VERY VERY IMPORTANT !!!!!!
Rem Please copy the following DIM statements into your program for the
Rem LoadMatrix call, EVEN IF YOU DON'T USE THEM!
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)

Rem *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

`load level
LoadMatrix("EXILE",1)

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

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.
actarus
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 8th Apr 2003 16:03
Why do you use the backdrop?

BTW:Is the skysphere's size greater or smaller than the fog distance?

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 8th Apr 2003 16:05
You can disable the backdrop if you're using a sky sphere. More importantly - make the sky sphere not bothered about fog or ambient lights or lights at all. See the command "set object" and turn off fog for it (and lights, etc).

Cheers,

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 8th Apr 2003 18:32
nevermind, i fixed what i did. if you notice in my code above, i had all of my fog routines before i loaded my landscape. i didn't think that it would make that much of a difference, but apparantly it does. thanx for the help though!

You're ate up like a soup sandwich.

Login to post a reply

Server time is: 2024-09-20 03:42:43
Your offset time is: 2024-09-20 03:42:43