How To Reduce Per Patch Cpu Draw In Unity
- Spaces
- Default
- Help Room
- META
- Moderators
-
- Topics
- Questions
- Users
- Badges
- Dwelling house /
2
Detail resolution per patch
I take been developing my game for some time now and i have a total of 12 big terrains. In unity iii here is a open variable (particular resolution per patch) which was originally hard coded on 8. Irresolute this value will wipe my splat-maps clean and i would take 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
5 Replies
· Add your reply
- Sort:
four
Answer by ZeBronca · Aug 23, 2022 at 01:13 AM
Ok, beginning of all, thank you for saving my game. I read your question and I decided to investigate the outcome. According to what I empathise, the terrain detail/grass data is represented in a 2D assortment. And then each element of the array represents a small-scale square on the terrain, a chunk of grass/particular. Equally we know, the bigger the assortment/resolution, better precision nosotros have positioning the grass. Notwithstanding, it is not feasible to draw clamper past chunk: in a 1024x1024 resolution it would result at to the lowest degree in i Million drawcalls (if nosotros draw the whole terrain). So, Unity batchs those chunks based on the "Particular Resolution Per Patch". If you have it prepare to 8, in a 512x512 particular res map, we would take (512x512) / (8x8) = 4096 batchs (and at least 4096 drawcalls). This mode, in guild to reduce drawcalls, you lot should increase "Detail Resolution Per Patch", for example to 128 (the maximum). In a 512x512, it would exist (512x512) / (128x128) = xvi batchs. Since it seems Unity needs a couple of describe calls to draw a single batch (someone right me if I'm wrong) information technology would take 32 drawcalls to describe 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 ready it to 128 in near cases.
But that does non reply your question. Co-ordinate to my tests, you tin change the "Particular Resolution Per Patch" without affecting the terrain at all. Regarding changing the "Item Resolution", yep, it erases all details in the scene, only you may try using the scripts at http://forum.unity3d.com/threads/43085-Small-Terrain-Scripts.
1
Answer by Martian-Games · Sep 25, 2022 at x: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 than costly as this refers to the bitmap.) Joris however is referring to the parameter following: "Detail Resolution Per Patch" where indeed larger values reach faster functioning because dividing the array past larger 'chunks' reduces the size of the array.
0
Answer past Bill vi · Oct thirteen, 2022 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. Whatever info would be great. What i do know is that yous can't change it without losing your maps. You can simply change the height map and the size of the terrain without sacrifing your work so far.
0
Answer by user-5422 (google) · Oct twenty, 2022 at 05:56 PM
Hi,
I am very new to Unity, but ran beyond 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 item meshes. For performance reasons (to save on depict calls) the lower y'all set up this number the ameliorate.
So, it looks like smaller numbers = faster cartoon.
Promise this helps.
Rick
I'thousand not certain that the newly exposed variable is the same as the overall detail resolution. Can you point to the API documentation for the telephone call you're talking nearly? I can't find it -- just the mention in the release notes.
0
Answer past Joris · October 21, 2022 at 01:54 PM
Well in some cases it could salve y'all 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 information technology would take to depict around 50 tiles. If i would set the value to 64 information technology would have to draw only ten tiles or less but it would increase the triangles/quads. Rendering 10 tiles saves a lot of speed compared to fifty (in example im not using a lightmap for the terrain) Joris 0 secs ago
Your answer
Welcome to Unity Answers
The best place to inquire and answer questions nearly development with Unity.
To help users navigate the site we take posted a site navigation guide.
If y'all are a new user to Unity Answers, check out our FAQ for more data.
Make certain to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, encounter our Moderator Guidelines page.
We are making improvements to UA, come across the list of changes.
Follow this Question
Related Questions
Source: https://answers.unity.com/questions/29663/detail-resolution-per-patch.html
Posted by: nevillehalight.blogspot.com

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