MaxScript KML path import

Discussion in 'Track Modding' started by Mario Morais, Jan 22, 2012.

  1. Simon Peace

    Simon Peace Registered

    Joined:
    Nov 10, 2011
    Messages:
    121
    Likes Received:
    0
    Great that you fixed the bug. Yup imports my files now also. Can I ask for an enhancement.

    Can we have a radio button type selection of what type of vertex is created for each point. My preference is for corners rather than smooth or bezier for initial layout and other applications so it would be really helpful to be able to select so that you don't have to do it post import.

    Thanks Again.
     
  2. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Yes i can do that.

     
  3. Knightwolf

    Knightwolf Registered

    Joined:
    Nov 3, 2011
    Messages:
    15
    Likes Received:
    1
    Hi there,

    Sorry, cant for the life of me get this thing to work, have tried GE, SAS Planet and when it completes there is no spline visible with any verts. Although it is in the max list of objects.

    Step by step of how im using this.

    1. Go to Googe Earth.
    2. Find a track or road section to map out.
    3. Create a path on that road section.
    4. Highlight path created and save as kml.
    5. Open up the script and point it to saved kml.
    6. Set appropriate hemispheres and zones. (Southern and 54, for the kml below)
    7. Click create path.
    8. Object gets created but there are no verticies to work with.

    Also should users be using Google Earth or Google Earth Pro?

    Thanks
    Knightwolf

    View attachment 881
     
  4. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Well i said Southern is not ready yet. I think is the reason.. I will check your file ...

     
  5. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Sorry but the import is OK.. remeber to select spline in "select by name" and can mark "enable in Viewport" in "rendering" section of Spline.

    Image import is right and match.

    View attachment 888
     
    Last edited by a moderator: Jan 27, 2012
  6. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    New version 1.3 go to first post.
     
  7. Lynkk

    Lynkk Registered

    Joined:
    Nov 8, 2011
    Messages:
    25
    Likes Received:
    0
    Hi, I'm having this error when I click Import Image.

    [​IMG]

    What did I do wrong? :)
     
  8. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    The problem is your kml.
    The script import images and a kml generated by SASplanet
    also inform the script with errors of calculation to areas far from the equator. new calculations are needed.
     
  9. Lynkk

    Lynkk Registered

    Joined:
    Nov 8, 2011
    Messages:
    25
    Likes Received:
    0
    I tried the KML above, provided by Knightwolf, and I'm getting the same error. Same error with the KML in the first page...?
     
  10. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    post your KML!.
     
  11. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    In first post i add the link for open script.

    Maybe same one can fix the conversion geo -> xyz
     
  12. adamfarmer

    adamfarmer Registered

    Joined:
    Aug 29, 2011
    Messages:
    198
    Likes Received:
    102
    I'm wondering if anyone can help. I've already quizzed Mario about something else and don't want to bother him anymore.

    Should the KML path contain height data?

    I've tried a few different circuits in Google Earth. Picked the path tool. Drawn around the circuit. I've checked the elevation profile to ensure it's not flat. Save Place As.... Saved as a KLM file. Used Mario's script.

    It imports a perfect path into 3DS - but only the plan data - the track is totally flat.

    Any help would be much appreciated.

    Thanks.
     
  13. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    The GoogleEarth don't export elevation. You must use 3d_route_builder to get elevation.
     
  14. Alesi

    Alesi Registered

    Joined:
    Oct 5, 2010
    Messages:
    469
    Likes Received:
    7
    hm.. downloaded, but 3dsmax says that its 1.1 version not 1.3
     
  15. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    The link is this http://www.mediafire.com/download.php?cc7p3e9jl2b4sry

    I forgot to change the text.
    You can do this; open the file "importKML.ms" in notepad and change de line

    Code:
    GroupBox grp1 "KML importer v1.1" pos:[7,0] width:146 height:48

    I rember that this script have errors for distances far from the equator.
    I need new calculations.
     
  16. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    Finally i fix the projection coordinates!

    Now the dimensions of the tracks and images are right!

    Soon ImportKML 1.4
     
  17. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
  18. Ha3aP

    Ha3aP Registered

    Joined:
    Mar 4, 2012
    Messages:
    56
    Likes Received:
    0
    What version of Max this script?
     
  19. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    works in max 2010, but i thing is work in others
     

Share This Page