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 / need help wityh seamless skybox

Author
Message
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 29th Nov 2012 20:19
Hi

I have read the TGCskybox tutorial, but I cannot figure out how to make a seamless skybox. I have tried to make my own using plains, and I have also tried to load one of the skybox objects from the FPSC files folder. But none of them works. The seams are visible!

Here's the code for myown box:



I have tried here with only one texture and no bottom and upper plane.

Here is the code for the FPSC object:



I can see that the seams are visible because earlier I have loaded a terrain and wrote an FPS controller so that I can 'position myself' inside of the box.

But,,, again,, how do I make them seamless?

Best!

www.memblockgames.com
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Nov 2012 23:28
Provide a complete working demo (no exe please) and I'll take a quick look.



Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Nov 2012 03:49 Edited at: 30th Nov 2012 03:50
which skybox tutorial? i'm not familiar with it but from your first batch of code, i've got a 101 questions that all ask "why?".

i'll wait for response to GG's request.

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenom™ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 30th Nov 2012 22:08
What do you define as a seam?
Unless you turn the ambient and light flags off for the skybox its sides might get differently blended if that might be it?


"Why do programmers get Halloween and Christmas mixed up?"
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 1st Dec 2012 09:35
With seams I mean the sides and corners of the box, that is vissible. When I load the skybox from the FPSC/files folder it's seams/sides/corners become darkend where there are dark colours. One problem is that the author of the textures have placed the sun in the corner of a texture, so that it comes near a corner of the box. Since the pixels are brighter there it 'lights' up one of the corners so that you really can see it.

Quote: "Unless you turn the ambient and light flags off for the skybox its sides might get differently blended if that might be it?"


How is this done the best way? I mean do you have suggestions on what commands I could try?

www.memblockgames.com
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Dec 2012 16:27 Edited at: 1st Dec 2012 16:35
see set object light ObjNum, 0 <-- set the flag to zero

that will prevent ObjNum from being affected by all dbpro light sources, including ambient light.

going forward, providing complete code (just enough to replicate the issue(s) you are experiencing) and a screenshot would take a lot of guesswork out of the equation for fellow forumites who might be able to solve problems.

good luck

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenom™ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 1st Dec 2012 19:34
Hi again!

I have attached a .zip file containing a dbro project and the media needed. In the code example I load the skybox object from FPSC.
When I use set object light ObjNum,0 it does just as Virtual Nomad said. But The textures becomes so bright so that the seams/corners comes even more visible. Is there maybe a way to adjust the brightness on the textures somehow?



www.memblockgames.com
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Dec 2012 21:40 Edited at: 1st Dec 2012 21:57
insert:

set object texture 99,2,0

...before your do/loop.

ie, clamp the pixels at the edges so the default behavior to wrap/repeat the image doesn't occur and prevent them from meeting/matching up, as they should:



that's about as good as you could expect, i'd say, given the media & method.

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenom™ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Dec 2012 21:48
Yes, that should fix it.

If you look at the screenshot closely you'll see that a blue edge on one side of a face has been blended with the white part of the opposite side of the same face. This is the result of the default texturing mode being "wrap" rather than "clamp" so the wrong pixels are used in the filtering system.



mnemonic
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 2nd Dec 2012 22:54
it fixed it! I also scaled the skybox larger, that made it look nicer! Thanks!

www.memblockgames.com

Login to post a reply

Server time is: 2026-07-08 01:53:18
Your offset time is: 2026-07-08 01:53:18