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.

AppGameKit Classic Chat / [AGk 2 Tier 1 ]Changing out the Skybox Texture?

Author
Message
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 26th Feb 2016 05:47
Sooo, how exactly is this done? I can't find any commands to accomplish this feat. Is it even possible? Seems a bit crazy not to include a command to switch on the skybox texture...

Thanks!
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Feb 2016 09:41
Have you tried the examples provided?
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 26th Feb 2016 11:35
Yup, all they do is turn it on... Nothing else. I've checked through the commands and there is nothing pertaining to changing textures. Very confused.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2016 15:03
There is no skybox texture, it is procedurally generated based on the color values given to it.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 27th Feb 2016 04:03
Ah that is a bit sad. I have a lot of custom skybox textures I've made over the years and was going to release them to the community. I figured the commands would give us a faster way of implementing them.

Oh well, not a big deal, will just have to setup some custom ones.

Thanks Paul.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th Feb 2016 12:34
Search the forum, I myself have posted about skybox issues in the past, and every time someone posts code using a skybox object. It's simple enough to load an object, load a texture, and put that texture on the object.

You could even wrap to setup into it's own function for even more ease of use!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2016 14:36
There is one command I added that may be useful for custom sky boxes, SetObjectDepthRange(objID,1,1) which will make the skybox object always draw as if it had a depth value of 1 for all pixels (final depth values are in the range 0 to 1). Combine it with SetObjectDepthReadMode(2) (depth equal) so it only draws where the depth buffer equals 1, i.e. where no other object has been drawn, and it will look as if it is behind everything else. The object will still be culled if it is drawn outside the camera range.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 27th Feb 2016 16:01
It would make sense to have a built in skybox feature that is always drawn, and always behind everything. And with the new sun and colors, why not allowing multiple layers of boxes? Like we could add in a layer of clouds and adjust the colors of the skybox and the location of the sun to mimic different times of the day. Even better would be procedurally generated clouds and stars, that would be amazing for anyone doing outdoor 3D games. And being able to switch the sun to a moon. Imagine having clouds moving across the sky. And a sun bloom effect, and rain and so many cool things could be added. I'm not really asking for it. I still have no plans for 3D games and there are plenty of more important features. But would be cool to see added in the future.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Feb 2016 21:57
Like the DarkClouds plugin that was created for DBPro?

https://web.archive.org/web/20150910233651/http://www.thegamecreators.com/?m=view_product&id=2068
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 27th Feb 2016 23:09
Yeah, that would be really cool for those who need a sky. A lot of users aren't making anything in 3D so I would say it's too soon. But AGK3 perhaps?

Login to post a reply

Server time is: 2024-05-03 18:18:39
Your offset time is: 2024-05-03 18:18:39