Announcement

Collapse
No announcement yet.

Introducing TGC Designer Tools and Real Course Recreation Lidar Import

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Introducing TGC Designer Tools and Real Course Recreation Lidar Import

    Hi everyone!

    I've been hard at work for the last month developing tools that primarily will import Lidar data into TGC 2019 Courses.

    There have been a lot of ups and downs, but I'm at the point where I'm ready to accept feedback from the community.

    A completed course file is available here:
    https://drive.google.com/file/d/1RYW...ew?usp=sharing

    Please don't publish this course in game, it's not completed and I call 'dibs' on publishing this course after I finish decorating it.


    I've completed the proof-of-concept phases and have created playable, realistic courses. I'm still working on the User Interface and instructions to make this the easiest that it can be, but I wanted to open the tools up for developers to contribute fixes.

    The source code is available free on Github and releases will be available there under the "Releases" link. I'm targeting the initial release in a week or two as a Windows download:




    Click image for larger version  Name:	 Views:	1 Size:	37.9 KB ID:	184974

    I also am supporting import from OpenStreetMap golf courses ( https://www.openstreetmap.org/#map=1...576/-115.28536 ) into TGC as splines if you don't want the lidar elevation or can't get lidar for your course.





    Quick tips if you want to get started on your OpenStreetMap course: use the highest quality sat image available, map greens along the inside of THE FRINGE, map bunkers on the outside lip, map water on the outside lip.

    For more information on the process or if you want to support future features of this tool, please read here: https://www.patreon.com/chadgolf

    I hope this brings enjoyment to everyone. We all have courses that are personally meaningful to us, and I hope this software inspires you to create something for the community.
    - Chad

    Special thanks to MTHunt, crazycanuck1985, friendBOMBER, and HTdumps for initial feedback and guidance.

    Instructions and a tutorial linked from this page: https://chadrockey.github.io/TGC-Designer-Tools/
    Attached Files
    Last edited by ChadGolf; 02-07-2019, 07:06 PM.

  • #2
    I have had the honor of playing several of these courses and they are more than accurate!

    Comment


    • #3
      Where does one find lidar data for golf courses?

      Comment


      • trhuke
        trhuke commented
        Editing a comment
        Check Google Earth if you dig around they have LIDAR data for much of the US. Also USGS has elevation data.

      • ChadGolf
        ChadGolf commented
        Editing a comment
        Check this website: https://coast.noaa.gov/inventory/. If the data meets 3dep quality, you can expect great results. If the data doesn’t, read their reasoning why but it will still be useful.

    • #4
      This is fantastic! I've been on a course designing hiatus due to the time constraint, but with your tools I might just have to re-create my local course!

      Comment


      • #5
        It's amazing sounding. What are the tier levels, like 100/mos gets whatwhat different from 10/mos?

        Comment


        • ChadGolf
          ChadGolf commented
          Editing a comment
          It’s more or less a tipping model, I will do my best to support all requests and issues reported. I only make promises for the highest two tiers as those include direct support for those that want it or need it. The tool will be usable at any skill level.

          Eventually new features will likely be beta tested by supporters. For example, Lidar data often includes vegetation and tree info, so automatically adding trees could happen.

          Software is notoriously difficult to keep going longer terms, so the two ways I imagine success are: other developers in our community contributing to the open source, or buying time for maintenance and new features each month. I’m hoping one or both of these can get things established.

          Do you have any ideas of fun support levels that would be valuable for the community?
          Last edited by ChadGolf; 02-07-2019, 08:02 AM.

      • #6
        Does this import work only with TGC or general Unity Landscape Designer?
        [url]http://www.24-7.golf[/url]
        AUS: +61390057975
        USA : +14698449353
        Flightscope and SkyTrak Distributor

        Comment


        • #7
          ChadGolf Thank you for this. I might be able to publish my two local courses now.

          Comment


          • #8
            Nice! Where was this before I've spent the last 100 hrs working on my home course and I'm only half done!?? I'll definitely look into the details here.

            Comment


            • #9
              A couple of questions...

              #1 I downloaded your project and fired up my python editor (its been a while). I installed all of the referenced packages but its complaining about the MAPQUEST_API_KEY.txt. I need to obtain a key from mapquest and load it in this file?

              #2 Can I use this tool on a course I am in progress of building? Essentially I have all of the holes layed out with fairways bunkers trees etc but have not tried any elevation changes yet. I've been dreading that tedious work and saving it for last. Is it possible for me to apply elevation changes on this existing course? My course is nearly a replica done via google earth but I noticed a few holes are off by maybe 20 yards or so.

              Comment


              • ChadGolf
                ChadGolf commented
                Editing a comment
                Are you using Python3? Since there are zero instructions right now, it expects a folder with the las/laz files AND xml metadata files. Are those all there?

                This is also the weakest part of the software since the lidar metadata is so flaky, can you send me the USGS link to one of the files?

              • ChadGolf
                ChadGolf commented
                Editing a comment
                Here's details on pycrs on my system and the full pip dump, we've officially lost everyone now. Feel free to move this into an issue on Github if you'd like.

                C:\Users\chad\Documents\GitHub\TGC_Terrain_Importe r>python -m pip show pycrs
                Name: PyCRS
                Version: 0.1.3
                Summary: GIS package for reading, writing, and converting between CRS formats.
                Home-page: http://github.com/karimbahgat/PyCRS
                Author: Karim Bahgat
                Author-email: karim.bahgat.norway@gmail.com
                License: MIT
                Location: c:\users\chad\appdata\local\programs\python\python 37\lib\site-packages
                Requires:
                Required-by:

                C:\Users\chad\Documents\GitHub\TGC_Terrain_Importe r>python -m pip list
                Package Version
                --------------- -----------
                Click 7.0
                cycler 0.10.0
                geomet 0.2.0.post2
                kiwisolver 1.0.1
                laspy 1.5.1
                matplotlib 3.0.2
                numpy 1.16.0
                opencv-python 4.0.0.21
                overpy 0.4
                Pillow 5.4.1
                pip 18.1
                PyCRS 0.1.3
                pyparsing 2.3.1
                pyproj 1.9.6
                Pyqtree 1.0.0
                python-dateutil 2.7.5
                PyYAML 3.13
                scipy 1.2.0
                setuptools 40.6.2
                six 1.12.0
                utm 0.4.2
                vdf 2.4
                You are using pip version 18.1, however version 19.0.1 is available.
                You should consider upgrading via the 'python -m pip install --upgrade pip' command.

              • frodaddy00
                frodaddy00 commented
                Editing a comment
                I created a new issue on github with details. The disclaimer is LiDAR data is very new to me and its been a while since I've run python code, and I'm not sure what these files do yet.. besides that I'm golden!

            • #10
              Wow this sounds amazing. I just purchased TGC for my Skytrak and though I wanted to re-create my home course I was dreading the time involved. I will definitely check it out. This might be a stupid question, but will this also work for the current version of TGC or only with TGC2019.

              Comment


              • ChadGolf
                ChadGolf commented
                Editing a comment
                Just TGC 2019. The “Splines” feature works better for computer created courses. Since you’re a new purchase, you’ll be upgraded to the simulator version of 2019 as soon as it’s ready.

            • #11
              Here’s some notes. I did a lot of work on Muifield after you sent it to me. The elevations are good. The water is an issue and the bunkers being done with Splines is an issue. It makes them too big and they encroach on greens and fairways. The fairways and greens are spot on. I actually deleted all of the splined bunkers and recreated them with brush bunkers. Also, be careful where you start on the plot. You are missing over 100 yards in the 13th tee. You only have the red tee. It does look promising. I ran a soft brush over everything g to smooth it out and deleted all water as well. It’s easier to do after.

              Your nethod IMO is awesome for getting started and laying out fairways, tees and greens.
              My Courses:
              World Par 3's by mthunt
              Toronto GC (L) mthunt
              Burlington G&CC by mthunt
              Weston G&CC by mthunt
              London Hunt Club L mthunt
              Park CC Lidar mthunt
              Sunningdale GC Robinson L
              Sunningdale GC Thompson L
              Muirfield Village (liDAR) First Ever Lidar course
              Country Club of Castle Pines (liDAR)
              The Sanctuary GC ProTee L
              The National GC L mthunt
              Mississaugua GC L mthunt
              Shaughnessy G&CC L mthunt
              Markland Woods CC mthunt
              Hidden Lake Old L mthunt
              Magna GC L mthunt
              Barrie CC L mthunt
              mthunt Range

              Comment


              • ChadGolf
                ChadGolf commented
                Editing a comment
                Thanks! I'm glad we've shown a good starting point and I will continue to work to improve the quality of the output. I think I have an improved Muirfield for you. I discovered that the game was flattening greens and fairways, I disabled this, but I'm going to leave it as an option for the designer (this greatly improves pliability).

                I've also done tricks with the spline handles and bunker edges to reign them in. I was having issues with them losing shape and or combining with other bunkers. They now look more like themselves and have better outlines. I took a look, and HB still uses the brushes on their official courses for bunkers, so I think your insight is spot on. At least I can tell you where the bunkers are.

                Another possibility is that I did not create the OpenStreetMap Muirfield and it shows a lot of bunkers on 18 that are no longer there. I also believe a green has moved or was reshaped (14? 15? 16?). The lidar data is from 2008, so if someone were to publish this course, I'd recommend they find historical views of the course to match the lidar data.

                As for the 13th tee.... the pros hit the ball too far. Let's roll the ball back so courses have no dimensions longer than 2000 meters! (That's the default course size limit in the designer). But in all seriousness, I added some math and now have some smart code that looks at the shape of the course and will rotate to fit the course if it's possible. Muirfield and the 13th tee inspired this change.

                Here's the new course if you'd like to take a look and let me know what you think.
                Last edited by ChadGolf; 02-08-2019, 04:39 AM.

              • ChadGolf
                ChadGolf commented
                Editing a comment
                As I work on the UI, I'll incorporate this comment and add options for which splines do you want added: greens, fairway, rough, bunkers, water, cart paths, and so on. This should speed up the process if they don't have to be removed at the designer's discretion.

            • #12
              I tried the new file and it’s a lot better than the one you sent me. I know that to do all the elevations on the plot it would kill the resource meter. It’s pretty easy to fix after. My version is fixed. As for the plot, there’s enough room to fit the whole course. You just need to be careful where you start.

              The way you are doing this works pretty well.
              My Courses:
              World Par 3's by mthunt
              Toronto GC (L) mthunt
              Burlington G&CC by mthunt
              Weston G&CC by mthunt
              London Hunt Club L mthunt
              Park CC Lidar mthunt
              Sunningdale GC Robinson L
              Sunningdale GC Thompson L
              Muirfield Village (liDAR) First Ever Lidar course
              Country Club of Castle Pines (liDAR)
              The Sanctuary GC ProTee L
              The National GC L mthunt
              Mississaugua GC L mthunt
              Shaughnessy G&CC L mthunt
              Markland Woods CC mthunt
              Hidden Lake Old L mthunt
              Magna GC L mthunt
              Barrie CC L mthunt
              mthunt Range

              Comment


              • #13
                I've got the project up and running now. I have the lidar data thanks to your latest changes. My course is not defined in OpenStreetMaps..its just a big green blob. Is it possible to skip the step to overlay OSM data or is it assumed I need to go create the course there first?

                Comment


                • ChadGolf
                  ChadGolf commented
                  Editing a comment
                  If there’s no OpenStreetMap, it won’t error out, you’ll just get the lidar terrain. I’ll make a tutorial for the OpenStreetMap part soon, but I do highly recommend it. It’s just so much easier to use than the in game editor. Really cuts down on the time required.

                  Here’s someone doing it wrong, but it shows how quick it is. https://blog.mapbox.com/mapping-a-go...e-4f5bc88ca59b

                  There are now Presets as well. For the Areas (water hazards, bunkers, greens, tee boxes, fairways), draw an Area, then with it selected search for Golf. Click Golf Features, then whichever you want.

                  The only line right this second is Golf Hole. Start at the tee box and end at the green. I did develop new tags for cart paths and links style walking paths that should come out sometime.

                  Again, it’s the most fun part of the process and I do recommend quickly doing the water hazards and greens if nothing else just to orient yourself. There’s no real delay on publishing either. If you save in the editor, get a glass of water, then run the command, your new splines will show up.

              • #14
                I spent quite a bit of time trying to merge my existing course in progress (course #1) with the new course loaded with just elevation data (course #2). It seems futile to me because even when I start shifting the courses to try to align them and then merge.. the elevations get all crazy. The second problem is my course layouts are not a perfect match to google earth therefore I expect cleanup will be needed regardless.

                Did I read somewhere there is a flatten ability? I'm wondering if I need to first flatten my course #1 before I try to merge them.

                The tool also mentions editing the mask.png. Do you mean just crop or literally open it up and erase all of the content not on the course? Will this reduce the file size by not creating the extra elevations?

                Sorry for all the questions I've only just starting trying to walk through the source code!

                Comment


                • ChadGolf
                  ChadGolf commented
                  Editing a comment
                  Questions are good, it means there's value in what we're doing.

                  A) If you wanted to merge an existing course, you'd have to remove its elevations. There's a lot of complicated background, but you could try:

                  1) Create your lidar terrain course with or without OpenStreetMap features. Course Directory: MyCourseLidarTerrain
                  2) Create another course directory: MyCourseHandMade
                  3) Import .course handmade.course into MyCourseHandMade
                  4) Use "Separate Terrain" button and save the handmade terrain as notneededdontuse.npy
                  4a) You now have a course with just flat features and a course with just terrain
                  5) Go back to MyCourseLidarTerrain Course Directory
                  6) Use the Move Course and Rotate Functions to Shift the Terrain
                  6a) To check alignment, use the Combine Course Directory to Preview what the splines from MyCourseHandMade would look like on top of the terrain shape
                  7) When you're happy with the alignment, "Separate Terrain" into my_lidar_terrain_aligned.npy
                  8) Switch back to MyCoursehandMade and "Insert Terrain File" lidar_terrain_aligned.npy
                  8) There will likely be significant hand moving of splines and bunkers because of how the alignment works and inconsistencies in sizes

                  For now you have to merge the terrain into the HandCourse because "Shift Features" only shifts splines and holes. There are numerous other features I don't know about yet.

                  You may also want to use OpenStreetMap to include at least the water hazards so you can better tell what the terrain rotation/placement is.

                  And ultimately, it will probably save you time to just start fresh with OpenStreetMap because you can complete a full 18 hole course in 30 minutes to 1.5 hours depending on the level of detail. If you make mistakes, the OpenStreetMap editor allows you to move and shift whole features, delete whole features, and doesn't take forever to render after each minor change.

                • ChadGolf
                  ChadGolf commented
                  Editing a comment
                  And yes, there is a feature of the mask's that improve efficiency. I'm still working out the finer details, but for now if you paint in areas that aren't important in bright red RGB (255, 0, 0), it just won't add terrain for those areas and will leave huge cliffs. These can be filled by hand later since the specific heights don't matter. It's just paint, so don't crop or anything. I use GIMP for now, but I will soon confirm if Microsoft Paint works or not. If Paint doesn't work, I will make it work.

                  This is what an extreme mask looks like:
                  Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users like ChadGolf.


                  This greatly reduces the resource usage and filesize. It's not ideal but it's what I can do while doing the rest of the project too. Eventually I'd like to auto fill red areas in automatically or even allow the user to paint in GREEN -> use high detail (greens, bunkers) or RED -> don't care.

                  There are also some complicated algorithms I've done proofs-of-concept for that can use dynamic resolutions based on how much the terrain changes, but they aren't proven yet. These are KD-Trees and Quadtrees. I don't know when these might land, but these can also reduce the resources and filesize.

                • frodaddy00
                  frodaddy00 commented
                  Editing a comment
                  I've also come to the conclusion that starting fresh with OpenStreetMap is the way to go. I quickly mapped out the first two holes and see how nicely it plots out the elevation(!!!), tees, fairways, bunkers, and greens and thats like 90% of the battle.

                  I probably spent 50 hrs already on that orig course by hand and still hadn't touched elevation. I'm not even mad about it though. Elevation down to the centimeters is well worth starting over. This tool is amazing and you've just started!

              • #15
                This is awesome. Small problem, not sure how to use it. Idk if I’m missing something. I’ve messed around with python before but this confuses me haha

                Comment


                • frodaddy00
                  frodaddy00 commented
                  Editing a comment
                  Yeah it takes a bit of work to get a development environment up and running . I believe Chad is working on a windows installer for end users so that you don't have to be a coder to use the tool! He is providing the source code as an open source project so that developers in our sim community can help make improvements and bug fixes over time.

                  People are going to freak out when they are able to install this tool and build real life courses with all of the slopes and bumps down to a few centimeters of accuracy. I dare say course creation time will decrease by a factor of 10 (at least my experience building my first course).
              Working...
              X