Page 1 of 1
Modeling Spherical World in Voxels

Posted:
Wed May 22, 2013 03:00
by shaneroach
Has anyone seen, heard, or thought of the issue of voxels as they would pertain to modeling spherical worlds? I assume the voxel would have to be a dodecahedron.
I'm not actively lobbying for this as a feature btw. I just think it is an intriguing idea and if anyone in the community has seen or heard anything about the concept. If this is the wrong forum section, my apologies, and please move it where it goes. =)

Posted:
Wed May 22, 2013 04:42
by paramat
Dodecahedrons dont tile in 3D though as far as i know.
Related to this ... when i released moonlet mod Traxie21 asked if they could be more rounded, and i know how to generate in Minetest (with 3D perlin noise) a large roughly spherical world which has hills on it's surface, it's a quick and easy mod i might do for fun.

Posted:
Wed May 22, 2013 04:55
by 12Me21
paramat wrote:Dodecahedrons dont tile in 3D though as far as i know.
Related to this ... when i released moonlet mod Traxie21 asked if they could be more rounded, and i know how to generate in Minetest (with 3D perlin noise) a large roughly spherical world which has hills on it's surface, it's a quick and easy mod i might do for fun.
Would it be possible for gravity to work correctly, though?

Posted:
Wed May 22, 2013 04:57
by shaneroach
paramat wrote:Dodecahedrons dont tile in 3D though as far as i know.
Related to this ... when i released moonlet mod Traxie21 asked if they could be more rounded, and i know how to generate in Minetest (with 3D perlin noise) a large roughly spherical world which has hills on it's surface, it's a quick and easy mod i might do for fun.
You're right. I guess the "truncated octohedron" is the way to go, assuming that can be shoehorned into the concept of voxels.
http://met.iisc.ernet.in/~lord/webfiles/clusters/andreini.pdfOr how were you planning on doing it? I'd definitely be interested. Have any idea how you'd implement gravity? So there's still up and down...?

Posted:
Wed May 22, 2013 05:21
by paramat
No the gravity can't change to be perpendicular to the surface :) i mean just something similar to my moonlets but spherical ... you'll see soon when i write the mod.

Posted:
Wed May 22, 2013 13:02
by shaneroach
paramat wrote:No the gravity can't change to be perpendicular to the surface :) i mean just something similar to my moonlets but spherical ... you'll see soon when i write the mod.
Coool.

Posted:
Wed May 22, 2013 20:46
by paramat
Okay i wrote this during breakfast this morning. Fly and teleport to 8 1000 8 (top of the sphere) and a 1km lumpy spherical sandstone shell should generate, it may take a few minutes for the first chunks to appear, sorry the generation is slow, up to 1 minute per chunk, this is unavoidable when generating huge structures with LUA. I'm testing it now no images yet, i'm gonna walk to the equator and fall off ...

Posted:
Wed May 22, 2013 23:35
by paramat
Okay don't bother with the first version, just a boring sandstone shell, here's the next with 3 layers: dirt, stone and unbreakable slith. Somehow using default stone triggers mapgen to spawn trees on it which is a very cool bug i hope they don't fix. It's still very shallow though just a few nodes.

Posted:
Thu May 23, 2013 04:00
by shaneroach
I guess I did it right. Just added it to mods and made a new world. I can't seem to jump off the edge. I just get blocked.
How are you getting those cool screen shots? Flying way far away or something?
This looks like it is basically a big, hollow hill though, not something like a planet that someone could circumnavigate, right?
paramat wrote:
^ The boring 1 km sandstone prototype, i walked to the equator and fell off.

^ Looks like core mapgen added 1 or 2 nodes of dirt as well as trees.

Posted:
Thu May 23, 2013 08:56
by paramat
Those screenshots are of partially generated spheres, they take a long time to generate, especially a 1km diameter one. If you generate the whole thing you do indeed get a complete hollow sphere with 3 shells of materials inside each other, it doesn't have to be hollow, that's just to speed up generation. Parameter SRAD is the sphere radius, CENX/Y/Z are the co-ordinates of the centre. A really big 16km diameter sphere would be centre co-ords 8 8000 8, radius = 8000.
Looks better with a fourth layer of dirt with grass like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local noise1off = noise1 + offset
if noise1off >= 0 and noise1off < 0.05 then
env:add_node({x=x,y=y,z=z},{name="default:dirt_with_grass"})
elseif noise1off >= 0.05 and noise1off < 0.1 then
env:add_node({x=x,y=y,z=z},{name="default:dirt"})
elseif noise1off >= 0.1 and noise1off < 0.3 then
env:add_node({x=x,y=y,z=z},{name="default:stone"})
elseif noise1off >= 0.3 and noise1off < 0.4 then
env:add_node({x=x,y=y,z=z},{name="spherelet:slith"})
end

Posted:
Thu May 23, 2013 09:53
by jojoa1997
Nice. Maybe opu could put all your mods into one mod pack and see how generation goes.

Posted:
Sun May 26, 2013 01:46
by paramat
Thanks. Thats a good idea since i have a balanced set of 5 now, 2 up with landup and meru, 2 down with chasm and fissure, and 1 surface river mod.

Posted:
Sun May 26, 2013 01:53
by shaneroach
I dunno how gravity is implemented in Minetest, but it seems to me that however down is defined, you could just alter it to be defined as toward whatever coordinate is the center of the sphere. Voxels as large in comparison to the character as they are in Minetest become problematic I suppose, and no doubt adding voxels in order to change the ratio enough so that "down" works in any sensible way with the graphics might be a resource hog, but the problem of gravity in and of itself shouldn't be such a big deal?
This is why I keep going back to thinking those truncated octahedrons are ideal. They sort of approximate a sphere themselves, and the multiple faces would allow for graphics that can alter when down shifts subtly from one face to the next as you move along while still maintaining a large sized voxel in relation to the character.

Posted:
Sun May 26, 2013 12:49
by nomohakon
Planning to build Death Star?

Posted:
Sun May 26, 2013 14:50
by Inocudom
You are very good at what you do, paramat. Small moons like that have the potential to make the sky world a much more interesting place.

Posted:
Sun May 26, 2013 17:16
by mauvebic
I know you couldn't screenshot an entire spherical map (30km diameter) but im still curious what the surface would look like :p

Posted:
Sun May 26, 2013 18:16
by shaneroach
paramat wrote:
256m diameter and solid, filled with lava, generates surprisingly quick in 0.4.6, within 1 minute per chunk ... ha yes quick for my mods. Will release as a mod soon, perhaps add ores and fissure caves, a pool of water on top ...
I
>>>LOVE<<<
those screen shots.
Look at the SHADOW on the land beneath.
Oh that is just so cool.

Posted:
Mon May 27, 2013 16:25
by tinoesroho
... fan-tas-tic! For some reason, I'm reminded of Super Mario Galaxy-
-"let's a-go!"

Posted:
Mon May 27, 2013 22:57
by paramat
Caves and ores next then i'll release it then you can try out anything up to a 16 km radius.
That's no moon.
In the Minetest universe moons are cubic.

Posted:
Tue May 28, 2013 00:14
by shaneroach
Yeah, well... in the Minetest universe the habitable world is an infinite plane, the sky a firmament from whence the sun and moon spring fully formed over and over again, and the subterranean world an infinite mass extending ever downward into infinity.
Sooooo... may as well call floating spheres a moon. ;-P
I still think your mod is purdy though.

Posted:
Tue May 28, 2013 06:25
by paramat
shaneroach wrote:This is why I keep going back to thinking those truncated octahedrons are ideal.
That would be a fresh and interesting voxel system, might have a crystalline character to it with all those facets. Seems to me it might be difficult to build vertical and horizontal structures that are always parallel or perpendicular to gravity ... but it would be possible with a world which is itself a truncated octahedron with 14 faces and only 14 different directions of gravity ... then the large scale structure matches the voxel shape.


Posted:
Tue May 28, 2013 06:47
by paramat
Just seen that 'patterns' non-cubic voxel sandbox game now has octahedron planetoids:
http://www.youtube.com/watch?v=n4yX8AceeJA

Posted:
Tue May 28, 2013 12:38
by shaneroach
paramat wrote:shaneroach wrote:This is why I keep going back to thinking those truncated octahedrons are ideal.
That would be a fresh and interesting voxel system, might have a crystalline character to it with all those facets. Seems to me it might be difficult to build vertical and horizontal structures that are always parallel or perpendicular to gravity ... but it would be possible with a world which is itself a truncated octahedron with 14 faces and only 14 different directions of gravity ... then the large scale structure matches the voxel shape.
Hmm... Gravity seams. That might be a pain.
I had never heard of "Patterns". Looks cool. Might have to find some vids on YouTube or something. Meh. Doesn't support linux.