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 MaG3Stican · May 22, 2014 at 04:25 PM · terrainmeshesdrawingpolygons

How to render polygons in unity?

I have developed an algorithm to create a map with mountains and such based on height and moisture. I have got a lot of polygons which I would like to render, each with vertices with their own X Y Z position...but I dont seem to find a way to draw anything in Unity which is frustrating me since this was so much easier in XNA.

I have tried creating a mesh but dynamically but it is just so slow and it also has a maximum number of vertices.. I just want to create lots of flat surfaces specifying each vertex's position..is there a way to do this in unity?

Thank you!

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 supernat · May 22, 2014 at 04:32 PM 0
Share

You said you tried creating a mesh dynamically but it's slow, so it sounds like you have already found the solution to making dynamic meshes. That is what you want to do right? If you want better speed and to use the built-in terrain, you could develop an external tool based on your algorithm to generate a heightmap, and load it into the Unity terrain. Or you could build an external tool to generate the mesh data itself and load it as a mesh. Are you really asking if there's a faster way to do it? We would have to see your code to help with that question. You can create lots of flat surfaces, specifying each vertex's position in Unity. I wouldn't recommend creating them as separate $$anonymous$$esh elements, so how you approach it will depend on how you texture, if you're using a LOD based algorithm for your terrain, etc. If you can post some details, I'm sure someone will be glad to help.

avatar image Eric5h5 · May 22, 2014 at 05:03 PM 0
Share

Creating meshes dynamically is typically very fast, so I guess you should optimize your code. You can create multiple meshes in order to bypass the max vertex per mesh limit, which is better for culling anyway. You could also use a vertex shader.

avatar image MaG3Stican · May 24, 2014 at 02:09 AM 0
Share

hey eric, I finally managed to render meshes very fast optimizing my code as you said.. I am having problem texturizing my shapes since their shape is irregular..I want the texture to repeat x ammount of times over the surface (mesh).. is this possible?

avatar image Eric5h5 · May 24, 2014 at 02:26 AM 0
Share

Sure, it's a matter of setting the UVs appropriately.

0 Replies

· Add your reply
  • Sort: 

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

23 People are following this question.

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

Related Questions

Mesh Probs 1 Answer

Why windZone is not working on my 3d model 1 Answer

Looking for a method of creating "Ground meshes" without adding tons of models to my project. 1 Answer

Meshes instead of terrains 1 Answer

Lines / markers on terrain 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