Skyboxes

Locked
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Skyboxes

Post by FluffyFreak »

Recently Paragon added support for texture based skyboxes.
They have a selection which are all very pretty and cool looking. However I know that they're what has always been determined to be fake coloured or otherwise over-the-top for Pioneers aesthetic.

I've never fully agreed with that since I think that it's as easy to do subtle backgrounds, or to tone them down a lot.
However I have asked Lionheart if he would mind me backporting the underlying code back to Pioneer so that we too can have pretty backdrops.
I haven't had a reply yet but I have ported the code already in 20 mins on my lunchbreak (It's much quicker when someone else has already written it!!!) and it's on this branch here: https://github.com/fluffyfreak/pioneer/compare/skybox
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Image

Image
nozmajner
Posts: 1079
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Skyboxes

Post by nozmajner »

Nice! :)
Does it replaces the current star display or complements it?
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

The Paragon implementation complements it. It's rendered, then the stars are drawn.
I can imagine that's ok but I might like it to do something different eventually - bake the stars into background.
Effectively generating the background everytime you jump into a star system.
nozmajner
Posts: 1079
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Skyboxes

Post by nozmajner »

This skypbox stuff might allow for some kind of fake reflections in the future, am I right?
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Yes you could use it for that. Though with Pioneer I would expect we'll keep it quite toned down so there won't be a great deal to see reflected.
You could use the cubemap stuff though for generating local low-resolution reflection maps in real-time. I did that on the PSP for Driver '76 so I'm sure we can manage it on PC :D
nozmajner
Posts: 1079
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Skyboxes

Post by nozmajner »

I'd mostly would use it on the windows of ships if it gets in sometimes. That would be a nice way to show the material of it better.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Well you could always paint a nice looking skybox, or trying generating one using something like Spacescape (http://alexcpeterson.com/portfolio/spacescape) to create the skybox textures.

I've got a million and five things going on simultaneously, as I'm sure we all do, so I think this will be done in a few stages with the basic code backported and fixed up for Pioneer.

I added basic modding support for it earlier so that we can put it in and then people can add their own skyboxes.

Then generating them procedurally can come afterwards. That should help keep each commit small.
baobobafet
Posts: 155
Joined: Thu Jul 04, 2013 10:01 pm

Re: Skyboxes

Post by baobobafet »

Nice :)

What sort of resolution is supported for the skybox's?
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Technically anything but so far I've stuck to 512x512 per-face of the cube.
Was just about to post something actually:

I've uploaded the existing Pioneer sky as 6 separate png files, a readme and a bat file to help turn them into a "default.dds" file to here: http://quantum-thoughts.net/images/dump/cubemaps.zip

I'll copy and paste part of the readme too:
Firstly you will need a piece of software from AMD called "CubeMapGen".
You need to get the version direct from their website here:
http://developer.amd.com/resources/arch ... ubemapgen/

If you installed it to somewhere other than "C:\Program Files (x86)\ATI Research Inc\" then do this bit.
Locate wherever it is and copy the path.
Now edit the file "make_cube_map.bat" in this folder and change the line
"C:\Program Files (x86)\ATI Research Inc\CubeMapGen v1.1\CubeMapGen.exe"
to the actual path to the program "CubeMapGen.exe".

Cube map face mappings:
cube_face_0 = X right
cube_face_1 = -X left
cube_face_2 = Y up
cube_face_3 = -Y down
cube_face_4 = Z ahead (forward)
cube_face_5 = -Z behind (backwards)

TO bake the images into a cube map just run the batch file.

Enjoy.
Locked