Create a map/landscape in this way that the material/texture on every position is influenced by parameters which can changes while the game is running

Arnesto_del_Montagne
Thu, 03 Feb 2022 10:46:03 +0000
Architectural and Design Visualization

Hello everyone,
I have researched a lot, but i can’t find a solution for my specific problem, maybe someone have an idea for a solution.
In my game for every position of the map/landscape the ground/land receives a couple of values. It is necessary, because I want to put plants on it and depending on these values the plants grow more or less.
The problem is: how can I implement, that the landscape/map have on every point the correct texture?
Pour example when there ist no water and much sand, then it is a section of desert an i want to see the right texture on the monitor for these section.
Pour example next to it there is water and so I whant to see the water-texture there.
The values have to settet (randomly) while the game is running und they will change while game is running.
And so i need a method to “draw” the texture automaticly dependent on the values - and it have to chance the texture, when the values will chances.

Information:
First I tryed it in a minecraft-style. I let create a lot of cubes as underground. These Cubes were part of “Groundactors”.
Every Actor stores the parameters and values. For very very small maps it works fine.
10x10 Cubes (20mx20m) were spawned, they got their values und dependend of the values a suitable texture were assigned. Well. It’s great. Here you can get a little Impression of how it could look like:

Was wächst hier wohl? Das Garten-Eden-Projekt. Unreal Engine c+ Blueprintprogrammierung. 2022.01.21

But… it would be a very small world. Wenn I changed the Size of World (100x100 Cubes = 200mx200m), the world is still small, but the PC died… (it needs more than 30min to build up the map in running game).

I could take staticMesh “plane” instead of “cube” - this would be a little better, but the main part of the problem persists
The maps are very hardly limitted.

Maybe it could be a better solution, to use the LandscapeMode.
So I try to create a landscape (flat land is sufficent) with the tools of the “landscapeMode” and try to find ways for “drawing” the
correct textures on the correct positions. Squares/cubes/blocks are sufficient (like Minecraft-Voxel-graphics).
I could imagin, that an Idea could be:
after the game makes the values for all positions of the map (that meens for every square), the game could make a kind of imagefile out of these values. Than the game takes this file and makes a new texture according these values while using the given textures for desert, water, grass and so on.
But there are so many problems and quastions. The big mainproblems are:
(1) How to let the game create a image file - i didn’t find any helpful explainings…
(2) How to let the game load such a file and make a new texture out of it?
(3) How to let the game change the texture of the Map/Landscape at the right position?
For all these specific problems I couldn’t find really helpful content.

Are there any Ideas how to let the game create a map/landscape so that the kind of ground is visualized?
(and… the map should be taller than some square-meters and a normal PC should can handle it).
It is ok for me, use voxelgraphic - it can be organized in blocks. It is a valid solution.
It also can be a solutione that uses the “landscapeMode”.
I guess, using the landscapemode would be more efficient an more flexible, but I told the problems.

I would be very happy about Ideas and approaches.
Best regards and thank you very much

3 posts - 2 participants