How to make a Tovel like cube (edge smooth?)
Hi, i'm trying make a voxel game.
and i'm no idea on how to make a cube like this one
what i do now is create a cube in scene and change the color, but how could i make the cube look like more smooth?
also like the second image, you can see the tree (purple part) is made by 3 cube,
so if i made a cube prefab which have a smooth edge( in mesh) , when i use that cube to build the tree , there should be some groove between each cube .
apparently that's not right.
so any idea how to do it?
thanks
smoothing edges is called beveling in 3D modelling tools. Unless you want to write a shader somehow clamping the surface normal on most parts of the surface, creating one in a modelling tool is the way to go.
and sadly I don't understand your groovy part since I'm no native speaker.
Hi, thanks for reply. i'm also not a native speaker :(
i aslo found the technology use in $$anonymous$$agicVoxel.
Normal Cube
if i just use the cube(in unity) and change the color , i will get the same result in Unity.
RE:Rounded Edges
this is the result i want to achieve, same as Trove.
RG:Rounded Grids
this is the groovy part i was mention. and i think if i use the right shader or normal map, will achieve this result. but this is not what i want.
also i found out some relate topic , but i don't know how to use it in Unity. Link1 Link2
I don't think it's possible for cubes to be rounded on their cluster edges without knowledge of each other. I think this is going to be a lot of work getting this done programmatically if you want that as a general behaviour throughout your game.
Answer by peter226 · Mar 19, 2019 at 06:31 PM
You could calculate smooth normals for the mesh, but input them as vertex colors, and use a gradient to shift between that and the original normals. Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv, but this I don't recommend, simply for it's complexity.
Answer by Danixadem · Aug 28, 2020 at 10:58 PM
"Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv" That is what I'm trying to do for my own project. But I must ask if it is any different than entering UV coordinates for albedo texture. Because built-in materials does not provide any sprite-sheet functionality for normal maps.,"Or another way is to create a normal atlas texture with all possible normal combinations based on neighbour cubes for faces, and make a script figure out which part of it to use and input it as uv" that's what exactly I need to achieve for my project. Any ideas how to do that?
It's the same as normal UV mapping, just use the second UV buffer if you also need textures, and keep in $$anonymous$$d that if you use filtering on your atlas texture you need to give each texture part a larger area (safezone) to avoid different parts blending together / bleeding into eachother. I'm not sure how to select the proper UV and also do it fast. You could look up the 16 cube "solidity" states surrounding the current mesh face, store them in a "short" value and use it as an index in an array, but this seems a bit slow to me, you could try to implement this and make it BurstCompile-able to get some usable results.