Skybox improvements

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Skybox improvements

Post by aubergine »

Would it be possible to make some changes to the way the skybox works?

It's currently set-up like this:

Image

Instead of being a cube (with the sky painted on the 4 vertical sides) could it be given 6 (extruded hexagon) or even 8 (extruded octagon) vertical sides?

Also, could it be made to rotate much, much slower? Currently the clouds move way too fast so when you pan the camera it feels like only the land is moving in relation to the camera. If the skybox rotated more slowly, there would be an increased perception of land and sky being part of the same planet :)

Finally, would it be possible to add an inner skybox or two? Using PNGs with alpha transparency, it would be possible to have foreground clouds. The innermost skybox would auto-rotate fastest, the middle one slighly slower and the outer one slowest of them all.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Skybox improvements

Post by Berg »

Your asking for what has already been done on WZGM see the release on sourceforge for the code
http://wzgraphicmods.sourceforge.net/joomla/
This system you asked for was offered up a while back but was not assimilated.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: Skybox improvements

Post by aubergine »

Sounds interesting - are there any vids showing it in action? Did it have any performance impacts, etc?

EDIT: Found videos: http://sourceforge.net/projects/wzgraph ... es/Videos/
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Skybox improvements

Post by Berg »

http://sourceforge.net/projects/wzgraph ... i/download look at that one and no noticeable performance issues.
Do note in the video it changes from day to night it changes on the hour it uses PC time to do this.
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: Skybox improvements

Post by aubergine »

Would there be a way to have the outermost skybox be a gradient fill for the sky colour, and then tween that gradient to give a smooth transition between day and night? Or fade between day/night backgrounds if that's easier in the 3D model?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Skybox improvements

Post by Shadow Wolf TJC »

I wonder if modders (and mapmakers) could be given the ability to modify which skybox is used on a certain map through JavaScript? Like, say, there was this setSkyBox() function that was added in to the JavaScript API that, for example, modders could use to apply a certain skybox to either 1 or more specific maps, or to any map that contains a certain "tag" (which would be a special feature object that would be invisible to players, making it ideal for mapmakers to use as a special "tag").
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Skybox improvements

Post by Berg »

you can define a sky texture for each tile set see your wrf files
vidmem.wrf vidmen2.wrf vidmen3.wrf you can define a sky texture for each map type in a mod
Look into it and see that it can already happen with a mod you cant have a skybox described above but you can have sky types.
Shadow Wolf TJC wrote:I wonder if modders (and mapmakers) could be given the ability to modify which skybox is used on a certain map through JavaScript?
User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Skybox improvements

Post by Shadow Wolf TJC »

True. I've modified which skyboxes are used for certain map tilesets for my latest version of the Contingency mod. However, it doesn't apply to specific maps with the same tileset. For example, what if I wanted one Arizona map to have a normal daytime skybox, and another to have a starry nighttime skybox? A setSkyBox() function would allow me to do such a thing.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
User avatar
aubergine
Professional
Professional
Posts: 3462
Joined: 10 Oct 2010, 00:58

Re: Skybox improvements

Post by aubergine »

Furthermore, setSkybox() could be used to transition between two skyboxes - eg. a smoother transition between day and night.

I'd like to be able to set the skybox rotation speed as well. So on a calm day, the skybox would hardly rotate, but on a stormy day it would rotate faster. At night, it would rotate very slowly. I'd still love a separate skybox for clouds. And I'd love to have a sun/moon cycle as well -- eg. be able to set lat,long,date,time and it would work out where the sun / moon needs to be, phase of moon, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
RedShocktrooper
Trained
Trained
Posts: 50
Joined: 08 Mar 2012, 03:42

Re: Skybox improvements

Post by RedShocktrooper »

Allow me to threadjack this into a general day/night cycle one, but perhaps when the skybox switches from it's daytime to nighttime versions, the map itself could get darker, and units could turn on their lights or something?

Even if it has no real effect on gameplay, it'd be cool. :lol2:
User avatar
bendib
Regular
Regular
Posts: 1016
Joined: 29 Aug 2010, 05:22
Location: Imeuta

Re: Skybox improvements

Post by bendib »

I'm afraid that would take a lot of effort to implement, as far as the unit lights. The darkening and cycling of the map from day to night is feasable, but it kinda goes against the vibe of Warzone. I dunno, whatever makes these users happy is what should be done. I'll do things my way, you do them your way, just make sure there's a good reason. Change for the sake of change is often not a great idea.
I'm just worried about how the game would appear and act under those circumstances.
Also known as Subsentient.
User avatar
bendib
Regular
Regular
Posts: 1016
Joined: 29 Aug 2010, 05:22
Location: Imeuta

Re: Skybox improvements

Post by bendib »

Shadow Wolf TJC wrote:A setSkyBox() function would allow me to do such a thing.
Good idea. It'll have to go by filenames however. That way, if you want to make some weird map with sand for the sky, you can.
Also known as Subsentient.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Skybox improvements

Post by Per »

RedShocktrooper wrote:a general day/night cycle
This has been tested in the past, and it does not look appropriate in a game like this. If you want, you can experiment with it yourself from scripts. Maybe it will have its uses with more specialized mods (eg there are some zombie mods in Starcraft2 that uses day/night for great effect).
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Skybox improvements

Post by NoQ »

If you want, you can experiment with it yourself from scripts.
We have setting skybox in JS already? (:
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Skybox improvements

Post by Mysteryem »

NoQ wrote:
If you want, you can experiment with it yourself from scripts.
We have setting skybox in JS already? (:
If I recall correctly, the actual sun/light position could be changed through scripts, I don't know how this was done in the scripts mind you. Using this, you could simulate a day/night cycle.

Edit: setSunPosition() and setSunIntensity() now in JS.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."