How to make a ultra-optimized voxel terrain like this in a HTML file?

Where is your source image from?

There are a few well known techniques for doing large voxel fields.
greedy meshing..
sparse voxel octtrees..
raymarched texture encoded distance fields..
They are all pretty complex to implement.

You’ll also need to use texture atlasses or texture arrays to get textured cubes.

marched volumes:

greedy meshing:

A case against greedy meshing:

SVO:

It’s a HUUUUUGE topic.

4 Likes