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 /
  • Help Room /
avatar image
0
Question by NightAvail · Jun 30, 2015 at 04:28 PM · terrainborders

How to create smooth map border lines from point

Hey guys,

I had a question concerning the best way to smooth out lines that represent borders on a map. Currently I have the following:

alt text

My current implementation includes finding all of the points (pixels) for a border on a PNG texture that represents the map and then creating triangle meshes from them. As you can see however, my lines aren't very smooth and I'm wondering what would be the best route (algorithm) to smooth them up.

Note also that for each province I render a border, so really the border that you see in the image is made up of two sides. Any smoothing algorithm will need to keep both sides of the border in sync (the thickness of the border is also controlled by a BorderWidth variable).

Also (side question), when I apply a normal map to the terrain I get this weird shadow in the "Scene" View..., not sure if that's normal but I thought I'd slip in that question.

Thanks!

Comment
Add comment · Show 3
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 NightAvail · Dec 23, 2015 at 01:11 AM 0
Share

Not sure where my comment went... trying again. So in the image above the lines are actually a mesh to simulate dynamic borders. $$anonymous$$y biggest issue was how I was drawing that mesh. In the end I came up with a way to draw lines to represent sides of the border. Here are the results.

https://www.youtube.com/watch?v=myu94gqPzHE

avatar image marcuslind90 · May 06, 2016 at 01:44 AM 0
Share

It would be very useful if you came back with an Answer to your question and how you solved it. Your video just show results, it does not answer the question. I'd be happy to hear how you choose to do it.

avatar image NightAvail marcuslind90 · May 06, 2016 at 02:09 AM 0
Share

Sure thing, I just put points into an asset I found (really cheap and fast) called Curve Line Renderer. https://www.assetstore.unity3d.com/en/#!/content/20272

  1. Curve Line Renderer (just dump ordered points into it)

  2. Ceto for water

  3. Text$$anonymous$$esh Pro for text

  4. The map shader is my own personal one that allows for up to 16 textures

Currently I can load in the Europa Universalis map in like, 3 sec. There are some optimization done as well, and their scripts add a few more seconds to parse. I think the Warhammer mod takes the longest, but that's not optimized at all...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Kronnect · Dec 22, 2015 at 09:11 AM

Instead of drawing the lines into the texture, have you thought of creating a mesh that adapts to the terrain itself like Terrain Grid System does ? Check out this video: http://youtu.be/bk9N98okodA

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 NightAvail · Dec 23, 2015 at 01:48 AM 0
Share

I added that comment in the wrong place. In the image above I am using a mesh. The biggest difference however with your approach and my approach is that I'm using an image to drive the way the borders are generated for modding purposes. So in my video example you see the map of Europe driven by a heightmap/province map.

avatar image NightAvail · Dec 23, 2015 at 04:10 AM 0
Share

Ah yeah, I forgot about this question haha. In the end I did figure out a solution as shown in this video:

https://www.youtube.com/watch?v=myu94gqPzHE

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Terrain Transparency - Too many text interpolators 1 Answer

Render border on 3D map 0 Answers

Convert a square array selection to circular selection 1 Answer

Cannot raise nor lower terrain 1 Answer

Incremental terrain height increase limited by float size 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