Gas Giants

A quieter space for design discussion of long-term projects
DraQ
Posts: 149
Joined: Sun Mar 23, 2014 10:02 pm

Re: Gas Giants

Post by DraQ »

FluffyFreak wrote:@DraQ, what I mean is that I'm not working on the look of things right now, just the low-level engineering part of the rendering.

When I work on things I try to split them into a number of parts so that I don't get overwhelmed doing a single gigantic piece of work that takes 8 months or something crazy.

This gas giant work started with me splitting the way their geometry was generated away from the system that the terrestrial planets use. Now I'm working on how the colour textures are generated.
I do think that we need something like the Sudarsky classification, but I won't do it as part of what I'm writing at the moment - I'll make it another separate piece of work - so that I can get this finished and either someone else can do that work, or I'll pick it up again later on :)
I think it may help outlining what you might need - for example some hot gas giants will be effectively cloudless.

I also think cloud system should be flexible enough to be reusable for other planets, and that it would be good to have some way of treating tidally locked planets differently from normal ones in terms of both clouds and terrain/terrain pretending to be lower cloud decks.
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Yeah and it will help just not with the low-level bits n' pieces that I'm doing right now.

Clouds are something I've looked into and want to add too, Gas Giants make a great situation where they can be tested too.

The idea I'm working on at the moment is to get this low-level stuff done to generate good sized textures for the gas giants.
Then use that to colour a layer of height fog and possibly animate that using a combination of simple (Simplex/Gradient) noise and the colour from the texture to provide the speed of the animation... so you get the lighter/darker bands moving slower than their opposite :)
That way even though the underlying texture might not get updated you'll get something that looks like the clouds moving. Not sure how that will look yet but I think it's worth trying - it should also be reusable for other worlds and later on maybe even help with water rendering.

Then we need to take another look at clouds themselves, the hanging in the sky kind.
Doing puff-piece clouds using billboards is ok but you really want something more voluminous so you get cloud banks, big planes of cloud etc - nevilclavain on the SSC forums has given me some ideas and pointer on that in the past but I saw a bunch of other stuff that needed doing before I got to it.
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

What would be super useful is that you (I think it was you) mentioned that most of the gas giants are being made with approximately half the radius they should have? Well if you can find in the code where that's happening then it would help me track it down.

I expect that it's somewhere in StarSystem.cpp but the file is one HUGE mess that we're slowly tackling the rewriting of. If you can find it and figure out what's wrong with the maths then I should be able to fix it and at least then the planets should be the correct size. It's also the file where most of the things you're discussing is initially decided so some familiarity with it would be very helpful :)
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Having said that it looks like it might be around line 1843 in SystemBody::PickPlanetType as well as in SystemBody::CalcAtmosphereParams
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

...and of course none of this works on Linux with the open source AMD GPU drivers *head-the-fucking-desk*

So very frustrating.

Ok, need to do two things:
* Create a 2nd OpenGL context to render the cubemaps so it doesn't interfere with the main context.
* Test the Noise stuff without the rest of Pioneer on the Linux AMD drivers to see what fails.
Tichy
Posts: 132
Joined: Tue Jul 02, 2013 12:00 pm

Re: Gas Giants

Post by Tichy »

@FluffyFreak: ...just want to say "thank you thank you thank you!" for testing your stuff on the open source drivers! :)
DraQ
Posts: 149
Joined: Sun Mar 23, 2014 10:02 pm

Re: Gas Giants

Post by DraQ »

Damn, I'll need to make myself a GitHub account, maybe then I could not only just track issues by myself, but also contribute to development.

Though regarding being privy to how things should work, we could really use people with actual background in that stuff.
I know a bit about molecular biology, but other than that I'm pretty much just an avid science geek.
FluffyFreak wrote:What would be super useful is that you (I think it was you) mentioned that most of the gas giants are being made with approximately half the radius they should have? Well if you can find in the code where that's happening then it would help me track it down.

I expect that it's somewhere in StarSystem.cpp but the file is one HUGE mess that we're slowly tackling the rewriting of. If you can find it and figure out what's wrong with the maths then I should be able to fix it and at least then the planets should be the correct size. It's also the file where most of the things you're discussing is initially decided so some familiarity with it would be very helpful :)
FluffyFreak wrote:Having said that it looks like it might be around line 1843 in SystemBody::PickPlanetType
It looks like it would be it.
If the planetary radius (in Earths) is expressed as just the cube root of mass (also in Earths), then without provisions for different planet types it gives all planets the same density, which is, uh, wrong.
Earth's density is around 5.5g/cm^3, our local gas giants range from 0.7 (Saturn), to 1.6 (Neptune).
Giving generated gas giants density of 5.5, underestimates their actual volumes for given mass by the factor of between 7.9 and 3.4 which yields radii between 1.5 and 2 times too low, which is around where I eyeballed it.

This means, that for example icy satellites and planets will be noticeably off as well.

Pioneer needs some better way of doing that, unfortunately providing actual functional relationships is beyond my skill or knowledge, I can just drop some guidelines - like that above Jupiter mass gas giants generally don't increase in volume (because they just get more of their hydrogen compacted into liquid metallic form) up to and including brown dwarves and faintest of M stars.

Speaking of masses and some other values - is there any reason why instead of performing all its conversion calisthenics doesn't just use unsigned 64bit ints (possibly encapsulated in something friendlier)?
That would be enough to store any of the coordinates of an object in any reasonably (and some unreasonably) scaled planetary system with sufficient precission to not have it jitter around even if it's as small as a spacecraft, or to store mass of pretty much any celestial body up to and including most massive of stars (Eddington limit) in around trillion ton chunks, which happen to be reasonable lower mass estimate of any celestial body Pioneer might generate and are still smaller than the mass of Deimos.

Also, regarding atmospheres, I see the molar masses are already in use in planet.cpp - it would be neat if all the gas constants got their own header and could be used to first calculate what gases a body can and cannot hold in generation phase, when determining the atmosphere.
Finally, I think that cosmetically it would help a lot to have "X rich atmosphere" rather than just "X atmosphere", because "rich" makes for a nice, fuzzy term - at least as temporary fix.
CoSm1c_gAm3r
Posts: 2
Joined: Fri Apr 18, 2014 11:37 am

Post by CoSm1c_gAm3r »

Why there is ability to land on gas giants?
When I test it I was amazed that it is possible in Pioneer.
I remember trying that in F:E2 and there was screen flashing in colors and then I exploded. I don't remember if I did it properly because maybe I had to much speed.
Anyway in Pioneer at some speeds I can bounce off surfaces. Sometimes I can go under planets surface but that is other problem.
Is it hard to make fog effect while descending into gas giant? And then that fog slightly and rapidly change color? Is it hard to make small core that would be like diameter of earths moon and all above till real gas giant size would just be just that dense fog? So at half way ship would just be crushed by atmosphere of that gas giant?
I wonder if there is ability to land on star if there would be strong enough engine. Because now only speed can kill. I really though that other ways of causing ship destruction was already implemented in Pioneer but it is not. Weird.
When I tested descending into Jupiter I was thrilled and scared while that sound kick in I felt more scared but then when I realized that I can just touch down on Jupiter and his surface is what can be seen from orbit instead of huge amount of gas then I was very disappointed. I tested landing on earth sea and there is no destruction too I just landed on surface of water but this at least I can understand that was hard to make that some parts of planet can kill but gas giants and landing on them? What the .......?

I landed on all gas giants in solar system :/

I thought that at least making some outline above surface that kills it is quite easy and for some time it would work. But there is nothing like that. Pretty disappointing.
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Gas Giants

Post by FluffyFreak »

Tichy wrote:@FluffyFreak: ...just want to say "thank you thank you thank you!" for testing your stuff on the open source drivers! :)
No problem :)
I think it's easier if I do since I'll get less people yelling at me later! :D
FluffyFreak
Posts: 1314
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re:

Post by FluffyFreak »

CoSm1c_gAm3r wrote:Why there is ability to land on gas giants?
I landed on all gas giants in solar system :/
I thought that at least making some outline above surface that kills it is quite easy and for some time it would work. But there is nothing like that. Pretty disappointing.
I had no idea that was possible, I never thought to try! Usually when I go near a Gas Giant it is to fuel scoop which means travelling at high speed through the atmosphere rather than going slowly to land.
So yes there should probably be a "kill-depth", also I mentioned earlier in the thread that I want to add a height based fog, it's one of those "quite easy" jobs that unfortunately just hasn't been done yet.

If you know how to do it then I can point you to the relevant shader files, or if you need help with getting the data from the C++ side then I can support you doing it?

Unfortunately none of us are graphics programmers, well one of us is but he's busy with real life :) So I'm just doing the best I can, and what might take 5 seconds for a graphics programmer takes me a couple of weeks because I have to do lots of research first!
Post Reply