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 / SkyBoxes without the edges ?

Author
Message
Serge Adjo
19
Years of Service
User Offline
Joined: 3rd Aug 2006
Location:
Posted: 18th May 2010 20:19
hi everyone, I remember that there is command for skyboxes in order to make the edges completely invisible, without this command the lines are noticeable... but I don't remember which function it is...
the tip was presented in a older newsletter, I believe, or a code snippet or example... I think it is related to texture mapping...

do you have an idea ? do you know what function make the edges of a skyboxes invisible?

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 18th May 2010 22:22
I usually turn off lighting and filtering, and construct the skybox manually from 5 plains, which slightly overlap.

My signature is NOT a moderator plaything! Stop changing it!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th May 2010 22:58
Try the settings for "Set object filter" I think I used a flag of "2"...

Serge Adjo
19
Years of Service
User Offline
Joined: 3rd Aug 2006
Location:
Posted: 27th May 2010 10:37
@baxslash, @Mobiius: 'SET OBJECT TEXTURE V_SKYBOX_E,2,0'
where 2 makes the program retains the colour of the last pixel at the textures edge and paint with that...
and 0 disable mipmaping as a skybox doesn't need mipmaping IMHO !
I recommend everyone to use this tip / technique with their skyboxes or at least to test it and see the difference: the edges are not noticeable with this tip !

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th May 2010 10:43
Great, I'll have a look.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th May 2010 11:54
Quote: "where 2 makes the program retains the colour of the last pixel at the textures edge and paint with that..."

I wouldn't do it that way as you could get blank lines, rather than a smooth edgeless transition. the way I posted of constructing the box out of plains with overlapping edges and the backdrop off I've found to be the best way of doing it. (but you're right to turn filtering off.)

My signature is NOT a moderator plaything! Stop changing it!
TuPP3
19
Years of Service
User Offline
Joined: 26th Jan 2007
Location: [+--]FINLAND
Posted: 27th May 2010 19:52 Edited at: 27th May 2010 19:53
You could try shaders if you have nothing against them, EVOLVED has nice SkyBox shader.
I can't find any corners or edges in skybox with shader.

I create my skybox like this:


Another option is skyphere then.
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 28th May 2010 06:36
Quote: "Quote: "where 2 makes the program retains the colour of the last pixel at the textures edge and paint with that..."
I wouldn't do it that way as you could get blank lines, rather than a smooth edgeless transition. the way I posted of constructing the box out of plains with overlapping edges and the backdrop off I've found to be the best way of doing it. (but you're right to turn filtering off.)"

Wha?

The ,2,0 method works... have you tried it? It seems much cleaner to me to use texture flags than to create faces that are too large. Overlapping stuff makes me worry about Z-fighting, etc.

Here is a tweaked skybox tutorial from the SkyMatter packs free example. At least I think it's tweaked - I put my name on it!!




A 3D marble platformer using Newton physics.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 29th May 2010 19:28
All my games use the same method and I've had no complaints.

My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-25 08:29:57
Your offset time is: 2026-07-25 08:29:57