MathMod-10 - for all the math enthusists out there... 🙂

Example: Cayley_2 made with “my” marching cubes controller


Have any of you already dealt with marching cubes?

I would like to build such a game where you can change landscapes dynamically. I have no idea how the mathematical function for the marching cube renderer looks like.

I have already found on the web that some people use 2D perlin noise to make 3D perlin noise, but how can I remove or add certain “noises” in specific places?

1 Like

@Pryme8 is our marching cube expert

Thanks Deltakosh thanks for calling the right person. :slight_smile:

Here I have prepared a code so far. I use a lookup table for a three dimensional space. It returns a 1 if there is a space particle in the x,y,z coordinate otherwise a 0.

First I want to have a flat floor on which i can model my landscape.

This loop should actually set the respective points,
but the result is a stage for a rock group! :smiley: … far away from being flat.


1 Like

okay guyes, I’d like to set my new target to that level:

Every hand is welcome. The source code will be open.

Interesting, this is similar to @nasimiasl’s GeometryBuilder

1 Like

How are you tracking your cells? Basically you just need to be able to assign a texture to a certain area and then sample to manipulate your noises.

Basically handle everything like voxels and then lerp between values on your pseudo 3d texture. So you need to first come up with how to sample the volumetric texture and then you need to figure out how to assign them to specific regions. See if Rollercoaster world or Zoo World that whole franchise has any information on how they did their landscapes. I assume you want kinda the same system.

Just remeber its the same as any sort of volumetric rendering you are just wrapping it in a shell.

the demo you just showed I bet they are using 3d textures, and have prebaked “stamp” tools to fill in their texture buffers. Then they have a bunch of secondary systems going for physics and it even looks like some spring and weight calculations of the indices. Honestly that is quite a demo.

Thank you Pryme8 I am going to meditate about your thoughts in the next days I am off the keyboard.

Have a nice “Pfingsten” (happy pentecost) to all!

2020-05-30 08_40_15-Window

Exactly what we work on it fully web based and live enable in the BABYLON Extensions


Another nice web app with javascript for CAD:

1 Like