Help - Search - Members - Calendar
Full Version: Geometricks
Game Maker Community > Games > Game Maker Creations > Tools & Applications
KC LC
I wrote this as a quick way to render 3D volumes and interesting shapes. Been playing with it long enough so figured I'd show an example. Normally I use POV-Ray, but it's more fun programming it in GM. I may make a version that allows user input.

Download: Here
1.5 Mb Zip file containing a GM7 executable. Displays in window, with full-screen option. No resolution changes.

Here's some screens (there are 12 total in the demonstration):

Mollusk shape based on modified torus/spiral


Trefoil knot


All the shapes are calculated from parametric equations and rendered with a d3d triangle mesh. If you're interested in some of the equations, here's a few. The other ones are pretty standard. If you want all of them, PM me.

The normals are calculated from the cross-product at each vertex so the lighting looks right. You can display the shapes as a standard mesh (in the style of Mathematica) or with a texture. The textures were made in POV-Ray and PaintShop.

My favorite volume is this "breather". You see these all over the web nowadays, so thought I'd make one too.


...and yes, there's an Easter Egg.
makerofthegames
Everyone knows GM can't render good 3D effects. snitch.gif
kake_fisk
I like all your 3D work.
And i found the easter egg by the way. smile.gif
MitchGraham
I'm certainly grateful for you sharing some of those equations with us. The lighting/reflection effects are great, the 3d rendering you have going on is beautiful.
Schyler
Nice shapes. Some are very interesting.
FB-Productions
Very nice. The easter egg is easy to find!
reigalius
Very cool as always. Nice easter egg by the way but its too easy to find.
zachTaylor
I download all your games for the easter eggs.
iluvfuz
Didn't particularly look for the easter egg, but I like use of mathematics in your programs.
~Dannyboy~
Brilliant, as always tongue.gif
PickleMan
This is very cool, I like the easter egg too...
Caniac
it seems to work now, and it is soo cool. (I am always fascinated with really cool 3d things.)
what is an easter egg? could somone fill me in on this (I know what one is, but not in this case)
daman123125
Very nice, and I found the easter egg(a bit hard to keep up with the ball). happy.gif

And Caniac, an easter egg for a game is like just a little surprise put in the game to make it a bit more interesting.
Drewdelz
Nice easter egg. lol
And very nice rendering. You ever going to put those skills into a full fledged game?
Caniac
@daman:
thanks for clueing me in wink1.gif ;P
so would the easter egg bee that ball and rope thingy? (if I wasn't supposedd to post that FEEL FREE to edit it out)
NickToony
QUOTE (Caniac @ May 13 2009, 12:16 PM) *
@daman:
thanks for clueing me in wink1.gif ;P
[SPOLIER]


You don't quite understand what is meant by 'Easter Egg', eh?

I downloaded this purely to find the easter egg :-P But the rendering behind it is fantastic.
Clarkyboy
Very nice, I've never really tried to make 3d things in GM, maybe I'll give it a go some time lol.
Smarty
A bit late to add to the chorus, but it's looking really sweet. You state you're using triangle meshes - how about if you create a model out of it? It could make the objects much smoother. It would also be nice to be able to manipulate the view freely with the mouse.
KC LC
QUOTE (Smarty)
A bit late to add to the chorus, but it's looking really sweet. You state you're using triangle meshes - how about if you create a model out of it? It could make the objects much smoother.

Thanks. I just realized I never replied to any of the posts in this topic.

Anyway, these are models, defined in a "CREATION" event. A set of nested FOR loops compute the [i,j] index for each 3D point. Then I pass that 3D[i,j] array to another script that computes the normals[i,j]. Then I define a model and use the vertex and normal arrays defined previously, i.e.,

CODE
d3d_model_vertex_normal_texture(name, vertices, normals, texture);

I re-use this model for each solid to conserve memory. The only statement in the DRAW event is the usual

CODE
d3d_model_draw(name,x,y,z,texture);

with a transform to rotate it.
The reason some of them aren't as smooth is because I've limited the number of vertices to conserve memory. Most of the 3D shapes use a 30x30 array (or close). The biggest is the breather surface that uses a 40x100 array.

QUOTE
It would also be nice to be able to manipulate the view freely with the mouse.

I know. I really need to do that.
DocDefect
I found and beat the easter egg happy.gif
JulianS
Awesome! Nice im impressed =D
dmitko
This is really nice. You are pretty good at maths.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.