Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by JakeM · Jun 19, 2012 at 06:32 AM · 3dplanedae

Ways to render a real world 3D environment given a GPS coordinate

I am attempting to display a 3d version of a real world location. Inside my Unity3D app, the user will specify the GPS coordinates of a location, then my app will have to generate a 3d plane(anything doesn't have to be a plane) of that location. The plane will show a 500 metre by 500 metre 3d snapshot of that location.

How would you suggest I achieve this in Unity3D? What methodology would you use to achieve this?

NOTE: I understand that this is a very difficult endevour(to render real world locations dynamically in Unity3d) so I expect to perform many actions to achieve this. I just don't know of all the technologies out there and which would be best for my needs

For example:

Suggested methodology 1:

  • Prompt user to specify GPS coords - Use Google earth API and HTTP to programmatically obtain a .khm file describing that location(Not sure if google earth provides that capability - does it?) - Unzip the .khm so I have the .dae file - Convert that file to a .3ds file using ??? third party converter(is there a converter that exists?) - Import .3ds into Unity3D at runtime as a plane(is this possible)?

    Suggested methodology 2:

Prompt user to specify GPS coords - Use Google earth API and HTTP to programmatically obtain a .khm file describing that location(Not sure if google earth provides that capability - does it?) - Unzip the .khm so I have the .dae file - Parse .dae file using my own C# parser I will write(do you think its possible to write a .dae parser that can parse the .dae into an array of Vector3 that describe the height map of that location?) - Dynamically create a plane in Unity3D and populate it with my array/list of Vector3 points(is it possible to create a plane this way?) Maybe I am meant to create a mesh instead of a plane?

Can you think of any other ways I could render a real world 3d environment in Unity3D?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mizuho · Jun 19, 2012 at 08:33 AM 0
Share

Assu$$anonymous$$g you can possibly get these data files, you would need to generate a model on demand and stick that in your world. I don't think Unity supports model creation within itself, so you would probably have to make it with the triangles and vertices. Which sounds like a huge pain. Why are you doing this again?

avatar image JakeM · Jun 19, 2012 at 10:20 AM 0
Share

@$$anonymous$$izuho thanks for the comment. $$anonymous$$aking it with triangles and vertices is the way I expected to do it. I think a .dae file already tells me all the vertices. Do you know if I can programmatically obtain a .dae/.khm from google earth tho?

avatar image Nuitari · Nov 06, 2013 at 10:36 AM 0
Share

@Jake$$anonymous$$ did you find a solution to your problem? I would like to do the same, but don't know how.

avatar image caesarpena · Apr 29, 2016 at 06:35 AM 0
Share

hello, maybe a little bit late but, did you were able to do this?

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by InsideOutMonkie · Jun 19, 2012 at 08:28 AM

This answer might be useless to you, put awhile back, I took a screenshot of an area on googleearth, then I used that image as a texture on the unity3d terrain, and modeled up the landscape that way.

Peace

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JakeM · Jun 19, 2012 at 10:18 AM 0
Share

@Dion_Paul not useless at all. Thats exactly what I am trying to do. Render a 3d map from google earth in terms if heightmap and actual texture. Right now I am focusing on heightmap(the hardest bit). Did you do it all programmatically or did you use Google Sketchup or something? How did u get it into Unity?

avatar image InsideOutMonkie · Jun 19, 2012 at 10:27 AM 0
Share

I just used unity, Unity has a terrain editor built in. Using the editor just added the google earth screen shot as a terrain texture and paint it on. Once that was done, I sculpted the piece of land with the terrain editor.

avatar image InsideOutMonkie · Jun 19, 2012 at 10:30 AM 0
Share

Please like my answer if this helps! using the thumbs on the upper left of this box

avatar image JakeM · Jun 19, 2012 at 10:53 AM 0
Share

@InsideOut$$anonymous$$onkie thanks for the reply and comments. I'm trying to like your answer but its telling me to login when I am already logged in. Unity Answers' version of Stack Overflow is messed up :P

avatar image InsideOutMonkie · Jun 19, 2012 at 11:06 AM 0
Share

No worries I keep getting the same message about login in Peace!

Show more comments
avatar image
0

Answer by Bunny83 · Jun 19, 2012 at 11:43 AM

You should check the google API and their licenses before you attempt something like that. Especially when you want to create a commercial project you should be aware of googles copyright on all of their data.

I'm still not sure what data you want to display / use. Do you want to display a terrain with the heightmap information from google? The heightmap from google is not very accurate, so for what purpose do you want to display this information?

Next thing is: a plane is a mesh. The most simplest plane usually has 4 vertices and 2 triangles. In your case you need a Mesh with a vertex for each height sample. So it'a not really a plane (in the sense of planar) it's a mesh grid.

You can also use Unity's terrain engine and use TerrainData.SetHeights

Btw. Unity can't import any mesh data format at runtime besides assetbundles (and this text-based-scene-format afaik) which is (are) Unity pro features. There are scripts for importing obj and some other simple formats, but it wouldn't make much sense since you would need a converter to that format.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image InsideOutMonkie · Jun 19, 2012 at 11:48 AM 0
Share

Very good point about the google API and their licenses Take that into consideration Jame$$anonymous$$, Bunny83 has a good point! lol

avatar image InsideOutMonkie · Jun 19, 2012 at 11:52 AM 0
Share

Actually, the images from google would make for a poor texture. Your best bet might be to use a google image as a ground reference, and paint on top of that a whole new terrain texture, it would look much more legit from an art point of view, just had to throw that in there, best of luck Jake

avatar image
0

Answer by InsideOutMonkie · Jun 19, 2012 at 11:55 AM

Check out the cloud system on the Unity Assets store there is a free verson, it would spice up scene dramatically. If you are going for the up in the air kinda view Its very easy to learn, might take for 5 mins if that.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Google Sketchup FXB or DAE 3D Model Not Importing Correctly into Unity 1 Answer

Camera Scrolling just track the Charakter if z-Rotation=180 0 Answers

Blending 3d planes with shader 0 Answers

Pixel values of a plane (RectTransform)? 0 Answers

Can't point Main Camera to Plane 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges