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 / Skybox issue, please help

Author
Message
nrasool
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Surrey Area
Posted: 10th Jan 2004 23:15
Hi there

I am trying to get my head around Dark Basic Pro and the programming behind it. Using Cshop i have created a small level, and want to put a skybox around it. I am not having much luck with scale object of the skybox

it looks like the x,y and z are too much, but when i run it, its not working at all, i would like the skybox to wrap around my level, thats it.

Also with Camera, how do i set the camera on where to look, at the moment, it pointing out, but i want to turn it to 180 degree, so it pointing towards the level

Please could someone have a look at the code, and see when i am going wrong with this



Please help

Kind Regards

Nadeem Rasool

A Good Programmer never blames his tools
Easily Confused
22
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 10th Jan 2004 23:40 Edited at: 10th Jan 2004 23:40
First thing is to check your camera range with Set Camera Range, the sky sphere is most likely drawing beyond this. The default camera range is, min=1, max=3000 if I remember.

Secondly, using either Set Object or Set Object Cull you will need to tell your object to draw all faces, this way you can see the sky from the inside the sphere. Set Object 2,1,1,1,0,0,0,0 should do it. (working off the top of my head here)

And Point Camera is your friend

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Jan 2004 02:02
I could be wrong, but this is my understanding...

Set Object Cull is used to ensure the skybox doesn't hide your landscape. Your skybox can be smaller than the scene, but the objects behind it show through.

Multiplying the size of the skybox by -1 turns it inside out and thus puts the texture on the inside, and also solves the collision issue of being inside a box. That's how I do it anyway.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
nrasool
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Surrey Area
Posted: 11th Jan 2004 16:57
Hi there

Many thanks for the reply. I got a bit working now, thank you both, but the sky box is still not showing how i would imagine it be

I have uploaded the project files with the media files onto my website, kindly please could someone have a look into it, and see where i am going wrong, and if possible, advise or put right the code. I would be grateful for your help

Here is the project file
http://www.nadcom.co.uk/dbpro/Test_DBPro.zip

Kind Regards

Nadeem R

A Good Programmer never blames his tools
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Jan 2004 17:38 Edited at: 11th Jan 2004 17:39
Rem Project: Test
Rem Author: Nadeem Rasool
Rem Copyright 2003-2004
Rem Created: 28/12/2003 19:24:23


Rem ***** Main Source File *****
AUTOCAM OFF
SYNC ON
SYNC RATE 50
cls
color backdrop 0
SET NORMALIZATION ON


LOAD OBJECT "Mediaopeningscene.x",1
POSITION OBJECT 1,10,10,10
SCALE OBJECT 1,100,100,100
rem set camera range
set camera range 1,10000
POSITION CAMERA 0,100,2000

load object "Mediasky08.x",2
POSITION OBJECT 2,10,0,10
set object cull 2,0
scale object 2,40000*2,20000*2,48000*1
set object fog 2,0
set object ambient 2,0
point camera 180,0,0

make light 1
POSITION LIGHT 1, 10, 1000, 0
color light 1,255,255,255
set ambient light 50

fog on
FOG DISTANCE 4500
fog color rgb(55,55,55)


DO
set cursor 0,0
print "Nadeem DarkBasic Pro Test"
print "Just to see what can be done"
print "Frames Per Second: ";screen fps()
SYNC
CONTROL CAMERA USING ARROWKEYS 0,20,10
LOOP

works here, not too sure about the fog colour or density though, I inverted the skybox (it was the wrong way up) and made it insensitive to ambient so that you can`t see the seperate faces apart from where the texture joins, also the skybox was set to be wireframe, so I turned that off and fiddled with the camera range, cheers.

Mentor.

System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD (using icewave hd coolers ), DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800Pro 128mb.
nrasool
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Surrey Area
Posted: 11th Jan 2004 19:00
@Mentor

May thanks for your help Mentor. Its working fine now, Excellent

Kind Regards

Nadeem

A Good Programmer never blames his tools

Login to post a reply

Server time is: 2024-11-25 23:35:15
Your offset time is: 2024-11-25 23:35:15