I started wondering if it was somehow possible to have cubes with rounded corners, which make them appear to be more realistic.
For anyone not knowing what I am looking for, see the blender docs here:
However, we have some constraints:
We are showing a scene that potentially has a lot of cubes (could be thousands) which have a bunch of different standard materials on them.
As the material count is very limited and the amount of different geometry is as well, we are making excessive use of mesh instancing. We are basically caching meshes by keys constructed from shape type + material ID, normalize the stored shapes (so their bounding boxes are always 1x1x1) and then we instance them and use scaling to get them to appear in the size according to the data requirements.
I wrote those details to make clear that creating an actually beveled cube is probably not an option, because scaling it will scale its bevel, too and that may lead to absolutely undesireable visual effects (e. g. the bevel is too small or too large).
I rather want to have a unified bevel size independent of the actual mesh size and I saw that in blender 2.8, that can now be achieved via shaders at render time.
So… My question would be if that could also be done at render time via a shader in BJS or if anyone has a different idea that won’t blow the scene performance.