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 Discussion / Prgrammatic skyboxes

Author
Message
Yodaman Jer
User Banned
Posted: 27th Dec 2007 22:43
Well I just learned how to texture in DB and I thought that I could maybe use this technique to create a sky box using a sphere and sky texture.
Problem is, I can only get it to go on the OUTSIDE of the sphere, not the INSIDE, if you know what I mean.
IS their a command to flip the normals so that I CAN do this?

Wii came . . . Wii saw . . . Wii conquered!
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Dec 2007 22:56
Look up SET OBJECT, you can set a whole bunch of things with it
You need to turn face-culling off to see the inside of the sphere.

Yodaman Jer
User Banned
Posted: 27th Dec 2007 23:06
Thanks. I tried out several things with it but still didn't succeed, but I am doing searches and reading a lot. Thanks for telling me that, it gives me good ideas . . .

Wii came . . . Wii saw . . . Wii conquered!
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Dec 2007 23:34
I'll whip up an example
you'll probably learn it quicker if you can see the code

Yodaman Jer
User Banned
Posted: 28th Dec 2007 01:52
Thanks 87! Can't wait to see the examples.

Wii came . . . Wii saw . . . Wii conquered!
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Dec 2007 02:39
Or use a negative number for the size of the sphere.

TDK_Man

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Dec 2007 04:08
Does the negative number invert the faces (change the rotation order of the vertices for inverted normals etc.)?

Enjoy your day.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Dec 2007 04:09
Quote: "Or use a negative number for the size of the sphere."

Another nifty trick TDK
I wouldn't have thought of doing that.

here's a rubbish example
I'll make a better one that covers all the parameters for SET OBJECT, it's good to know because you'll use this command a lot


Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 28th Dec 2007 13:17
Quote: "Or use a negative number for the size of the sphere."


That worked for me...

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Dec 2007 02:03
This example uses object culling and transparency.


Yodaman Jer
User Banned
Posted: 29th Dec 2007 04:44
Quote: "Or use a negative number for the size of the sphere."


CRUD!!! Why don't I ever think of these simple things . . .?!?!?
Thanks, I'll try that and see how it comes out. Maybe you should change your name to Yodaman_TDK for rocking so hard!

@ Obese87:
I see the 'get image' and 'texture object' commands, but where are the lines for loading the image? Hmm..now that I look at it it looks like your creating anew image . . .never mind.
Surely there is a simpler way than that though? Can't I just use
'SET OBJECT CULLING OFF' command and be done?
I understand that code, it's just not compatible with my test program right now...
Thanks for your help everyone!

Yodaman Jer

Wii came . . . Wii saw . . . Wii conquered!
Yodaman Jer
User Banned
Posted: 29th Dec 2007 05:51
Hey all, using a negative number worked perfectly!
Thanks TDK. If I've said it once, I've not said it enough: YOU ROCK!!

Wii came . . . Wii saw . . . Wii conquered!
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 29th Dec 2007 14:50
Quote: "Can't I just use
'SET OBJECT CULLING OFF' command and be done?"

That's not a command in DBC, it should be though.

Quote: "Hey all, using a negative number worked perfectly!"

Make sure you position the sky sphere in the same position as the player, then he will always be in the centre of the universe and make sure the camera never goes outside the sky sphere

Yodaman Jer
User Banned
Posted: 29th Dec 2007 19:11
Quote: "Make sure you position the sky sphere in the same position as the player, then he will always be in the centre of the universe and make sure the camera never goes outside the sky sphere "


Done and done. Thanks again for your help everyone!

Wii came . . . Wii saw . . . Wii conquered!
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Dec 2007 20:36
Heh, I'm weird so I turned OBese's code into a Tom Raider-esque artifact thing.
And then, because actually I'm really weird, I put a world around it.



Sudoku arts, the rabi and Nancy DrewG
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 30th Dec 2007 00:47
Quote: "I'm weird"


Amen


Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Dec 2007 01:15
@INH
That was pretty cool, the camera actually flew through the holes

Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 30th Dec 2007 13:42
Quote: "That was pretty cool, the camera actually flew through the holes "

Yeah, I find games tend to have irritating collision that makes holes somehow solid, so I decided to do that.
Quote: "Amen"




Sudoku arts, the rabi and Nancy DrewG
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 30th Dec 2007 17:45
Quote: "Quote: "Amen"

"


I was agreeing with you by saying that you are weird


Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 30th Dec 2007 23:05
Yeah, I am aware.
Cheeky.


Sudoku arts, the rabi and Nancy DrewG

Login to post a reply

Server time is: 2025-06-02 09:53:06
Your offset time is: 2025-06-02 09:53:06