TGC-Designer-Tools icon indicating copy to clipboard operation
TGC-Designer-Tools copied to clipboard

Courses Take Significant Resources from Editor

Open chadrockey opened this issue 7 years ago • 1 comments

The courses require significant resources from the resource bar to exist. The best compromise I've found so far is to reduce the resolution of the course to 2 meter features. This seems to produce good quality courses but use fewer elements.

Since the terrain is "painted" in by "clicking" each pixel in an N meter brush, this is very inefficient.

Some ideas that I've had involved dynamic resolution.

For example, using quad trees, it could be done so that different regions can have different resolutions based on their importance. 4m squares for non-playable/wooded areas, 2m squares for fairways and teeboxes, and 1m squares for bunkers and greens.

It may be possible to use KD-Trees to automatically segment the course into shapes. I started an experiment on this as well.

chadrockey avatar Feb 07 '19 01:02 chadrockey

I had an intermediate idea to help this in the short term.

Related to #2 , Landscape will survive and stick to its elevation no matter what terrain does. I think that if I take a lower resolution version and use it as terrain, then the user's mask will leave high resolution where they need it, but the low resolution terrain will exist around and behind the high resolution landscape.

So the steps will be:

  1. Mask as usual
  2. Make a lower resolution downscale of the heightmap.
  3. Paint in the terrain as landscape (height) as usual
  4. Paint in the filling areas as terrain (terrainHeight).
  5. Rotate to fit the course as usual?
  6. Remove the terrainHeight that isn't on the map? Is complicated due to the course expansion with holes. May need to determine map size from the spread of holes.

I think this will work really well and won't take many resources if I paint at 8, 12, or 16 meters. Could potentially even go larger squares. 8 is 62500 brushes, 16 is 15625 brushes, 32 is only 3900, so I"ll probably start there and see how it looks.

chadrockey avatar Feb 13 '19 07:02 chadrockey