• 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
1
Question by G4merSylver · Dec 14, 2015 at 06:26 PM · c#meshoptimizationverticesfaces

Removing Tris/Verts/Polygons from an merged mesh? (C#)

Hello~ I need help with optimizing an cube-based terrain :)

alt text

The terrain is split into chunks which can hide themselfs, this what you see is roughly about a tenth of the map size.

But this should be enough for our purpose, you see that we have about +500k tris and +1.1kk verts and quite a batch of other data that probably is beating the GPU or CPU bloody... Also an sh...whatchamacallit-load of colliders.

The probably only way to reduce the strain should be by merging the meshes, the same for the colliders.

There is the Mesh.CombineMesh method, however this is just literally merging the... Who ever wants to count this... cubes. The problem is that after the merge the cubes retain their individual shape, I could live with repetions on the Z axis (Image top right for the axis ^^) but when there are thousands of repetions on the Y and X axis its to much of wasted calculations that you dont need.

Keeping it short and simple: I am looking for an way to remove the unnecessary internal parts.

A bit of additional information.

The Terrain is based on the Perlin-Noise method, Mathf.PerlinNoise as such I can easily pre-calculate what the next column will cover and what what it had covered. As such I know which sides will be covered.

The only way thats I could think of was creating several cubes which can fit in every possible situation (Open Left, Open Right, Open Bottom, Open Top and the combinations of these), however considering that it isnt just a block or two that is planned I would prefer having something to run over the individual blocks.

Thanks to everyone who bothered to reading till here.

img.png (450.4 kB)
Comment
Add comment · Show 1
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 J-R-Wood · Sep 08, 2018 at 08:11 PM 0
Share

I don't suppose you figured out how to remove the unnecessary Verts and Tris?

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

41 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 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

Error CS0117: 'Mesh' does not contain a definition for 'vertices'. 0 Answers

Collisions = Get colliding vertices 0 Answers

Edit SkinnedMesh with vertices 0 Answers

Read Vertices in a specific order? 1 Answer

Less code for same thing 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges