Progress in th C# GL Version of the planet

When I first started on porting the IUE Planetary Engine I tried to bridge the Gap between Open GL and Directx (XNA) by using a C# framework that enables me to use OpenGL.

Well the framework used is the Open Toolkit Library and is, like XNA, more than just a graphics framework. It has besides OpenGL support for input/music and AI. I mainly used it to see if the Geometry part of the porting is correct. And besides that it has some benefits over debugging a VC++ 6.0 application in an obsolete Visual Studio IDE and Visual C# Express 2010.

GL C# render

I’ve spent a week to see something in the viewport, but It didn’t. Than I suddenly found that the ViewMatrix was wrong (If something doesn’t render always look first at the ViewMatrix and than the world matrix).

Boom, a full planet showed up!! After fixing some input I could seamlessly zoom in and out of the planet at high framerates! So It’s a big step ahead into making this work….

Archived: Uncategorised

Planetary Engine II

Some updates on the planetary engine front.

Fixed a enormous amount of bugs and graphical artifacts.

  • Use TriangleList instead of TriangleStrips (they will be used for easier batching)
  • Fixed Matrix calculation and camera frustum calculation
  • Heigth calculation works correctly
  • Geometry looks correct with trianglelist

Some problems / things todo remain though

  • The shape still is oval
  • Rotating around the planet is not stable
  • No lighting/normals
  • No texturing
  • Rendering though VertexBuffers and IndexBuffers
  • Performance is bad because of the lack of buffers.
Archived: Uncategorised

TopoTablet for Ipad

Started creating a game for my ipad about one month ago. These screenies show some progress.

The game is loosely based on Topo for the C64. Oddly enough it’s created by C.Kramer, and my name is F.Kramer (what a strange coincidence). See Youtube for the gameplay.

The next is a screenie of topotablet game running on the DragonFire SDK Emulator. Because each build should be uploaded to the buildserver of Dragonfire this meant uploading around 15 mb every time I wanted to created a build. So I decided to make very lossly compressed images (and removed the detail) of the world map. Now each build is around 2Mb in size.

Heli animation is done. I want to create a crisp font for this game, but this is a lot of work (especially because there are no font editors avaiable).

The animation for the city is ready too. The only things remaining are a menu, game logic and a highscore table.

 

This is an artist impression of the app on an iPad (rendered). You can barely see the heli…

Archived: Uncategorised

Mentos the freshmaker

I have finally found enough time to look at some problems with the planetary engine I am working on.
One of them was the clipping of the parts of the planet. Some parts were shown when others were not.
The second was that there were more holes in the geometry than swiss cheese. This was because the geometry rendering was not correct.

Mentos planet

 

It should be very round to look like a planet, but It really looks like mentos candy right now. The above picture was ripped from my planetary engine and rendered in my favourite 3d program to really look at he geometry.

IMore holes in it than cheese

Above you can see a lot of geometry was missing. This was due to the amount of primitives I gave for the set of indices in DrawUserIndexPrimitives.If you are drawing Trianglestrips then you need to have two vertices to start the trianglestrip and after that 1 index for each triangle in the strip.It’s explained very clearly in Riemers article about it.

This is a screenshot from my planetary engine. It runs about 5 to 60 fps, so that’s not very stable.

Archived: Uncategorised

Procedural planet

am working on a planetary engine (a real time procedural planet engine) for use in my space simulator space engine shooter adventure.

The planet rendering code is ported from IUE

As you can see there is a lot to do:

  • Add texturing
  • Fix Gaps in the patches
  • Elevation data does not seem to get through
  • Fix all problems related to OpenGL porting to Directx (XNA)
  • Performance (now around 10 fps)
  • Camera movement and other rendering problems
  • A lot, lot more….

But for the first try to port this thing it’s actually a quite good result. I am also making a C# – OpenGL port to make the transition of the procedural geometry generation easier.

Archived: Uncategorised

Procedurally textured planets

Latest development is procedural planet textures.

The textures map seamlessly on a 3D sphere and the procedure to create them comes from this.

Ported some of this code to c# and created some examples of how they look:

Earth-like planet with a lot of water

Mars-like planet with a lot of ICE?

And this is how they look mapped on a sphere and with atmospheric scattering!!

The nice thing is that they look much better than photographs of existing planets.

And off course they can be generated in all different sizes and colours.

 

Archived: Uncategorised

Big milestone

A very big milestone. The Rock shader I was working on is finally complete.

With a lot of trial and error the triplanar bump mapping works togethers with the specular reflections. Lighting is now correct.

And I created a new skybox because it’s getting boring looking at the same sky over and over again.

Will release the hlsl shader soon….

Archived: Uncategorised

Look Ma – It’s shiny!!

Updated the procedural rock and awesome shader to create bumps on the rock and now finally it looks great.

The inspiration for this all was the opengl shader from Cave3d, a very inspirational google project that shows some fantastic graphics.

The porting to HLSL and the triplanar blending went well but the lighting and specularity were wrong (Due to wrong normals and blending problems).

Then I looked at the Cascades sample and looked at the triplanar texturing part. After that I had some specular artifacts (extreme white dots and flickering) and it looked just plain horrible.

But finally the last piece of the puzzle was found on Petrocket blog that used 6 texture samples to create the bump vector.

The shader on Petrocket calculates the normals in world-space but while that is good for static objects, this is not good for moving rocks (world transformed).

So I calculate the UV’s in object space and also the normals!!! With the increased sampling the normal vector is now reliable enough to give correct lighting and specularity.

I switched back to Lambert shading because this gives the best results (this was also used in the Cave3d shader.

Here are some pictures that speak for themselves:

You can see the triplanar blending if I render with RED, GREEN and BLUE components:

 

Archived: Uncategorised