Hello Devs, I would really like your opinion and help.
I need to dynamically add layers of different materials on top of my terrains and meshes within defined polygonal areas.
Specifically I need to spawn circles of “cold area” (represented by condense, snow then ice) on random position of the map, then blend them together and change the layer to a colder one (from snow to ice, for example) where they overlap.
If 3 circles spawn near enough to overlap I need to break the circle form and create a polygon (the external perimeter) and another inner polygon (the overlapping area).
All this has not to be precise and geometric, the more natural it looks the better.
I can’t simply change the material of the terrain/meshes because only a part of it has to change.
Now, I can imagine these approaches:
- Spawn decals and make them blend together, when an overlap is detected spawn a different decal on top representing another layer.
- Keep a matrix containing the “levels of coldness” then translate it to the map (I don’t know how precisely)
- Draw circles onto an hidden image with alpha and use it as a mask to apply the materials (like sphere_mask function) if it’s possible.
Take this as an example (UE4 Dynamic Material - Winter Sphere - YouTube), but if two “winter spheres” overlap a new material has to be placed there
Thank you a lot for yourhttps://www.youtube.com/watch?v=btR8AU6fvKg help and time!