Quantcast
Channel: Answers by "lodendsg"
Viewing all articles
Browse latest Browse all 102

Answer by lodendsg

$
0
0
I have been looking at similar my self In terms of generating the areas its a matter of defining the area around a 'system' in the case of Stellaris. So each system is a node, then we draw a triangle fan around that point at a radius based on the 'influence' That works for a single system but when you have 2 systems in the same gorup/faction where the areas overlap. To do this I have been looking at creating an object that contains the systems owned by a faction finding areas of overlap and defining the 'shared edge' so each system is still drawing a simple triangle fan only the edge points are effected by 'shared edge' The next trick is when you have two facitons that are adjacent e.g. they would overlap if you let them. To do this the map system needs to be aware of all systems and all factions, it then must group each system by its faction and run the same 'shared edge' calc over any controlled systems regardless of grouping but generate meshes for each control area by grouping e.g. 1 mesh for each group. To improve this a bit when identifying the edge points we should mark what is a 'shared edge' within a group and what is not ... the points that are not are our outter edge so we can offset from that to create our border if so desired. Applying such a map to a terrain was also of interest to me ... what I looked at there was projection. So once you have this lovely set of meshes that represent each factions area in a nice 2D/flat plane we can simply render it to texture using an orthographic camera and project it to terrain using an orthographic projector. Now I have only done all that in design ... Im looking into coding it now. I have thus far avoided doing mesh generation in Unity so no idea how far I get but if you make any progress I would love to see it.

Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>