Voxel scaling

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Voxel scaling

by MirceaKitsune » Sun Jun 01, 2014 15:58

This was discussed in the past, and is a feature I'm actively interested in. Since I don't remember a forum thread to exist, I'm making one to discuss if and how it can be brought to reality.

Would it be possible to implement a setting that allows scaling blocks / voxels to sizes smaller than the default 1 x 1 x 1 meters, as an option games could use? The setting would be a power of two to avoid breaking the grid. So 2 = 0.5m, 4 = 0.25m, and so on... the default value being 1 which is current behavior.

Apart from being able to build things of a higher resolution, like stairs and slabs being constructed directly out of blocks rather than being crafted, smoother terrain (that can be climbed by walking on it) would be another lovely feature. Twice smaller voxels might also be enough to allow directly building new structures altogether... like window and door frames, poles, flower pots (that you can put anything in), discrete peepholes in walls (through which you can safely look outside from your base) and much more.

To be clear from the start, I'm not encouraging irrational use of small voxels! Such as scaling them down 100 times to behave like atoms, given that no computer capable of processing so much data will exist for a few more decades. My idea is indented for scaling voxels down to half their current size, or at best to a quarter if someone really wants to go that far. In my game, I'll go for half-sized voxels if this happens to get implemented.

In regard to technical issues, I can imagine a few, but nothing we can't overcome. First of all, considering storage limitations are probably involved, scaling down voxels would likely make the world size smaller too... depending whether the total number of points that can be stored is possible to increase. Next, the mapgens will have to be aware of smaller voxels, so they still generate landscapes and caves of correct proportions rather than miniature ones. I'm also not sure if tinier voxels would make digging a bit harder, due to individual blocks being harder to aim at... though if this isn't abused the blocks should remain easy to select. Other details would need to be given attention too... such as what the best chunk size for smaller voxels is, keeping the flowing speed of fluids the same, possibly scaling cloud resolution to match block geometry, and more things I might have missed.

Still, I don't see why this would be difficult or a bad thing to add. I totally support it, and I think it's an ability anyone would at least want to try out! What do you think, and how / when could we go for implementing it?
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Voxel scaling

by RHR » Sun Jun 01, 2014 16:29

stu's micronode mod has this behavior:
https://github.com/stujones11/micronode
(can't find the forum thread)

by default you have 1/5 nodes, but you can change it in micronode.conf to 1/2 if you want
--> MICRONODE_BLOCKS_PER_VERTEX = 2 (line 4)
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: Voxel scaling

by webdesigner97 » Sun Jun 01, 2014 19:43

This is a feature I also thought about some weeks ago. Imagine a gamemode where you are an ant in a minetest world :D
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Voxel scaling

by Inocudom » Sun Jun 01, 2014 19:47

I think Minetest would have to have its graphics based on octrees in order for that to happen effectively.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: Voxel scaling

by MirceaKitsune » Sun Jun 01, 2014 20:06

I discussed this on IRC. Other developers and users raised two points, which I thought to reply to here as well;

First was that this is already doable with the current Lua API and settings. A small part of it would be: The player's eye offset can now be set, while the player's movement speed can also be adjusted. This would allow making the player a giant in order to decrease perceived voxel size. But there's at least two problems with that:

- First and foremost, two essential player settings are still hard coded and cannot be changed in Lua: Bounding box size and step height. I'm already militating to allow the box property used on Lua entities to work for players too, because my Creatures mod badly needs that as well. The step height must also be turned into a setting, so you can define up to which point walking into a block lets the player climb on it like a stair... this one is easy.

- Unless the mapgen understands the new voxel size, the world is generated in the same way. Meaning smaller mountains or miniature caves. In some cases, the player might also not be able to enter said caves in this case. It is however possible that Mapgen V7 might allow specifying landscape sizes as well as the height / width of cave tunnels, which would correct this problem. hmmmm would know best, or maybe someone else can elaborate?

The second concern discussed was how this would affect performance. Indeed, half-sized voxels would mean drawing 4 times more blocks. There's two evils to choose from; The first is to let that happen, which means 4 times less FPS for the client and 4 times more chunks to keep active for the server. The second is to also have the draw distance scale down, meaning everything will look dull and foggy. I guess it's up to each server and / or client to decide which is best... but regardless, I believe the feature itself should exist.

RHR wrote:stu's micronode mod has this behavior:
https://github.com/stujones11/micronode
(can't find the forum thread)

by default you have 1/5 nodes, but you can change it in micronode.conf to 1/2 if you want
--> MICRONODE_BLOCKS_PER_VERTEX = 2 (line 4)


Interesting mod. I tried it out, but IMO it only works as experiment at best. Considering that each micro block is a Lua entity and not an actual node, which could never be used to build and generate an actual world.
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38

Re: Voxel scaling

by spootonium » Wed Jun 11, 2014 05:16

Since the advent of half-slab terrain (q.v.) and moreblocks (q.v.) the scaled-down kind of voxel scaling has become somewhat moot. I must say though that the idea of a scaled-up voxel world, as suggested by webdesigner97 does have significant potential.

+0.5, I guess?
I write code. Sometimes, it even works.
 

spillz
Member
 
Posts: 138
Joined: Thu Feb 13, 2014 05:11

Re: Voxel scaling

by spillz » Wed Jun 11, 2014 11:14

It's 8 times as many nodes (and blocks) for a half size block at the same draw distance (albeit usually only 4 times as many will be visible). And 64 times for a quarter size block (16 times visible). Minetest already struggles to deliver a smooth framerate.

I think the best you could do without completely killing performance would be to divide only some nodes or some blocks in particular areas

Another trick would be to collapse distant terrain to a simpler version. People use this trick to draw more distant terrain but you could use it for shrinking voxels too (show the smaller voxels that you are close too and larger ones further out). But that is pretty challenging to implement. This interesting blog post discusses some of the challenges:

http://www.sea-of-memes.com/LetsCode28/LetsCode28.html
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Voxel scaling

by Wuzzy » Sun Jun 15, 2014 20:57

I don’t see how anything of this is new. I am sure you can already do this with nodeboxes.
Just define node_box with type of fixed and put one box definition in it. Since you can use whatever coordinates you wish, you can as well scale—indirectly. The scaling stuff could be done by higher level Lua programming, if you really wish to have a convenient function (or something like that) for it.

Edit: Forgot just everything I wrote. I now understand you want to set the voxel size GLOBALLY.
Then my question is: Why?
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: Voxel scaling

by MirceaKitsune » Sun Jun 15, 2014 22:32

Wuzzy wrote:Edit: Forgot just everything I wrote. I now understand you want to set the voxel size GLOBALLY.
Then my question is: Why?


The same reason why a photo taken at 12MP is better than a photo taken at 4MP: Higher quality. But of course, an image of 12 megapixels is larger than one of 4, which is why sometimes you might not want to go as far as 12.

Same idea here in a sense. Some games could use smaller voxels for higher quality terrain (also climbable at <= 0.5 size), create more objects directly out of blocks, etc. But only up to a certain point, as smaller voxels mean a lot more to process and much lower performance. Hope that explains it well enough.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Voxel scaling

by Krock » Mon Jun 16, 2014 10:54

MirceaKitsune wrote:The same reason why a photo taken at 12MP is better than a photo taken at 4MP: Higher quality. But of course, an image of 12 megapixels is larger than one of 4, which is why sometimes you might not want to go as far as 12.

The quality in % is worse on 12 MP images than with 4. Reason: The microchips need to process more pixels in a shorter time, this can cause fails in some parts of the image. If you shoot now a 4 MP image instead of an 12 MP, it sould give you a better quality in %, compeared with 12 MP.
</offtopic>
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Voxel scaling

by Inocudom » Mon Jun 16, 2014 13:21

I know of a good topic in the Freeminer forums:
http://forum.freeminer.org/threads/indeed-voxlap-engine.138/
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Voxel scaling

by Wuzzy » Tue Jun 17, 2014 17:02

OK, I now understand the proposal, thanks.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 2 guests

cron