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
2
Question by Joris · Oct 09, 2010 at 03:34 PM · resolutiondetailterrain-editorpatchper

Detail resolution per patch

I have been developing my game for some time now and i have a total of 12 big terrains. In unity 3 here is a open variable (detail resolution per patch) which was originally hard coded on 8. Changing this value will wipe my splat-maps clean and i would have to re-texture my entire terrain. Changing the value from 8 to 32 or 64 saves me almost a 100 draw calls. Is there a way to increase this value without throwing away my splat-maps?

Greets, joris

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 Henck · Jun 27, 2013 at 12:43 PM 0
Share

This article about removing grass from a Unity terrain contains some information on the relationship between Detail Resolution and Detail Resolution per Patch: http://bit.ly/1aQb0W9

5 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by ZeBronca · Aug 23, 2012 at 01:13 AM

Ok, first of all, thanks for saving my game. I read your question and I decided to investigate the issue. According to what I understand, the terrain detail/grass data is represented in a 2D array. So each element of the array represents a small square on the terrain, a chunk of grass/detail. As we know, the bigger the array/resolution, better precision we have positioning the grass. However, it is not feasible to draw chunk by chunk: in a 1024x1024 resolution it would result at least in 1 Million drawcalls (if we draw the whole terrain). So, Unity batchs those chunks based on the "Detail Resolution Per Patch". If you have it set to 8, in a 512x512 detail res map, we would have (512x512) / (8x8) = 4096 batchs (and at least 4096 drawcalls). This way, in order to reduce drawcalls, you should increase "Detail Resolution Per Patch", for instance to 128 (the maximum). In a 512x512, it would be (512x512) / (128x128) = 16 batchs. Since it seems Unity needs a couple of draw calls to draw a single batch (someone correct me if I'm wrong) it would take 32 drawcalls to draw the whole grass in the scene.

The ideal number for "Detail Resolution Per Patch" depends on the density of your detail. You don't want to send a huge amount of triangles (very dense grass) to the GPU. But my guess is that you might be able to set it to 128 in most cases.

But that does not answer your question. According to my tests, you can change the "Detail Resolution Per Patch" without affecting the terrain at all. Regarding changing the "Detail Resolution", yes, it erases all details in the scene, but you may try using the scripts at http://forum.unity3d.com/threads/43085-Small-Terrain-Scripts.

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
1

Answer by Martian-Games · Sep 25, 2012 at 10:23 AM

For clarifacation: There is a bit of mis-communication here, user-5422 is referring to the setting: "Detail Resolution" (where larger values are more costly as this refers to the bitmap.) Joris however is referring to the parameter following: "Detail Resolution Per Patch" where indeed larger values achieve faster performance because dividing the array by larger 'chunks' reduces the size of the array.

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 Bill 6 · Oct 13, 2010 at 10:04 AM

Increasing the resolution saves calls? I thought the opposite was happening, though i still don't understand what exactly that "per patch" thing does actually. Any info would be great. What i do know is that you can't change it without losing your maps. You can only change the height map and the size of the terrain without sacrifing your work so far.

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 user-5422 (google) · Oct 20, 2010 at 05:56 PM

Hi,

I am very new to Unity, but ran across this URL:

http://unity3d.com/support/documentation/Components/terrain-UsingTerrains.html

The above page states:

Detail Resolution: The resolution of the map that controls grass and detail meshes. For performance reasons (to save on draw calls) the lower you set this number the better.

So, it looks like smaller numbers = faster drawing.

Hope this helps.

Rick

Comment
Add comment · Show 1 · 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 DocSWAB · Oct 20, 2010 at 08:16 PM 0
Share

I'm not sure that the newly exposed variable is the same as the overall detail resolution. Can you point to the API documentation for the call you're talking about? I can't find it -- just the mention in the release notes.

avatar image
0

Answer by Joris · Oct 21, 2010 at 01:54 PM

Well in some cases it could save you performance, but for example. If i set the value to 8 it would make tiles the size of 8 in the world resolution. In this case it means it would have to draw around 50 tiles. If i would set the value to 64 it would have to draw only 10 tiles or less but it would increase the triangles/quads. Rendering 10 tiles saves a lot of speed compared to 50 (in case im not using a lightmap for the terrain) Joris 0 secs ago

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Terrain: Detail resolution per patch 2 Answers

Problem detail resolution per patch. 2 Answers

Blender Object as Detail Mesh don't show? 1 Answer

Should Heightmap Resolution be one greater than Detail Resolution? 1 Answer

Ridges on terrain with lowering/raising height? 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