I am looking for advice on how to handle a large terrain mesh that I am importing from an existing file format through a custom add-on I am writing. Currently, I import heights from a height map file and generate vertices, edges and faces to create a single grid plane mesh. Here is an example of how it looks:
I have a total of 202,800 vertices and the dimension of my mesh is 520x390. Each 5x5 vertices (4x4 faces) represents 1 "tile" in the original file format and contains a pair of blended 256x256 textures. It's at this point that I am unsure how to best proceed because the dimensions of my mesh give me a fairly high number of "tiles" -- 8112. So here is my question:
- Should I add 8112 materials to the mesh to texture each group of faces that represent a tile? OR
- Should I break my mesh into 8112 objects, each representing a tile? OR
- Is there a completely better way to handle this that I am missing?
Thanks for taking a look.
EDIT Adding some more information as recommended my Duarte
The terrain comes from an old 3D game and right now my only objective is to be able to render the terrain with textures in blender and manipulate the content. I don't really have a preference for which render engine to use (is one better than the other? I am an entry-level blender user).
More technically, for each 4x4 face I want to:
- Blend 3 textures (256x256)
- Apply the new texture to those faces
- Render the mesh with all faces textured
After sleeping on it and taking a new look at the problem I realized that I could trim the number of "tiles" from 8112 to 224. This was due to the fact that not each tile is unique and some of the textures are duplicated ("tiled"). I added 224 default materials to the mesh and memory usage was not too bad (707mb - untextured). Going to experiment with this and will report back if it turns out to be a good solution for me.