Jump to content


Photo

Geometricks


  • Please log in to reply
22 replies to this topic

#1 KC LC

KC LC

    Ex-Administrator

  • GMC Elder
  • 5309 posts

Posted 07 May 2009 - 08:25 PM

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
Posted Image

Trefoil knot
Posted Image

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.
Posted Image

...and yes, there's an Easter Egg.
  • 0
Geometricks 3D Rendering Demo / In Silico 3D Kinematics Simulation
Warped Space 3D Gravity Simulation / Surface Explorer Animated Surface Demo
Oscilloscope Animated Lissajous Figures

Featured Games at YoYo: Drop in the Bucket, Tut's Test(3rd place competition winner)

Older games at: Flying Banjo Games

#2 makerofthegames

makerofthegames

    My last custom title

  • GMC Member
  • 7629 posts
  • Version:GM:Studio

Posted 07 May 2009 - 08:34 PM

Everyone knows GM can't render good 3D effects. :D
  • 0

#3 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 07 May 2009 - 10:31 PM

I like all your 3D work.
And i found the easter egg by the way. :D
  • 0

#4 MitchGraham

MitchGraham

    GMC Member

  • Banned Users
  • 524 posts

Posted 07 May 2009 - 11:12 PM

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.

#5 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2680 posts
  • Version:GM:Studio

Posted 08 May 2009 - 01:40 AM

Nice shapes. Some are very interesting.
  • 0

#6 FB-Productions

FB-Productions

    The Ultimate Company

  • GMC Member
  • 530 posts
  • Version:Unknown

Posted 09 May 2009 - 10:59 AM

Very nice. The easter egg is easy to find!
  • 0

//Setting the variables (CREATE EVENT)
global.FB-Productions = "AWESOME!!";
-------------------------------
//Testing people's kindness (STEP EVENT)
if global.FB-Productions = "AWESOME!!"
with(obj_rep_up.png) event_perform(ev_mouse,ev_left_press);
else
global.FB-Productions = "SAD!!";


#7 reigalius

reigalius

    Generally Awesome

  • New Member
  • 1170 posts

Posted 09 May 2009 - 04:24 PM

Very cool as always. Nice easter egg by the way but its too easy to find.
  • 0

#8 zachTaylor

zachTaylor

    GMC Member

  • New Member
  • 329 posts

Posted 10 May 2009 - 12:18 AM

I download all your games for the easter eggs.
  • 0
Posted ImagePosted Image

#9 iluvfuz

iluvfuz

    GMC Member

  • GMC Member
  • 1452 posts
  • Version:GM:Studio

Posted 10 May 2009 - 01:19 AM

Didn't particularly look for the easter egg, but I like use of mathematics in your programs.
  • 0

#10 ~Dannyboy~

~Dannyboy~

    ~hoqhuue(|~

  • GMC Member
  • 2144 posts
  • Version:GM8

Posted 11 May 2009 - 10:53 AM

Brilliant, as always :D
  • 0

I cannot comprehend how intelligent people who spend much of their time designing and creating graphics, audio and code
refuse to believe that they themselves must have been designed and created.

Table Soccer | Yet Another Pacman | Astroblobs | GM Credits | GM Lego NXT | My Site

Posted Image


#11 PickleMan

PickleMan

    Programmer

  • New Member
  • 995 posts
  • Version:Unknown

Posted 11 May 2009 - 11:07 PM

This is very cool, I like the easter egg too...
  • 0

#12 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 11 May 2009 - 11:25 PM

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)

Edited by Caniac, 11 May 2009 - 11:26 PM.

  • 0

#13 daman123125

daman123125

    AZN Game Programmer

  • GMC Member
  • 1957 posts
  • Version:GM8

Posted 11 May 2009 - 11:32 PM

Very nice, and I found the easter egg(a bit hard to keep up with the ball). :blink:

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.

Edited by daman123125, 11 May 2009 - 11:33 PM.

  • 0
Posted ImagePosted Image
Posted ImagePosted Image

Tuts/Examples: Ultimate Weapon Arsenal(AI included) | Wall-Jumping | Plasma Pistol/Rifle Overheating System | Cash Register Example | Two Objects In One View
PM me if one or more of my posted examples have a broken link.

#14 Drewdelz

Drewdelz

    GMC Member

  • GMC Member
  • 1056 posts

Posted 13 May 2009 - 10:00 AM

Nice easter egg. lol
And very nice rendering. You ever going to put those skills into a full fledged game?
  • 0

#15 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 13 May 2009 - 11:27 AM

@daman:
thanks for clueing me in :D ;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)
  • 0

#16 NickToony

NickToony

    GMC Member

  • New Member
  • 463 posts

Posted 13 May 2009 - 02:29 PM

@daman:
thanks for clueing me in :D ;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.
  • 0

There's nothing quite like a bit of Prison Break

#17 Clarkyboy

Clarkyboy

    GMC Member

  • GMC Member
  • 899 posts
  • Version:Unknown

Posted 18 May 2009 - 11:54 AM

Very nice, I've never really tried to make 3d things in GM, maybe I'll give it a go some time lol.
  • 0

Acid  :)


#18 Smarty

Smarty

    GMC Member

  • GMC Elder
  • 7522 posts
  • Version:GM:Studio

Posted 07 June 2009 - 10:50 PM

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.
  • 0

#19 KC LC

KC LC

    Ex-Administrator

  • GMC Elder
  • 5309 posts

Posted 09 June 2009 - 01:37 PM

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.,

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

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.

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

I know. I really need to do that.
  • 0
Geometricks 3D Rendering Demo / In Silico 3D Kinematics Simulation
Warped Space 3D Gravity Simulation / Surface Explorer Animated Surface Demo
Oscilloscope Animated Lissajous Figures

Featured Games at YoYo: Drop in the Bucket, Tut's Test(3rd place competition winner)

Older games at: Flying Banjo Games

#20 DocDefect

DocDefect

    GMC Member

  • New Member
  • 27 posts

Posted 11 June 2009 - 01:53 AM

I found and beat the easter egg :)
  • 0

#21 JulianS

JulianS

    GMC Member

  • New Member
  • 407 posts

Posted 13 June 2009 - 03:09 AM

Awesome! Nice im impressed =D
  • 0
"Life is a wild ride, Buy a helmet"~ Zack Spartz~
If you will be laughing on December 22 2012, put this in your sig.
Please come see my platform example!
click the linky~




#22 dmitko

dmitko

    GMC Member

  • GMC Member
  • 1013 posts
  • Version:Unknown

Posted 13 August 2009 - 10:37 AM

This is really nice. You are pretty good at maths.
  • 0
Posted Image Posted Image Posted Image Posted Image Posted Image

Currently working on Project Funky 3D

#23 icicle.flame

icicle.flame

    CyntaxGames

  • New Member
  • 283 posts

Posted 18 July 2010 - 09:23 PM

Another amazing 3d rendering KC LC, but I could not, for the life of me, find your easter egg this time, ussually I can find them in the first 5 mins but this one... Anyways, you ever think about releasing the source code of some of these?
~IF~
  • 0


:Secret Weapon (secret game):
:Programming: [][][][][][][][][][]
:Spriting: [][][][][][][][][][]
:Storyline: [][][][][][][][][][]
:Sounds: [][][][][][][][][][]

:Awsomeness:[][][][][][][][][][]

Posted Image .