Skyboxes

Nyankosensei
Posts: 235
Joined: Wed Sep 11, 2013 8:03 pm

Re: Skyboxes

Post by Nyankosensei »

walterar wrote:The skyboxes were created "automagically" with this tool: http://alexcpeterson.com/spacescape

It is very easy to use and you can create fantastic things, but I had to boot with the Win7 partition to use. Apparently does not work with Wine.
you can compile it for linux

http://osirion.org/wiki/index.php/Creating_Skyboxes
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Luomu wrote:Just for the record, I think doing stars with textures is a bad idea when you can just do individual points. Points are immune to stretching, zooming and filtering artifacts, and you can adjust them individually (fading, twinkling, per-sector variation). See X3 for a game where the starfield illusion breaks down as soon as you press the zoom key.
To be honest I was just backporting from Paragon but my hope was that we could do two things:
[] have a decent looking background
[] have a decent number of stars (i.e. >10,000)

The obvious answer is to remove the stars from the Milkyway background and display them on top, the code is stil in there to allow that.

This was supposed to be an intermediate step on the way to a generated background which is started work on `fluffyfreak/background-gen` but it took so long ot get into the engine that I had to move on in the meantime.
walterar
Posts: 95
Joined: Sat Sep 14, 2013 4:48 pm

Re: Skyboxes

Post by walterar »

Thanks NiankoSensei, was looking for this. I got it.
Image
For those interested, I could compile without problems on Ubuntu 12.04 following the instructions on the page.
baobobafet
Posts: 155
Joined: Thu Jul 04, 2013 10:01 pm

Re: Skyboxes

Post by baobobafet »

[quote="FluffyFreak"]
The obvious answer is to remove the stars from the Milkyway background and display them on top, the code is stil in there to allow that. {quote]

If I read this right - would the above code also allow the ability to adjust the brightness of the milkyway (or other sky box background) behind the top layer of stars, from within the game?
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

It does that already for day/night on a planet so that you can't see the star during the day.
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Skyboxes

Post by Luomu »

FluffyFreak wrote:[] have a decent number of stars (i.e. >10,000)
We used to have 65K points with no perf issues - it's just one buffer and one drawcall. You can increase it again. I reduced it to 10K because the colour generation was messed up and most of the stars were almost invisible.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Luomu wrote:
FluffyFreak wrote:[] have a decent number of stars (i.e. >10,000)
We used to have 65K points with no perf issues - it's just one buffer and one drawcall. You can increase it again. I reduced it to 10K because the colour generation was messed up and most of the stars were almost invisible.
Is there a better way to to them than points? Small billboards?

What I'm thinking of is projecting all of the local stars in the star system / sector caches onto the sky so that you can simply see a star, click on it, and hit hyperspace.
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Skyboxes

Post by Luomu »

FluffyFreak wrote:Is there a better way to to them than points? Small billboards?
Points seem pretty ideal to me. You can alter their size in a vertex shader (gl_pointSize) and texture them using gl_pointCoord, so they are much like billboards.
You could mix points for faraway stars (thousands), and billboards for local, selectable stars (tens? hundreds?).
walterar
Posts: 95
Joined: Sat Sep 14, 2013 4:48 pm

Re: Skyboxes

Post by walterar »

I think one of the best things of Pioneer, is see the sky with thousands of stars twinkling. SkyBox is a great effect, but, only if mixed with them. SkyBox only, do not like it, I see very opaque and and not credible. Hits at first, but then you want to return to the previous sky. Mixing is another thing. That option should exist for the user. I would like to avoid having to do this:

Code: Select all

	m_renderer->SetTransform(transform);
//	if( DRAW_SKYBOX & m_drawFlags ) {
		m_universeBox.Draw(m_renderState);
//	}
//	if( DRAW_MILKY & m_drawFlags ) {
//		m_milkyWay.Draw(m_renderState);
//	}
//	if( DRAW_STARS & m_drawFlags ) {
		// squeeze the starfield a bit to get more density near horizon
		matrix4x4d starTrans = transform * matrix4x4d::ScaleMatrix(1.0, 0.4, 1.0);
		m_renderer->SetTransform(starTrans);
		m_starField.Draw(m_renderState);
//	}
}
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Skyboxes

Post by FluffyFreak »

Luomu wrote:Points seem pretty ideal to me. You can alter their size in a vertex shader (gl_pointSize) and texture them using gl_pointCoord, so they are much like billboards.
You could mix points for faraway stars (thousands), and billboards for local, selectable stars (tens? hundreds?).
Ah ha! I didn't know you could texture them :) I wanted some way of distinguishing between random distant stars, sector stars and reachable sector stars. An augmented reality view of space from your ship which might be hard to do with just points.
Locked