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 Balint · Dec 31, 2013 at 06:36 PM · displayvertexhide

Hide vertices

Could I do this somehow? How?

Knowing the exact position of the vertex. If I need, I want it not displayed, instead display a biggest polygon between the surrounding other vertices. (So the mesh is still complete, there is no hole). But I want to know the location of the vertex while it is hidden.

Thanks!

Happy New Year! :)

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 robertbu · Jan 01, 2014 at 07:58 AM 3
Share

I think we need a visual of what you are trying to do. Unity doesn't display vertices. It displays triangles, and you cannot just remove a vertex without modifying the triangles that use that vertex. You could use a shader that supports vertex colors and set the alpha of the color to 0, but the result will be a hole (which you say you don't want).

avatar image sparkzbarca · Jan 01, 2014 at 09:45 AM 3
Share

I think we dont need a visual we need you to say what your actually trying to do. What I mean is alot of times I notice people have a problem and then they come up with a solution and they come here wanting to know how to implement it, but actually there solution is a bad solution and there is a better one and they should have just asked for help with the problem not the solution.

So Why do you want to remove that vertex?

What is it your trying to achieve.

avatar image ShadoX · Jan 01, 2014 at 10:38 AM 2
Share

You could probably try to rebuild that polygon without that vertex and display it over the real one using layers or some other way, but that's just a wild guess.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by HappyMoo · Jan 01, 2014 at 01:50 PM

You want to know all vertices of meshA, so you can scale some meshB so large, that it barely fits meshA? Or you also want to create meshB(That's gonna be harder)?

you can do something like this:

 MeshFilter filter = GetComponent<MeshFilter>();
 Mesh mesh = filter.sharedMesh;
 foreach(Vector3D vert in mesh.vertices)
 {
   Debug.Log("Jim, we found a Vertex at " + vert + "!");
 }

:D

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
avatar image
0

Answer by Balint · Jan 01, 2014 at 03:26 PM

Hi! Thansk for all the comments and answers! I didn't want to tell, why I want to hide vertices, but you all were right, my question didn't have enought information.

So I want to create an automatic cotinous level of detail system. So I want, that the distant object contain fewer polygons, but not with use of different models. I want that there is one mesh, wich is displayed by very few polygons when it is far, and when I go closer, more vertices appear, and therefore more triangles. And I want it happen IN the mesh too, so the closer part of the mesh would be displayed with more polygons, the farther part is displayed with fewer. (It would look like heightmap based adaptive tessellation). I hope, it is clear now, and sorry for language problems.

BTW, Does this exist in any engines?

Happy 2014!

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 HappyMoo · Jan 01, 2014 at 03:45 PM 1
Share

This is actually a hard problem. And believe me, you don't want to go into this if you don't know what you're doing. You need to analyze which Vertex to remove, changes the mesh the least, you need to retesselate the hole you created, you usually don't just want to remove Vertices, but also move others around, or create a whole new $$anonymous$$esh with less vertices, but on top of the high detail mesh etc...

Those algorithms are complex and you don't want to have them run during the game - you rather want something that creates a bunch of meshes for the different LOD levels while in editor and saves them for later use ingame. You can imagine this like baking a light map etc.

You can also go the other way round and start with a low-poly mesh and have tesselation shaders build something more smooth at runtime. Or both ways.

For now, if you need different LODs and want to manage them yourself, I would advise to create them in your favorite 3D software.

avatar image Balint · Jan 01, 2014 at 04:49 PM 0
Share

I wanted to make an octree based search algorythm, wich removes the vertices, till only on vertex remaina in one cube. Near to the camera, the octree level is higher, far the octree level is lower. I don't want to move the vertices, only remove them, and create a new triange there. ($$anonymous$$aybe It is a bit similyar to voxelise the full visible area in every frame).

So are all of there steps too expensive?

avatar image HappyMoo · Jan 01, 2014 at 05:21 PM 1
Share

you may be able to remove vertices one by one and also retesselate the hole you open, which is no cheap operation if you do it for every vertex, but... that does'nt make a good LOD algorithm that creates a nice looking mesh with highest likelyhood to the previous mesh.

How do you decide which vertex to remove next? How do you decide that you can't remove the top of a cone if the cone is the only object in the mesh, but can remove the top of a cone if that's just modelling a little detail on the back of a character?

avatar image sparkzbarca · Jan 01, 2014 at 07:02 PM 1
Share

I get that you want what'd be called a continous level of detail system.

So would every single game and engine developer in the world. I don't mean to be discouraging but this problem is basically intractable, at this point were pretty much waiting for either quantum computing to make brute force solving for per vertex removal computationally viable or for PC's to advance to the point that it becomes unnecessary to reduce the poly count even when you have hundreds of high poly objects on screen because the CPU/GPU can process that no problem.

your trying to solve a problem that a whole lot of geniuses have tried and failed to.

avatar image Balint · Jan 01, 2014 at 08:10 PM 0
Share

Then, raytracing remains... :) It displays only what we need :)

Show more comments

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

21 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

Related Questions

How to use vertex groups in Unity? 0 Answers

How would I display a submesh from a prefab with animations? 0 Answers

Displaying only part of an object 0 Answers

How to hide Cursor on second display? 0 Answers

hypercube animation 2 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