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 Professional Discussion / Ghosting Skyboxes Issue

Author
Message
PALMER
18
Years of Service
User Offline
Joined: 20th Jan 2008
Location: West Sussex
Posted: 14th Mar 2013 20:41
Hi all,
We have a Skybox that works, However, none of our .x models are visible Unless ghosting is turned on

Its as if the skybox is covering the objects but this is impossible because the skybox is huge, its as big as you could ever want it.

We need our .x Models Visible obviously



Here is the code:




set display mode 1024, 768, 32
backdrop oFF
set global collision off
set global object creation 1
//set fov default = 61.9621391296


// Setup Camera Angles

global x# as float
global y# as float
global z# as float




set dir "media\"
// Camera
cam=1

// Pictures and objects
mfalcon=1
space=2
spacepic=3
tief=4
planet1=5


set ambient light 100

// Skybox
FX_sky=1
load image "FX\skybox\space.dds", spacepic ,2 ,2
load effect "Fx\skybox\sky.fx",FX_sky,0
make object sphere space, 4000,5,5
texture object space, spacepic
ghost object off space
scale object space, 3000,3000,3000
scale object space, 3000,3000,3000
scale object space, 3000,3000,3000
set object effect space, FX_sky
set object cull space ,0
position object space ,0,0,0
rotate object space, 0, 0, 90
set object space,1,0,0,1,0,0,0
disable object zdepth space
show object space
ghost object off space




// Millenium Falcon
load object "models\Millenium Falcon\Falcon01.x" ,mfalcon
scale object mfalcon, 250, 250, 250
position object mfalcon, 0,0,-10
set object light mfalcon, 1

// Tie fighter
load object "models\tie fighter\tie fighter.x" ,tief
scale object tief, 500, 500, 500
position object tief, 0, 0, 25

//Planet 1

load image "planets\planet1.dds" ,planet1
make object sphere planet1, 100, 100, 100
scale object planet1, 1000, 1000, 1000
texture object planet1, planet1
position object planet1, 0, 0, 6000
rotate object planet1, -60, 0, 0
enable object zdepth planet1







// Creating our Camera
make camera cam
x#=camera angle x (cam)
y#=camera angle y (cam)
z#=camera angle z (cam)
set camera fov cam, 61.9621391296
position camera cam, 0, 0, 0
set camera range cam,1,900000000






while not escapekey()

x#=x#+mousemovey() : y#=y#+mousemovex() : z#=z#+mousemovez()
rotate camera cam,x#,y#,z#


show object mfalcon
show object space
show object tief


sync
ENDWHILE


What is the problem?

Mince
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 16th Mar 2013 00:46 Edited at: 16th Mar 2013 00:46
Quote: "disable object zdepth space"

Thats your problem. You're telling it to display over everything.

Perhaps you meant...
Quote: "disable object zwrite space"


Oh, and you should include your code in [ code ] [ /code ] tags.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]

Login to post a reply

Server time is: 2026-07-07 04:31:21
Your offset time is: 2026-07-07 04:31:21