Jump to content

Geometry


KingSlayerGM

Recommended Posts

Hello folks, im new here.

 

Love the game, love the concept, love what devs are doing, love what devs aim to do!

There is something that has been bugging me for days tho.

 

How do you fill the spherical surface of a planet with cubes? this is geometrically impossible. please tell me how you put cubic voxels in a sphere, im dying to know that! XD

 

Thanks and keep up the good work

 

KingSlayerGM

Link to comment
Share on other sites

Hello folks, im new here.

 

Love the game, love the concept, love what devs are doing, love what devs aim to do!

There is something that has been bugging me for days tho.

 

How do you fill the spherical surface of a planet with cubes? this is geometrically impossible. please tell me how you put cubic voxels in a sphere, im dying to know that! XD

 

Thanks and keep up the good work

 

KingSlayerGM

... the planets are made by voxels (blocks) and then they are smoothened around the edges to give off the spherical look of a planet. If you are wondering why you can't tell the difference, I'm afraid you'll have to spend time researching how game engines handle gravity points and local physics grids.

 

In other words, magic.

Link to comment
Share on other sites

Making a sphere out of cubes isn't really a problem, so much as it is a problem of smoothing them to give the impression of being truly spherical. 

 

So here's some articles that might help answer that part of the question:

 

This one is the defacto answer when it comes to this topic, but it may very well go over most people's heads - http://www.cc.gatech.edu/~bader/COURSES/GATECH/CSE6140-Fall2007/papers/LC87.pdf 

 

https://en.wikipedia.org/wiki/Marching_cubes

http://www.cs.carleton.edu/cs_comps/0405/shape/marching_cubes.html

 

https://0fps.net/2012/07/10/smooth-voxel-terrain-part-1/

https://0fps.net/2012/07/12/smooth-voxel-terrain-part-2/

 

If you like source code, this page might help too:

 

http://paulbourke.net/geometry/polygonise/

 

 

And finally, because reading about the topic can be unintuitive without some visuals, here is a demonstration of marching cubes:

 

Link to comment
Share on other sites

OK guys, im afraid my questions wasn't clear enough. Lemme try to reformulate for you.

I am not asking how a cubes smoothed. I am asking:

 

how is a spherical planet filled with cubes? (sorry for bad drawing skills)

 

like this?

Untitled.png

 

or perhaps like this?

Untitled1.png

 

Hope this time its clear,

 

thanks guys

Link to comment
Share on other sites

 

How about this? a planet, or an object is composed of billions of voxels (Volumetric Pixels = tiny cubes), all oriented along same axis (there isnt rotation in the voxel), the size of a little peeble, from far you see it smooth, but from very close with a magnifier you ll apreciate the pixel structure

Thats how we later on will be able to paint objects, by only changing to color of the voxels on the surface of this object, so basicly if u cut your object after painting it, the sliced section will be orginial color/texture of used voxel

 

at the end i think what is computed are only the surface voxels, the trillion billion voxel within a planet might be empty

 

found a video where u can cleary see how voxels could look like, cause here they re pretty big

its like a 3d object out of a 3d printer

 

 

watch begining, and last few 10 seconds

Link to comment
Share on other sites

a voxel is just a point and they are normally arranged in a grid so the easiest way to show and connect them is using cubes (also lets us use less of them to fill more space) but the way they are connected doesn't really matter so they can show up as a cube or a sphere or whatever other random shape you can think of. Think more like a bunch of junk on your floor and you spread a bed sheet on top of it. It can look smooth but take off the bed sheet and you can see that its not (I probably didn't explain it that well but meh)

Link to comment
Share on other sites

ok, yamamushi's picture looks reasonable.. but there is a problem!

you wont be able to build a tower diagonally:

Untitled.png

 

i actually can, but it will look like shit..... and it wont be possible to have flat floors....

 

 

what do you say guys now?

 

haha! you sneaky hobbit

Link to comment
Share on other sites

I've heard the term voxel means volumeric-pixel. Yes everything is grid based. To obtain a spherical shape you would fill in the necessary cubes to get a rough shape, then partially fill in others to give it a rounded look. It becomes a perspective thing really. 

 

Your diagonal tower is possible.

 

ok, yamamushi's picture looks reasonable.. but there is a problem!

you wont be able to build a tower diagonally:

Untitled.png

 

i actually can, but it will look like shit..... and it wont be possible to have flat floors....

 

 

what do you say guys now?

in this drawing, 3 cubes are fully filled, and 8 of them are half filled(or partially in a 3d aspect). It gives the look of a tower, whilst still being part of the grid. It would also allow for flat floors, which is why voxels can only be so small. It would mean a "plane" would fill certain parts of cubes giving the look you are looking for.

 

Think of voxels as a volume of something, not just a block or sphere. This is what allows anti-voxels, or a shape made of air.

 

This video helped me understand voxels a little better: https://www.youtube.com/watch?v=gbh6MjXkuxk

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...