I've seen something very similar in the game Cube from 2001 (and its later successor Cube 2: Sauerbraten from 2005). In that engine each vertex (as opposed to face) is edited at a time, allowing for very interesting and complex structures (But it can reproduce every shape that 'Sticky Cubes' can). Its also using octrees for very fast greedy meshing and a tiny (1m/512) voxel size.
I find it interesting that you could mess around using just voxels, but then you could make things like ramps and pillars and other more complex shapes without having to put in as much effort
One weakness I'm noticing seems to be that it is very difficult for players to accurately match the volumes (states between full block and no block) of different blocks. For example, if a player has destroyed a terrain block and wants to restore the terrain to how it was before, it may be very difficult to make the new block be the exact same volume as the blocks surrounding it. While building, it would also be very desirable to be able to match the volumes of different specific blocks, like, for example, making sure the slope of a roof is neat and consistent, or making sure 2 windows have the same bevel around the rim. One intuitive solution could be to restrict the volume of a block to, say, 4 distinct levels instead of a continuous transition between full volume and zero volume. While this would reduce the total smoothness of the game, I don't think it would affect the general visual feel of the game too much, while it would also make editing nearly as intuitive and precise as it would be with regular cubes. If the smooth transition is important, a less invasive solution could be some kind of "eyedropper" system that allows players to copy the volume of 1 block to another. Another middle-ground could be to keep natural world generation and most means of editing terrain limited to distinct block volume levels as described before, but allow players the option to smoothly edit the volumes of blocks through some specific tool if they please. At any rate, this proof of concept seems like a very clever and cohesive approach to making the world more complex than simple cubes.
Were I to expand upon this for a game design, I would want the option to add or remove from a cube by percentage increments. Say, 5% at a time at minimum, but can go as far as 100%. This would allow for much more consistency and control, and you could apply the same thing to mining so that you can make sure you remove the exact amount of blocks (including fractions) you intended to.
It would also be nice to be able to specify which faces of a block "stick" and which treat their surroundings as empty air. I'd give the player a handful of "templates" for selecting this, so they can apply those changes quickly and build efficiently. For example, setting all sides of a block to Unstick aside from the top and bottom would be great for making fences.
Very interesting! You could improve the visuals by using vertex colors instead of textures ie. brown for wood and grey for stone. This can help avoid problems with wonky UV's. You can take it even further by assigning roughness values to specific vertices for shininess. I'd suggest when modifying the sticky cubes to use integral values for easier alignment. Great work up to this point! I'm looking forward to seeing it progress
This is really neat. would love to see a minecraftlike survival game like this. It could add a lot of depth to resource management and building design. Eg maybe you would build a house with thinner walls to save resources but would would be more susceptible to explosions. Could also be adapted for water physics, so the total volume of water could be conserved while water flows between blocks. The ability to have multiple materials/“blocks” in a single voxel would lead to even more possibilities.
This looks amazing and is very great demo. Would be interesting to see if you added a hot bar with the different presets, how that would play out to build faster and much more intuitive. Then you select the type of another way, or vica versa, I just think there is a set number to things that look good, and you tweak them like you were to be more 'dynamic'! Set some level designers and builders would come up with some COOL designs. Then can collect 10.5 stone and be able to place 10 blocks and a half. I also notice you don't reverse the effect. If you take away 10% or something and go WOOPS, like a reverse key to add that % back to get to the previous state. LIKE a command pattern or some such. I FEEL this like an upgrade to the Everquest Next system, and those type of editing games.
camera cliping is not an issue when it is a first person game, collision is just handled by unity, those are not really issues that are diffucult to solve.
Very nice! It's kinda similar to "surface nets". Surface nets also produces one "block" per voxel, so it's easier to see what you're editing, but you can achieve complete smoothness with it. It's also really easy to implement and it's also fast. A combination of your algorithm and surface nets could be interesting, completely smooth terrain with blocks as building (because the downside of complete smoothness is the lack of complete blockyness. I assume it would be possible to achieve both with a customized frankeinstein method (I don't want to mention dual contouring, that's really hard to implement and is very slow in comparison)).
AFAIK surface nets and some implementations of dual contouring is the same. There is like 8 (or so) ways to do dual contouring and they changed names a couple of times.
Nice video. I think there was some kind of capenter mode for minecraft that would do something similar. Things you can improve in your furute videos: - Some very quiet background music - Sections - Change render distance of your game so it's less laggy Other than that it was very cool :)
I kinda feel like videos that arent polished tutorials but rather quick demos are fine without music of a lot of polish Video chapters would be good tho
It may be worth mixing blocks which are "soft" like this, with blocks which are "hard" like in a traditional building game. So bricks and wood and other refined materials work like normal, but soft blocks on the terrain or in the trees work like this.
@@Legit_SuperFall 7 Days to Die uses smoothed marching cubes, but only for terrain. It uses assets for building components and trees. When you "damage" a building block it doesn't change shape because it's a solid model asset. It may have changing textures or "stages" of decomposition, like the doors, where they have multiple stages of holes being broken into them. It just replaces the model with another model for each stage.
Awesome! If a game were to be based off-of this I would strongly encourage adding "sticking rules", for example that pillar you made extended towards the cliff wall once it was close enough, but maybe it could be so player-made wood doesn't stick to natural stone/dirt, many possiblities are opened by making sticking selective.
Looks very promising. If you would handle the reduction/smoothness of the different blocks in steps It would allow for a lot more control. If this already is the case than reduce the steps. I think just 4 steps are already enough: 4/4 block, 3/4 block, 2/4 block, 1/4 Block. It would probably also feel great with a pickaxe and chipping away at blocks in increments. Slowly 1/4 after 1/4. Roofs would also work way better because you would set all outer edges to 2/4 and they would create a perfect edge all around, that seamlessly connects
12 steps gives you the flexibility to reduce by 1/2, 1/3, 1/4 or 1/6. I dont think players would likely care about 1/12 steps but 12 gives a lot of flexibility in divisors.
and if you want to still show off the smoothness & continuity of transitions - move between discrete steps with a snappy n fast easing function like easeoutelastic
You could add special "air" blocks that don't collide with things but still deform the geometry. That way you can have sharp edges where you want them and still smooth the other sides of the block. A way to restore the block for fine editing would be nice as well.
I was also thinking about an "undo" to restore blocks. Something delta/time based. Also I was thinking of a "modifier key" style editing, where it snaps to the usual angles / geometry while a key is held down. Both these would make editing much more intuitive. TL;DR: Lots could be done with his engine/idea.
Wow, very clever and looks cool! Tbh I don't think marching cubes would ever have really worked for voxel games due to editing the terrain, but this looks like a neat alternative!
This is cool! I would definitely prefer to have the editing of cubes snap to increments like 0.75, 0.5, 0.25.. etc instead of a smooth 1-0, maybe e special tool that breaks it in increments? I could imagine it would help with building roofs without making it look so buldgy :)
the main issue with marching cubes is that the voxels become just points instead of volumes, the marching cubes kinda hug the dots and that makes it really hard edit and to assign textures, if i understand correctly in your implementation the texture is taken from the voxel/point at some constant cardinal direction, the sticky cubes solution seems wonderful, just needs some tweaking like having some sort of stepsize instead of the smooth change we see in the video
I'm not entirely certain on its' applications to games, as that's not a field of industry I've spent my life studying, I can certainly see its' applications to 3D low-poly modelling. You could place cubes in the rough shape you want, and then use the sculpting tool in order to refine it. This could expedite the 3D modelling industry significantly, as it allows for far more rapid prototypes to be created. This technology if further developed could sell really well!
I think that different smoothing groups - by terrain type - would help. For example: grass should be the smoothest (so requires extra smoothing or a better smoothing algorithm) and rock was plenty smooth enough using marching cubes / should be rough / hard edges. I wouldn’t smooth things like trees using marching cubes but use a custom smoothing pass just for them. Perhaps three smoothing / marching cubes passes: 1 for grass, snow etc, one for rock and one for trees and bushes (or use meshes for trees)? Just an idea…
@@10bokaj I mean, to update the Terrain object you would supply an array of densities and an array of materials, which is about the same amount of information you're controlling here. Note that Roblox Terrain V2 is not the same as individual bricks.
Low frequency radars can detect the presence of stealth aircraft, but they cannot precisely locate them sufficiently to guide a surface to air missile.
I think you should have 2 different commands to remove a block, one where you subtract the size of the cube and another where you remove the entire block immediately.
The smoothing is retarded if you don't have precise control of it try to put that feature on the mouse wheel to get more precise control such that your can smooth and unsmooth with a clicking turn of the mouse wheel also the smoothing should be in discrete steps such that you can repeatedly set the right smoothness/angle to each cube that you want to smooth. 🤔. Then the root won't look like as if a giant took a big on on your house anymore 😂
You have just created a better fundament building and generation system then minecraft ✨ CONGRATULATIONS my good sir a creating the StickyCubes system 🙏🔥
really cool, but it could really use some way of easily restoring blocks, would make building much faster because you could correct mistakes more easily
My idea for marching cubes is to have different levels of smoothness for different materials, for example grass and dirt and sand and gravel and the like can have the real smooth, stone could be the more chunky and building materials can or the trees can be the regular cubes so it doesn’t look broken idk if that is possible?
It seems to me like the biggest challenge for these sorts of smoothing is that minecraft proved "graphics" dont actually matter all that much, people have no problem with cubes, so a game that does something like this really needs to find unique gameplay involving the use of smoothness.
Blocks are very intiutive to work with and is easy to for the computer to handle. It is a great combination, but for terrain I think it falls a little short.
Have you taken a look at Cube 2: Sauerbraten editing? It subdivides cube sides into 8 so you can have some level of smoothness, and it also does multi level cubes within cubes, it uses an octree.
@@10bokaj I believe Sauerbraten uses a multi-direction heightmap, essentially each face of the cube stores four values (one for each vertex) describing how much the vertex should be pushed into the cube. It gives very good control over level geometry.
It looks interesting, maybe we should make some kind of generator or world editor? I also wonder if it is possible to make the blocks change their anti-aliasing a little by themselves without a serious loss of performance?
I don't even get convinced by the blocks, I was thinking more of a face/sheet style. And to make them, is putting info in the coodinate intead of on 8 at a time with blocks. Harder but I'll try as soon as I know how to use OpenGL. 8:01 I would recommend to add a less detailed smoothing. Add a iterations that make 15° variations in each step. I don't know if you get what I am trying to say.
It would be great to have a separate tool for deforming vs. destroying voxels. It would stuck to have dents all over your base from accidental clicks! Another feature that would be quite useful is the ability to extrude in an opposite manner of deforming, but without placing another voxel, so it's easier to fine tune what you want quickly. Lastly, there needs to be some kind of precision controls which allows you to deform very slowly, as I saw you struggling in the video :) A more advanced engine could allow the user finer control over each vertex, which would fix the small ramps at the bottom of the door frame but may be out of scope of this project. Good luck!
I think the nicest in-between would be to have a few different options. Primarily I would have a smooth state a cube state. By striking the smooth state you chip away the excess and reveal the cube shape. Optionally from there you could have some kind of block chiseling
Hmm i think you can get way more configuration capacity with a visible percentage of compression and also the capacity to modify corners individually, perhaps a scroll bar can help or a standarized smoothing algorithm that stops at 10-20-30-40-50% or something like that
This sounds more like an implementation of dual contouring. Which is great, dual contouring, aka Surface Nets is my favourite meshing algorithm! It's much simpler and more elegant than marching cubes. Minecraft is technically dual contouring, since the voxels are at the centres of the cubes instead of at the vertices. I could see a version of this built on top of dual contouring where the user has some form of explicit control for where the voxel centre is inside the cube as well as its "strength" being very intuitive and fun to use. The real challenge here is making an intuitive UI based around cube editing and then to compute the isosurface in a way that matches player expectations. I would try something like this: First, consider the general dual contouring algorithm. You find the points along the lattice's edges where the isosurface intersects it. If we let the user directly edit that, it should result in a very easy to use system. So for each vertex, store 6 numbers which can range from 0 to 0.5, corresponding to each of the 6 edges coming out of it, which set the intersection point along that edge from the voxel's centre. As the player breaks down the block from one side, pull back the intersection points at that side, or if the player is filling the block, increase them. This does let you have 2 intersection points per edge, but I think the regular dual contouring could be modified to handle it, you basically have cases where you create two faces per edge rather than one.
I use unities normal collision system, but if you are looking for a custom implementation I would do somthing like this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-U1I_1aZzomE.html
Man, wish i was able to make stuff like this. it would be cool to set it up with a item that will increase, decrease, or set the smoothness of a block.
@@10bokaj Just the way the blocks can be decreased and lowered in a concave or the opposite way by using tiles. It's the same way it works in older sims games, where the terrain is on a grid. I don't know anything about this game as RU-vid just recommended it to me, so I don't know the significance of it, it just reminds me of things I do know about.
That is not something explainable in a youtube comment, but there is a paper on it: findit.dtu.dk/en/catalog/63c898437c8c8d1c237bca77 I don't know if you can access it...
@@mambe4349 Let me says this: I use lookup tables, lots of them. It is not a good technique as it is now, maybe it could be good, but it has some issues as I pointed out.
@@10bokaj You probably have the publishing rights, so I'd suggest you publish your thesis openly elsewhere, too. (or does your university deserve these rights? Did it do the work? ^^)