Home
Products
Community
Manuals
Contact
Login or Signup

Planet Creator

Miscellaneous Forums/Blitz Showcase/Planet Creator

Krischan(Posted 1+ years ago) #1
I present you a small milestone of my current project (won't go into details here but it has something to do with Starflight), a dynamic planet texture/surface generator done in Blitz3D. It is roughly based on my Blue Marble code and could be part of a space game in the future.

I only use a preset style for a planet type with some parameters which can be quite random, blend two basemaps out of 51 predefined source heightmaps together, add some scaled fast perlin noise, emboss the final heightmap and apply a color gradient to it - so a whole planet with a 1024x512 detailed texture gets calculated below a second (on my 3 year old laptop). The source maps are classified in crater, dry, gas, ice, molten, plate and rock to get different planet types.

And then you get something like that, still in development but looking nice at this point:

14 different planet type presets screenshots


Maps output sample, here for the "Ganymede" preset


CURRENT RELEASE



The available keyboard shortcuts are listed here:

[A] Atmosphere on/off
[G] Planet Glow on/off
[S] Fake Shader on/off
[R] Rings on/off
[N] Nightside on/off
[T] Colormap on/off
[C] Clouds on/off
[M] Shadowmask on/off
[W] Wireframe on/off
[H] change Noise source (Perlin preset / Diamond)
[D] DOT3 Normalmap on/off
[V] Cloud Shadows on/off
[1] LOD Level 2048x1024
[2] LOD Level 1024x512
[3] LOD Level 512x256
[SPACE] Generate new planet
[RETURN] Save all maps to output Folder

Arrows/Mouse to move around, Mousewheel zooms

Download: PlanetCreatorDemo.exe [7.8MB 7zip SFX]

Last edited 1+ years ago


OldNESJunkie(Posted 1+ years ago) #2
Wow, that looks REALLY good.


stayne(Posted 1+ years ago) #3
Always a treat seeing your space stuff Christian. I would love to see a game from you. If you ever need music, I would love to contribute.

Your efforts are always greatly appreciated and I am sure I am not the only envious person here!

Last edited 1+ years ago


slenkar(Posted 1+ years ago) #4
velly niccceeee

ME LIKE ME LIKE


Yue(Posted 1+ years ago) #5
It is incredible, every time I see what you do, I realize that the problem is not Blitz3D, or if not tools that I have no talent =)


ZJP(Posted 1+ years ago) #6
Wooooo. Nice tool Krischan. As usual..


Adam Novagen(Posted 1+ years ago) #7
You, Krischan, have my utmost respect in this project :D


EdzUp[GD](Posted 1+ years ago) #8
Excellent would love to see the code to this as this sort of thing interests me greatly :)

Inspires me to have a go at resurrecting star flight 2000 :)


Steve Elliott(Posted 1+ years ago) #9
Cool :D


Ross C(Posted 1+ years ago) #10
Always a pleasure to see your stuff man!


Aymes(Posted 1+ years ago) #11
Wow, those are awesome!

Are you going to release this for others to use, or keeping it for your own projects only?


Krischan(Posted 1+ years ago) #12
@all: thanks, I hoped that you all like it but now i'm astounded. You've seen absolutely nothing of it ;-)

Aymes: Well, it is not finished and I'm perfectionist. But at this stage it could be used as a texture generator for fictional planets. I think I'll release it when I found all nasty bugs on my list and commented the source.

With Saturn as my favourite planet, here is another screenshot (now with planetary shadow on the rings). Oh and by the way, this is B3D realtime ingame graphics using 2048x1024 source maps and calculated in 2.3 seconds, I hope your screen is wide enough :-D



Last edited 1+ years ago


Yue(Posted 1+ years ago) #13
oO??? I Like Moon, But your planet Saturn will be my screensaver XD.


RemiD(Posted 1+ years ago) #14
You are really a talented coder Krischan. Respect :)

Is this for a Freelancer-like game with the possibility to land and to mine on each planet ?


Krischan(Posted 1+ years ago) #15
I'm looking forward to a Starflight 1 like game. This would be the perspective before you land on the planet. Here some updates in Wallpaper size, I added citylights/nightsides texture creation on the fly and tweaked every planet in a few hours or so. And I added a complete INI-System to tweak the planet types very easy.

With these additions it is possible to create Coruscant-like planets, glowing molten planets and I could even finish my first Death star (this is the same sphere like all planets, it is only a texture!) Oh and all of this is still vanilla Blitz3D :-D

You can create planets and destroy them in a second again, heh! Now witness the firepower of this fully ARMED and OPERATIONAL battle station! Luke... help me take this mask off.

Arid world with super advanced cities


Advanced Temperate World


Molten Planet, glowing on the nightside


Jupiter like Gas Giant


Saturn, my favourite


Death Star "Krischan 1" ready to rumble


Last edited 1+ years ago


EdzUp[GD](Posted 1+ years ago) #16
nice :D


slenkar(Posted 1+ years ago) #17
star wars video game HD version :)


jfk EO-11110(Posted 1+ years ago) #18
looks great, hats off.


stayne(Posted 1+ years ago) #19
jfk: Krischan is ahead of you in sig apps :)


Krischan(Posted 1+ years ago) #20
Stayne: but only with tech demos :o) By the way:

I've been making a lot of progress the last days converting and moving over to MiniB3D. I created a small executable demo for the audience showing a peaceful Temperate world: Teaatis (the name gets created random using the original Elite algorithm :o). In the first run the App converts the four included 2048x1024 RAW basemaps to smaller LOD levels. Then you should get something like this:



In this demo you can use these keys to switch some effects on/off:

[A] Atmosphere on/off
[G] Planet Glow on/off
[S] Fake Shader on/off
[R] Rings on/off
[N] Nightside on/off
[T] Colormap on/off
[C] Clouds on/off
[M] Shadowmask on/off
[W] Wireframe on/off
[H] change Noise source (Perlin preset / Diamond)

[1] LOD Level 2048x1024
[2] LOD Level 1024x512
[3] LOD Level 512x256

Use your mouse to move around the planet and the Mousewheel to Zoom in/out, Arrows Left/right turns the Planet and Up/Down moves towards or away, SPACE creates the next random world. And with [RETURN] all 10 maps are saved as PNGs to a "output/" folder: Noisemap, Heightmap, Embossmap, Climatemap, Normalmap, Merged Colormap, Pure Colormap, Nightmap, Ringmap and a Screenshot.

Grab it here: demo.zip [6.3MB]

You can open the RAW Basemaps in Photoshop or another Paint program, load them with 2048x1024 size, 1 channel (not interleaved) 8bits, no header. This is only a small part of the maps I created/converted the last weeks. My 2048 maps folder has 53 hires base maps with a total size of 108MB now capable of creating 20 different planet styles now.

I'll plan to release the full project with source as soon as I've created all the features I want to see, which can take some time. Oh and I would like to know how FAST the planet gets calculated in 2048/1024/512 LOD mode on your computer. To compare: start the App, press 1/2/3 and read the ms values from the top line. My records are 2541/631/165ms (C2D P9500 at 2.53GHz).

Last edited 1+ years ago


Kittomer(Posted 1+ years ago) #21
Oh, I hope you'll have good progress with this, I always wanted to make a game like Planet's Edge.

When I start the demo, something weird happens. I mostly just see a static background of stars and sometimes the planet, but the moving/turning planet is sort of... flickering in erratically.

Although I did manage to read the values, which are about 2700, 700 and 180 on my secondary desktop, which is a Celeron E3400, 2,6 Ghz, 4 GB RAM and a Geforce GTX 260, on Vista 64 Bit.


Krischan(Posted 1+ years ago) #22
Edit: Found the Bug and updated the package, there was one flip too much :-D Download and try it again please.

Last edited 1+ years ago


Guy Fawkes(Posted 1+ years ago) #23
Are u releasing the source for this? :O


Krischan(Posted 1+ years ago) #24
I forgot to mention: the final release will include a license agreement that people who repetitive don't read my posts and ask me questions that are already answered in these posts are not allowed to use the source and its results or parts of it in private, commercial or whatever projects for all times.


Ross C(Posted 1+ years ago) #25
In otherwords, Post 11.


GaryV(Posted 1+ years ago) #26
I forgot to mention: the final release will include a license agreement that people who repetitive don't read my posts and ask me questions that are already answered in these posts are not allowed to use the source and its results or parts of it in private, commercial or whatever projects for all times.


Could you also add a clause that such people are not allowed to reproduce?


slenkar(Posted 1+ years ago) #27
you could give the planets an atmosphere by creating an inverted sphere and scaling it up slightly bigger than the planet, then give the sphere an alpha value of about .3


Kittomer(Posted 1+ years ago) #28
Yes, that fixed it, the planet is properly turning and displaying now!


Krischan(Posted 1+ years ago) #29
slenkar, my Atmosphere code is a little bit more complex than a sphere and uses a spherical projection texture loaded with flag 64. The atmosphere moves with the camera and disappers softly on the nightside, like in reality but faked very well :-D





Last edited 1+ years ago


Yue(Posted 1+ years ago) #30


=)


Krischan(Posted 1+ years ago) #31
> you could give the planets an atmosphere by creating an inverted sphere and scaling it up slightly bigger than the planet, then give the sphere an alpha value of about .3

EXCELLENT. I tried it out and it looks even better, more realistic. I didn't need the invertion. It uses a much simpler code, I can save a mesh update per cycle, it has only a few more tris instead and most important: I save the Entityorder -1 which could cause trouble later. Thanks! I'll use your solution now, here you can see it in action:





Last edited 1+ years ago


EdzUp[GD](Posted 1+ years ago) #32
very nice


slenkar(Posted 1+ years ago) #33
looks good


Krischan(Posted 1+ years ago) #34
And now for something completely different: I changed the large images in this post here to thumbnailed links so the thread should load much faster now.


taumel(Posted 1+ years ago) #35
Cool, makes me want a new ELITE even more. For a couple of planet surfaces it seems to work pretty well, how about more of them (100s-10000s)? Does it still a good job then or will you notice that it's based on predefined source material?


Krischan(Posted 1+ years ago) #36
Taumel, this depends on the quality/variance of the sourcemaps and how "featured" they are and how many different basemaps are available. I spent several days to collect them, examine, blend with other maps and finetune their brightness/contrast. This has been very hard work and I have chosen the 5 best maps of each category.

Some basemaps look very neutral and the blended noisemap will make them very random as a result, some have features you can't blend off and then all the planets using this featured basemap will have this feature. But it is a feature that they have features so they look more interesting. And I don't care about 10000 different planets, perhaps 100 or 1000 planets in a game (and that's alot). You can't get this surface quality in realtime or you must preprocess ALL planets and this not realistic and takes too much filespace.

With 5 basemaps per category (ex. crater, rock, desert) you'll get a lot of combinations and the random noisemap makes them pseudorandom so they would look similar but unique. And we have at least 15 different and mostly unique planet styles, you could use a single seed for a whole solar system but all planets would look completely different as the styles are mixed in a system:

Arid, Desert, Temperate, Frozen, Icy Moon, Brown Dwarf, Jupiter, Mars, Molten, Neptune, Ocean, Saturn, Uranus, Venus, Acid

By the way - I implemented normal mapped clouds now, see the difference (upper half = DOT3 clouds, lower half = normal) :-D



Last edited 1+ years ago


taumel(Posted 1+ years ago) #37
Hmm, so i guess if you're after a lots of planets the best still is to feed some Fibonacci like unique ids for parameters of a procedural generation for a planet which you just calculate before entering a system.


Kittomer(Posted 1+ years ago) #38
If you wanted to go full monty, you could add cloud shadows, like so:



It adds a lot of depth and touchy-feeliness to the planets, especially up close.


Krischan(Posted 1+ years ago) #39
I don't reach the texture resolution in your screenshot and I don't have any shaders
working but with an additional sphere and the inverted, slightly lightened cloudtexture we'll have simple but nice cloud "shadows" now:





Last edited 1+ years ago


Krischan(Posted 1+ years ago) #40
Ok here we go for a snapshot of my current workfolder including the executable, all BMX sources, textures and the basemaps for the temperate world shown here. The source is partly commented and includes some functions which are not in use right now. But you can take a look how the planet is generated and play around with it. I hope it works with the standard MiniB3D 0.53 mod with the current BlitzMax release, didn't test it with a clean install. This is not the final release which will include all basemaps and templates for different worlds.

Notice: the DOT3 effect could be based on wrong angle calculations, if you're familiar with DOT3 calculations (I'm not) please take a look into it and correct it. And if you have ideas for general improvement please post them (and the source) here in this thread.



As a reminder, the available keyboard shortcuts are listed here again:

[A] Atmosphere on/off
[G] Planet Glow on/off
[S] Fake Shader on/off
[R] Rings on/off
[N] Nightside on/off
[T] Colormap on/off
[C] Clouds on/off
[M] Shadowmask on/off
[W] Wireframe on/off
[H] change Noise source (Perlin preset / Diamond)
[D] DOT3 Normalmap on/off
[V] Cloud Shadows on/off
[1] LOD Level 2048x1024
[2] LOD Level 1024x512
[3] LOD Level 512x256
[SPACE] Generate new planet
[RETURN] Save all maps to output Folder

Arrows/Mouse to move around, Mousewheel zooms

Download: PlanetCreatorDemo.exe [7.8MB 7zip SFX]

Last edited 1+ years ago


Kittomer(Posted 1+ years ago) #41
Yeah, I know, the image was just for illustration.

I was thinking you'd do it with an additional sphere.

But it looks good, I like it!


Armitage 1982(Posted 1+ years ago) #42
Awesome details !


Krischan(Posted 1+ years ago) #43
I'm making progress in object oriented design (and finetuning the planets). Now, a planet gets created using a custom "TPlanet" type and attributes are added very easy to it. In the screenshot, the Temperate world is the default with presets and Mars gets created with this simple piece of code (Venus, too with slightly changed variables):

Local p2:TPlanet=New TPlanet
p2.PlanetPalette="Mars"
p2.Clouds="clouds2"
p2.PolarCaps=0.01
p2.PolarAlbedo=192
p2.Population=0.0
p2.Detail1=64
p2.AtmoRGBA=[255,128,64,128]
p2.GlowRGBA=[255,192,64,255]
p2.CloudsRGBA=[255,96,32,100]
p2.CloudShadowRGBA=[0,0,0,100]
p2.NightRGB=[8,4,0]
p2.Shininess=0.0
p2.Generate()

You see three times the same planet heightmap only with different attributes applied, woohoo:



As a bonus, Mars from a different angle:



Last edited 1+ years ago


cws [retired](Posted 1+ years ago) #44
Jaw dropping amaizing creation! :O


Wiebo(Posted 1+ years ago) #45
beautiful!!


Steve Elliott(Posted 1+ years ago) #46
Stunning.


wmaass(Posted 1+ years ago) #47
Looks amazing. Krischan you are the natural environment guru.


Yue(Posted 1+ years ago) #48


Beatifulll =).


Blitzplotter(Posted 1+ years ago) #49
Verrry nice eye candy


OldNESJunkie(Posted 1+ years ago) #50
Wow, this just gets better & better. Keep it up.


Armitage 1982(Posted 1+ years ago) #51
Crispy !

Did you generate the Nebula too !? Another nice addition if not :)
While different, I am amazed by the resemblance with solar system planets.
Great work.

I have no idea about your space simulation game, but I would love to land on them and discover generated landscapes. Procedural is really a powerful thing.

Last edited 1+ years ago


Krischan(Posted 1+ years ago) #52
The nebula: yes, take a look at my signature, it's an older creation. It is only combined with a real panorama of the milkyway in this version.

Planet Creator is pseudo-procedural only, you can't get these results with procedural algorithms only in a acceptable time, so it is a compromise. My goal is to create a whole planet in a second, and even that is a long time.

Here are two current screenshots, I added detail texture support now to greatly improve the appearance of some planet types even with low LOD details: