Marching Cubes

User projects written in or related to FreeBASIC.
Gunslinger
Posts: 35
Joined: Mar 08, 2016 19:10

Marching Cubes

Postby Gunslinger » Aug 25, 2019 23:28

I came across a term called Marching Cubes on youtube somewhere.
He pointed me to this source http://paulbourke.net/geometry/polygonise/
So i tested my freebasic skills and made this from it.
With the help of the nice openB3D lib it was not so hard.

http://ac1.servegame.com:88/Screens/Screenshot05.png
http://ac1.servegame.com:88/Screens/Screenshot06.png

Code: Select all

http://ac1.servegame.com:88/download/MarchingCubesBeta.zip

Tell me what you think of it.

Things to do
- Improve is light smoothing at vertex points
- Marching Cubes special case check.
- Add detail resolution option
- Optimize speed
angros47
Posts: 1539
Joined: Jun 21, 2005 19:04

Re: Marching Cubes

Postby angros47 » Aug 26, 2019 0:09

Nicely done. Since you use OpenB3D, you may like to know that it supports Marching Cubes rendering, and it uses it for metaballs, and for isosurfaces (they can be defined with an array, or with a function pointer)

OpenB3D uses a variant of marching cubes that allows to change level of details according to the distance from camera, to reduce rendering time

Here is an example:
https://freebasic.net/forum/viewtopic.php?f=7&t=24013&p=212124
UEZ
Posts: 341
Joined: May 05, 2017 19:59
Location: Germany

Re: Marching Cubes

Postby UEZ » Aug 26, 2019 17:03

@Gunslinger: looks very nice. Thanks for sharing.
BasicCoder2
Posts: 3404
Joined: Jan 01, 2009 7:03

Re: Marching Cubes

Postby BasicCoder2 » Aug 27, 2019 0:14

Gunslinger wrote:Tell me what you think of it.

Looks good. Moving about is a bit slow? Couldn't see any marching cubes.
Gunslinger
Posts: 35
Joined: Mar 08, 2016 19:10

Re: Marching Cubes

Postby Gunslinger » Aug 27, 2019 8:18

BasicCoder2 wrote:
Gunslinger wrote:Tell me what you think of it.

Looks good. Moving about is a bit slow? Couldn't see any marching cubes.

what is your fps in window title?
BasicCoder2
Posts: 3404
Joined: Jan 01, 2009 7:03

Re: Marching Cubes

Postby BasicCoder2 » Aug 27, 2019 10:20

There is no window it is full screen so I can't see the fps in the window title.
When I say slow I should have asked can the speed be changed by changing some increment or decrement somewhere?
Gunslinger
Posts: 35
Joined: Mar 08, 2016 19:10

Re: Marching Cubes

Postby Gunslinger » Aug 27, 2019 15:44

BasicCoder2 wrote:There is no window it is full screen so I can't see the fps in the window title.
When I say slow I should have asked can the speed be changed by changing some increment or decrement somewhere?

No there is no setting for speed i just feel like show it as it is
If you get 60 fps it is still kind of slow. you can modify the code to your one likes :)

In mean while i keep working on this project, when i got something better i post it again.
I already know what whats the first game i'm going to make from it. ^^

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 3 guests