2
\$\begingroup\$

Here are the graphics an artist did for me:

Grass 3D tile by Sipho

While the texture is nice when seen as image file, I think the tile is somewhat flat.

The problem is:

If he bevel the cube, then there will be tiling problems (not to mention seams between cubes). How can he make tile looks less flat?

If he make the 3D model to act like 2D isometric Tiles (which have very irregular outline) there will be so much polygons that will be a nightmare for him to model dozen of Tiles.

Of course keep in mind that for occluding reasons (each cube project 6 planes that are used to occlude hidden geometry) the overall shape should be actually bigger than a cube volume, but not smaller (anyway I can loose the height requirement, cubes can be made of any height).

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Maybe a normal map and/or height map for those textures could help? (if your engine can do that) \$\endgroup\$
    – Philipp
    Commented Dec 21, 2016 at 12:08
  • \$\begingroup\$ That's unity so it can, but I'm not speaking of that, even enabling normals and using the physically based shaders does not help to much (even worse: using advanced shaders makes things looks very ugly) in helping those looking not flat, when I look at other games even when using Tiles they don't look so much flat, but I don't understand what these Tiles are missing \$\endgroup\$ Commented Dec 21, 2016 at 12:16
  • 1
    \$\begingroup\$ Note that normal/height maps are special textures which must be designed by an artist to look good. Enabling these features with an inappropriate texture will lead to weird results. When you could think of other games which apparently solved this better, then a comparison image could help. \$\endgroup\$
    – Philipp
    Commented Dec 21, 2016 at 12:36
  • 2
    \$\begingroup\$ It looks like those textures were possibly created at high resolution with fine detailing which just blurs together when viewed with a minification filter? You need some coarser detail with higher contrast added; this is really a problem that's best solved by modifying the source data; in other words the textures themselves. \$\endgroup\$ Commented Dec 21, 2016 at 12:41
  • \$\begingroup\$ Yay the artist did the normal textures, infact If I use his textures on Unity terrain, they look good, it's just the tile shape that has something wrong :/. The current filter is anisotropic x 16. \$\endgroup\$ Commented Dec 21, 2016 at 12:48

3 Answers 3

4
\$\begingroup\$

Usually to render a large quantity of gird aligned cubes is to use a method known as "Marching cubes".

Note: the main alternative is to use ray casting and voxels (point cloud data), which is less common in video games, however it is the standard in medical imaging. See also: A Fast Voxel Traversal Algorithm for Ray Tracing.

You will see "Marching cubes" come up often when people talk about improving the performance of "voxels". The idea is that you will be iterating over the array of cubes and merging them into a single mesh in such way that hidden faces are removed, and also merges co-planar adjacent faces.

However, what I have described so far is simply Meshing.


Marching cubes (no quotes this time) goes a step further. In a similar way to how you can pick a tile from a tilemap based on its neighbors (Autotiling), Marching cubes will pick polygons depending on the neighbor cubes.

See also Combinations for tiling two textures together.

The original paper on Marching Cubes describes 15 configurations:

Marching Cubes configurations

For each cube, you will pick a mesh from these configurations using a lookup table based on what vertices are hidden or visible. Since each cube has eight vertices, we have 256 entries on the table, which are reduced to the ones above by considering symmetries.

See Marching Cubes Animation | Algorithms Visualized.

See also Nvidia GPU Gems 3 - Chapter 1.

You do not have to use the same set of cases as described here. Hopefully you can see how you could edit this to match what you want.


Finally, if we do Marching cubes minus the Meshing, you would not be merging the cubes into a single mesh... instead you would simply identify what vertices are hidden and what vertices are visible and pick/modify the meshes depending on that.

Wait, that is what you are doing. Huh.

\$\endgroup\$
1
\$\begingroup\$

Seems I finally found a solution on my own. It is still not perfect, but looks much better! :) If you have further suggestions I'm open to everything. Basically on corners I need to "decorate" with additional geometry corners that are still part of a cube but with different normals.

enter image description here

I think it is actually more performant than correcting normal maps and to remove seams I just have to remove the "decoration" around the cube faces. Still I'm a bit in hunger with blender for having to resort to this trick instead of manually placing my normals (I could have used a shape different from a cube instead of trickin the smooth shading).

\$\endgroup\$
1
  • \$\begingroup\$ I actually have evolved the Whole thing to keep into account texturing and other subtle details. If anyone interested I can edit later when I finished this. \$\endgroup\$ Commented Dec 27, 2016 at 17:10
1
\$\begingroup\$

You don't need that extra geometry to apply a bevel effect via normal map. Just bake the normals of a high-res beveled cube to a simple cube in Blender (free software). There are many tutorials for this on Youtube.

I don't think it will look incredibly realistic but it will not look worse than what you have with more geometry, and require only 6 faces.

\$\endgroup\$
1
  • \$\begingroup\$ super cool idea. somehow forgot about that \$\endgroup\$ Commented Jul 13, 2020 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .