Quinta-feira, 11.10.12

A couple of years ago I began writing an OpenGL engine to draw planetary terrain scenes. I was using real topography and it worked great, except for the tremendous amount of data that was needed for convincing detail.

 

I decided to reboot this project and get a bit more ambitious. I am now using fractal noise for planet terrains and pseudo-random numbers to generate entire planetary systems. A single number now determines the number of stars, planets, asteroids and comets, along with each one of the seeds to use for them. Each of these seeds decides whether there is geological activity and, therefore, magnetic fields to protect an atmosphere, whether there is liquid water, the main gases that make up each atmosphere (for coloring purposes), whether a planet should have rings andmoons and the characteristics of each of these moons. This seed also generates orbital plane inclination, polar axis inclination from orbital plane and more.

 

This is now a mini-verse generator. I am currently testing with two planetary systems. They are about one light year apart. Each of them has two planets with a variable number of moons.

 

It is looking great and I hope I can come up with some sort of compelling game logic to turn this into something that others may find pleasure in using.

Coming up: solar halo, mass coronal ejections, sun/god rays, motion blur, lens flaring and procedural galaxy generation along with a star field to use as a background for the entire scene.

 

Here are some screenshots of the current version of this engine.

 



publicado por ghint às 17:02 | link do post | comentar

Segunda-feira, 19.09.11

And with accurate physics!

 



publicado por ghint às 15:42 | link do post | comentar

Sexta-feira, 29.04.11

I've been busy refactoring the entire scenegraph to fix a few fatal crashes on tile allocation and recursive releases. All good and stable now, so the next two items on the to-do list are:

 

1 - Floating origin, as in camera always at 0,0,0 and everything else moves. Will fix all my coordinate precision problems

2 - Water mesh and bathimetric data merge with dataset. All i have right now are bathy masks used to draw specular effects on water. I really need ocean floor topography at the same res as the terrain.

 

--

 

3 - At this point, everything should be set to begin coding a few physics models.

4 - POI database. Specify visualization categories (objects, shapes, whatnot) as nodes of the scenegraph

5 - Start a community site, release the whole thing, beg for contributions for game logic

 

Just a shot of the current state (for future ref/compare with water mesh scenes

 



publicado por ghint às 18:18 | link do post | comentar

Terça-feira, 08.02.11

Just a quick post regarding the datasets i'm using. Due to popular request, here it goes.

 

Earth:

Topography

Blue Marble Next Generation (latitudes -90 to -60, 60 to 90)

NASA JPL Shuttle Radar Topography Mission (v4.1 gap filled by CGIAR CSI: Consultative Group for International Agriculture Research)

Normals: Sobel filter + GPU real time from topographic data above

Textures: Blue Marble Next Generation (pick a month)

Specular: Blue Marble Next Generation Bathymetric set

 

Mars

Topography: Mars Orbiter Laser Altimeter

Normals: Sobel filter + GPU real time from topographic data above

Textures: Mariner Orbiter (lost reference to data)

 

Will process data for the Moon from JAXA soon.



publicado por ghint às 10:30 | link do post | comentar

Domingo, 30.01.11

Rewriting scene manager. I was using a hierarchic tile cache which forced me to keep unused high LOD tiles in memory and preventing proper recursive releases. While I was at it, i decided to "burn" a whole new texture set for Mars... Looking good.

 



publicado por ghint às 16:36 | link do post | comentar

Terça-feira, 21.12.10

And there you go. Martian eye candy!

 



publicado por ghint às 20:09 | link do post | comentar

Segunda-feira, 20.12.10

Finally, here it is! Note the following:

 

1 - Both planets are artificially shaded (no textures, just for test purposes)

2 - Drawing order still causes glitches with atmospheric alpha channel

3 - Mons Olympus is over 20Km high :)

4 - Mars is orbiting the Earth at a distance of twice the sum of their radii

5 - Still need to convert solar system orbital dynamics to 3d

6 - I'm shading Mars as if it had an atmosphere exactly like Earth's

 

Enjoy:)

 

 

 



publicado por ghint às 20:37 | link do post | comentar

Segunda-feira, 13.12.10

Here's a preview of what a Martian cubemap face looks like. This one contains Mons Olympus.

 

Altitudes are signed 16bit integers coded into red/green channels of an image.

 

 

Normals are 3-component vectors with each component mapped to a color in the image.

 

 

Of course there aren't to scale. Each cubeface holds about 3GB of data.



publicado por ghint às 12:53 | link do post | comentar

Domingo, 12.12.10

The data for the Moon and Mars are finally done. I've generated a couple of topo and normal maps which will feed the cubemap for each of these bodies.

Of course none of this is of any use unless the positions of all three (four if you count the Sun) are correctly estimated and everything is drawn in it's right place.

 

 

Since i had no way of testing this in GL because of frustum culling and z-buffer precision problems, i hacked together a mini solar system in Cococa/Obj-c. It all looks great now so I'll start rewriting some positioning code. Ideally, all objects are part of a hierarchical node tree and all positions are relative to the self center. This allows us to continuously push/pop the GL matrix stack and position everything. It also allows us to shift our coordinate system's center to the nearest node to fend off floating-point precision problems.

 

Get ready for some interplanetary tripping!

 

All positioning code is based off: http://www.stjarnhimlen.se/comp/ppcomp.html



publicado por ghint às 17:55 | link do post | comentar

Segunda-feira, 06.12.10

Mental note to self: Don't wait forever for the result of an occlusion query on OpenGL 3.3, linux and on Quadro NVS boards. You'll just enter an infinite loop.



publicado por ghint às 20:10 | link do post | comentar

mais sobre mim
Outubro 2012
Dom
Seg
Ter
Qua
Qui
Sex
Sab

1
2
3
4
5
6

7
8
9
10
12
13

14
15
16
17
18
19
20

21
22
23
24
25
26
27

28
29
30
31


posts recentes

Reboot

Objects are back

Status update

Datasets

Better Scene Management

Mars from Earth's Atmosph...

Mars

Sample Mars Data

Solar System

Occlusion Queries

arquivos

Outubro 2012

Setembro 2011

Abril 2011

Fevereiro 2011

Janeiro 2011

Dezembro 2010

Novembro 2010

tags

codebits project presentation

tws objects models gravity planet earth

tws planet terrain opengl procedural det

todas as tags

favoritos

URUBU Linux Autonomous Un...

as minhas fotos
blogs SAPO
subscrever feeds