Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 manyokibenc · Feb 10, 2016 at 11:07 AM · optimizationhideclippingculling maskfalloff

Culling out mesh

I would like to cull out my object like Cameras clipping planes does, but only on one object. Like camera clipping planes, but with layers. The object is a large "grass plane" with 50000 vertices, so I cant loop trough all triangles and hide them. The camera far clipping plane set to 10 works fine, but it cant be set to hide only the grass layer :/ Thank you !

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 manyokibenc · Feb 11, 2016 at 01:59 PM 0
Share

Well, first of all, thank you for your time. Then you have to know, I did the same thing that you mentioned, but It wasn't good. It costs a lot op performance, and cant be modified, and handled as needed. I developed this "large object" solution after the first was complete, and It does almost the same, just merge every grass plane instance into the "domain" object. I think Far Cry 3 is uses the same solution, but I faced a big obstacle in the falloff, so I started to develop a new solution, which is more effective, and performance friendly, so overall you are right, this wont be as good as planned.

Here is a new question, for the new, the final solution: http://answers.unity3d.com/questions/1140238/serialize-large-array-of-class.html It generates a large class array of "imaginary" grass, and apply scale, size, rotation, color, type, ect... to it. During runtime, the grass objects (1000-2000) are moved to exchange the near grass spaces. This works excellent, but i don't know how to save the arrays data. Thanx for reading!

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Pangamini · Feb 11, 2016 at 01:29 PM

You could do this effect by clipping the plane in a shader (no performance boost). You could have separate camera to additionally render the grass, with clear flags set to none (But here you will have problems with transparent objects). What you want can be achieved, but what's the point? I mean none of these will bring you any significant performance boost. It's a single mesh, being rendered in a single batch. Sure, by far plane clipping you might achieve a slight reduction of pixels needed to be rendered, however in a standard 1st person view i can imagine this will again not have any impact that'd matter. I mean if your goal is performance, because you didn't mention your motivation. There's no point in software clipping of parts of a single mesh, that would lead to much higher overhead than what you'd save in rendering. Perhaps the whole idea of having "one huge mesh" is not such a good idea.

I don't know how does your grass thing look like, but i suggest you take a look at geometry instancing. Very handy thing. For me, all evidence points to the fact that unity shuriken particle system utilizes instancing when mesh particles are used. Together with custom vertex shader (to slightly modify individual instances of tussocks based eg. on the particle color or world position, time to add wind effect or whatever else you want) you can sure create quite fast, but even infinite plane of grass (by generating particles around the camera instead of emitting them by the shuriken).

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 mikelortega · Feb 10, 2016 at 11:09 AM

I think you are looking for Camera.layerCullDistances.

Set your grass in a new Layer, and then, configure that layer's cull distance for your camera.

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 manyokibenc · Feb 11, 2016 at 12:10 AM

Definitely not. It hides objects instead of culling the mesh out, like far clipping planes.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to toggle object visibility with keyboard button? 1 Answer

Layers Show/Hide not hiding children with showing parent 0 Answers

Canvas Hide / Show with 3 clickable Objects 0 Answers

Hiding in Grass or object when player enters it in photon pun game? 1 Answer

Can you change realtime lights falloff? 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