Planet Textures & Details

Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Planet Textures & Details

Post by Luomu »

yuyingchenk wrote:I did not get a change to play with the previous Pioneer, was the model of planet details changed or ?
- Turn the details to maximum. You may need a CPU from the future :) But usually medium detail should be enough. I don't keep the planet "textures" option on myself, but I don't know what would be considered the official look.
- The planet generator may create some very uninteresting terrains, as mentioned in this thread. So you'll end up with extremely detailed flat color :(
Because of randomization you could say that previous versions looked better, if you happened to land on some interesting planets. The planet generator really needs some love in form of fix/rewrite.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Planet Textures & Details

Post by FluffyFreak »

Luomu wrote:The planet generator really needs some love in form of fix/rewrite.
It does, it's one reason I want to split out the gas giants. Mostly because they really need some love, but also because they work differently to rocky planets.

They don't generate heights for one thing, and so they don't need the quad-tree for detail management.
They only use the colour generation and it produces values in a normalised range, the code is also a lot simpler for it.

So I'm using it for figure out some things, like how to break apart the system, and do it in small steps. How to treat it as a texture problem rather than generating the point data, doing it in the shader, rendering it all to textures etc.
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Planet Textures & Details

Post by Luomu »

FluffyFreak wrote:It does, it's one reason I want to split out the gas giants. Mostly because they really need some love, but also because they work differently to rocky planets.
I hope it works out, because it can be used for stars too!
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Planet Textures & Details

Post by FluffyFreak »

It should do, the only issues I have at the moment are that I suck at writing shaders and it brings even my nVidia 670 GTX too it's knees :D
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Planet Textures & Details

Post by FluffyFreak »

Last year I wrote a series of articles on the terrain generation, they're not brilliantly written but if anyone's interested in how Pioneers terrain system basically does it's rendering and LOD determination then they're a reasonable starting point:
Part 1: http://quantum-thoughts.net/?p=1379
Part 2: http://quantum-thoughts.net/?p=1388
Part 3: http://quantum-thoughts.net/?p=1408
yuyingchenk
Posts: 22
Joined: Wed Feb 05, 2014 3:50 pm

Re: Planet Textures & Details

Post by yuyingchenk »

It looks better when I set the multisampling value to *16,

But there is another issue, when I landing in a specific planet, I use manuall control to land, the strange thing is my ship is still "falling" under 0m !!! I try to persuade myself that my ship is under some "water", however, what I can see is just universe background ... It looks like I am falling in the universe ...
yuyingchenk
Posts: 22
Joined: Wed Feb 05, 2014 3:50 pm

Re: Planet Textures & Details

Post by yuyingchenk »

FluffyFreak wrote:Last year I wrote a series of articles on the terrain generation, they're not brilliantly written but if anyone's interested in how Pioneers terrain system basically does it's rendering and LOD determination then they're a reasonable starting point:
Part 1: http://quantum-thoughts.net/?p=1379
Part 2: http://quantum-thoughts.net/?p=1388
Part 3: http://quantum-thoughts.net/?p=1408
Very good articles, actually there are a lot of planets get very beautiful and reasonable terrain. I remember there is a planet in "New Hope" system, it gets mountains, basins, deserts, etc. Does this kind of planet use a different or pre-defined terrain generating mechanism or something like that ?
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Planet Textures & Details

Post by Luomu »

yuyingchenk wrote:Very good articles, actually there are a lot of planets get very beautiful and reasonable terrain. I remember there is a planet in "New Hope" system, it gets mountains, basins, deserts, etc. Does this kind of planet use a different or pre-defined terrain generating mechanism or something like that ?
Same generator, but manually picked input values. Epsilon Eridani is a custom system, the terrain parameters come from data/systems/01_epsilon_eridani.lua.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Planet Textures & Details

Post by FluffyFreak »

Since there's been some questions lately about terrain texturing etc.

Why use textures?
When Pioneer has an option called "Detail Textures" or somesuch which evidently causes some confusion amongst people since they think it means that Pioneer really does use textures.
Lets get this clear right now, _Pioneer doesn't use textures for the terrain_.
Instead when you tick the "Detail Textures" option Pioneer just runs the terrain generation down a few more levels of the quad-tree until you get lots and lots of tiny coloured triangles - I am not joking.
One reason to use textures is to avoid having to do this work. Lets say that we wanted pebbles in some area, right now you have to find some way of generating a pebble looking bunch of colours at just the right height/slope/etc. This uses noise which takes CPU time and when you're doing it on planetary scales can take an insane amount of processing. It's slow and means that as you try to move around you will see it generate the information on demand, you will see the detail "pop" into the scene.
Getting these generated noise based systems to look like the variety of things that you, pebbles in this case, is very tricky too and even if you do it just right for Pebbles, then what about stones, moss, grass, leaves, sand and on ad infinitum.

With textures you're trying to avoid all of that complexity and processing power requirement by just sticking a picture of the terrain type down instead. It doesn't need to be generated or processed it just needs to be selected from the options and this can be done in the shaders from a texture atlas.

If it's so simple why doesn't Pioneer use Textures? Because of our terrain generation algorithms. Usually when you have a terrain generation system based on noise you get the value back in the range 0 to 1, or -1 to 1, and this is easy to work with. If you want it mapping to the height of something you just mutliply it by whatever scale you want. Say you want a maximum height of 2000 metres, well whatever value you've got just multiply it by your 2000 and voila you have your final height.

That's not how Pioneers terrain algorithms work. Of course it isn't, how tired do I get having to say that line? Very.

Because we do things on a planetary scale someone long ago decided it would be better if the noise systems returned things scaled into that final format using double precision floating point values. Over time this has meant that people generate those value directly in the noise systems itself and now we've got a nasty mess that returns things in ranges like 0.0 to 0.00138125 or something insane. What's worse is that you can try scaling these back upto the 0 to 1 range using the radiious of the planet (which is involved in the scaling) but you then discover that those ranges? They're not normalised at all, you get values from 0 upto 16 in one case I tested! Because people have been working with these things using such tiny values for so long no-one noticed they had gone so awry!!!

So, texturing is desirable but difficult due to the legacy noise systems.

What's wrong with Noise?
Well aside from the above: Noise is random. Ah ha! So I think every world should be hand made eh? No. Random is not the same as Procedural.
The trouble is that people associate the two due to fractals and Perlin Noise by Ken Perlin. They're attractive to people because you through in some values and get something that looks kind-of-like terrain and you think: "Hey that's cool I can just use a tiny bit of maths and get this!". Your next thought is that you'll just use a bit more, and tweak something, and a bit more because it's getting closer to waht you want, then more, and more, and even more still. Always getting closer but in truth it never actually looks good enough.

Still you've persevered and you've now got ... well, Pioneers terrain. So you think great, I'd would like to add cities, towns, villages, harbours, roads, trees, grass, vegetation, underwater bits so where shall I put them. This is the bad bit, Noise is random so the only ay you can know where it might be suitable to place anything like that is to sample. You don't know where coastlines are because any point might be above or below water, you don't know until you sample it, all of it, to find the suitable places to put all of the things you want to place. You don't know what biome something is until you've sampled it, and all of the points around it to make sure that its not just a high point you've randomly hit to place a city into the sea!

If you want to do anything with this world you've now got to process it in detail to read back and create information about it all using yet more processing power and time. It's randomness also means that it's highly sensitive too it's inputs and whilst you'll often get good terrain out of it you might just as a likely get a spiky and unrealistic mess which can be almost impossible to smooth or fix in some post-process way.

This has stymied our attempts to redo cities (even just placing them is tricky!), add instanced objects/vegetation, and a hundred and one other bits and pieces because we just need to know things up front about the terrain before we can make decisions about what to do with it.

A better way:
I've proposed a better way before (http://pioneerspacesim.net/forum/viewto ... ?f=3&t=103) and it's something that I'm working towards but it's taking a long time to get there with everything else I work on too.
So yes it's getting there and it's not for a lack of knowledge on the subject just a matter of time.
Luomu
Posts: 58
Joined: Mon Jul 01, 2013 1:30 am

Re: Planet Textures & Details

Post by Luomu »

FluffyFreak wrote:When Pioneer has an option called "Detail Textures" or somesuch which evidently causes some confusion amongst people since they think it means that Pioneer really does use textures.
Calling it "Extra colour variation" would have saved some confusion :P
Post Reply