Hi,
I have the following problem and could need some inspiration on how to approach it best. PolyWorld generates terrain information in large chunks (512 x 512 blocks called sectors) but at a coarse level.
When integrated in WorldProvider's generating strategy, it needs to provide information at given region sizes (by GeneratingRegion). These regions are (in general) not aligned at the 512x512 grid. See this example:
Now, to be able to provide content for the red rectangle, every facet provider needs to know about the 4 sectors it overlaps. But again, the providers provide info for full 512x512 sectors. This info is put in a cache to be ready when other parts of the sector are requested later. Every facet type now contains a list of sectors it overlaps and a map that points from sector to the actual info.
As you can see this is quite cumbersome. Is there a smarter way? I thought about cutting GeneratingRegion into parts that are aligned along sector bounds, but unsure if that's doable and if it makes sense.
Any thoughts?
I have the following problem and could need some inspiration on how to approach it best. PolyWorld generates terrain information in large chunks (512 x 512 blocks called sectors) but at a coarse level.
When integrated in WorldProvider's generating strategy, it needs to provide information at given region sizes (by GeneratingRegion). These regions are (in general) not aligned at the 512x512 grid. See this example:
Now, to be able to provide content for the red rectangle, every facet provider needs to know about the 4 sectors it overlaps. But again, the providers provide info for full 512x512 sectors. This info is put in a cache to be ready when other parts of the sector are requested later. Every facet type now contains a list of sectors it overlaps and a map that points from sector to the actual info.
As you can see this is quite cumbersome. Is there a smarter way? I thought about cutting GeneratingRegion into parts that are aligned along sector bounds, but unsure if that's doable and if it makes sense.
Any thoughts?