This is more of an approach question, rather than just technical question.
I have a generated sphere, broken down into hexagons as one mesh. Every hexagonal tile is a different kind of terrain, for instance, mountains, hills, ocean, planes, etc. I want to draw every terrain type in 3d as a set of several meshes, representing a corresponding terrain type.
Now the big question is how can I adjust terrain meshes to every hexagonal face in runtime, depending on terrain type, which can also change during runtime, e.g terramorphing. Also considering the hexagons aren't exactly regular or equal.
Bottom line, I need to take a mesh, representing terrain type and align it perfectly with a hexagonal face, representing a tile on a spherical map. Is it even possible in three.js? If it is, what technique should I use to achieve the wanted results?
Thanks in advance!
Images below:
Maximal zoom in
Zoomed out map
Ran into a similar problem a few years ago. I also noticed that you have another post asking the same question
You can texture each hexagon uniquely assuming they are difference faces of the "Hex-Sphere" geometry just like you would do a cube to make a dice
hexSphere = new THREE.Mesh(
myHexSphereGeometry,
new THREE.MultiMaterial( materials ) );
scene.add( hexSphere );
As an approach I would do it similarly to how you would develop landscapes using perlin noise by interpolating your hex face textures together to make it seamless and just have it update onChange of the THREE.MultiMaterial. In your other post you mention importing your mesh from Blender. This is the opposite of what I would do since it can cause a malicious set of problems.
Heres an alternative option for you that I hope suits you well:
Hope this was helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With