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
0
Question by Yanger_xy · Mar 10, 2011 at 02:16 PM · terrainpoint

How can i generate a terrain from discrete points

I wanna to generate the terrain by scripting. and the data source is not a hight map, but discrete points that generated by hard device GPS and saved in database, i have these points that with elevation. how can i generate the terrain? thanks.

ps: i can handle the data using triangular mesh but i can not assign other gameObjects on the GUI, if there is a method/script that can convert my "terrain mesh" to the real Terrain which have terrainData and trees/grass can be planted.

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Bunny83 · Mar 10, 2011 at 03:04 PM

Well, I guess the "real" terrain you're talking about is the Unity's built-in terrain engine, right? Unity's terrain is always hightmap based. So you have to convert your data into a hightmap or use just a mesh instead of a terrain. You could write an editor script that generates a hightmap from a collection of 3D points but i guess there are even better programs out there to generate a heightmap.

The main task would be to generate a smooth terrain from these points. To "fill" your heightmap's pixels you need some quadratic or expondential weight function and include all data you have. The closer the pixel is a discrete point the more weight this point gets. But as i said it's a lot math and I think it's easier to look for an external tool that can do that.
Once you have the heightmap as grayscale image you can export it as RAW (from Photoshop) and import it into Unity as terrain-heightmap.

Comment
Add comment · Show 1 · 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 Yanger_xy · Mar 28, 2011 at 03:22 AM 0
Share

Thanks a lot. :)

avatar image
0

Answer by ant123 · Jul 06, 2011 at 07:05 PM

exactly, an external tool that can convert the format you have, and a program that can do linear interpolation on your data, like a graphing tool, a terrain boffin tool, i dunno, im sure there is one.

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

1 Person is following this question.

avatar image

Related Questions

Terrain Details Point Filtering? 0 Answers

(point)Light goes through objects 1 Answer

Add Points for Terrain Heightmap at Runtime 0 Answers

Make a simple tree 1 Answer

Terrain generation problem. 1 Answer


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