Originally Posted By: HeelX
Originally Posted By: Slin
I didnīt know what I was doing at first, its quite crappy and everything, but after far too much time here you go: https://www.shadertoy.com/view/4sBGDh
Thank you very much! But I still don't know how this can be done in Gamestudio and how it works in general. Where do you generate the geometry?

You do not generate Geometry, you just have a funtion that maps a 3d Coordinate to a distance. This function defines the shape of you geometry.

Using this function you can have a ray march through space by checking the distance function on its current position you know how far you can progress. If you get for example a distance of 10 you that within 10 units of you current position there is a surface.
Then you also know you can advance 10 units without hitting anything.
Then you recheck you distance funtion. If the surface was in the direction of your ray the distance might now get close to 0. If it wasnt it might get bigger.
That way you can trace out very efficiently your geometry based on simple distance functions.

Once you get the hang of it you can do very cool stuff with as seen on the Website Slin posted.
Also you get Shadows and AO pretty much for free.
Maybe counterintuitive Texturing is also not that big of a deal.

EDIT: You can look up some standard distance functions here:
here

The biggest problem I see for the gamestudio is because the whole geometry is kinda procedurally generated on the graphics card you would have to somehow communicate your level in a new way to the graphics card, as you just rely on some basic shapes rather than models based on polygons.
Maybe Slin knows a little bit more about that than I do.

EDIT2:
On distance field shadows

Last edited by Puppeteer; 12/10/13 09:48.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com