CRO Mesh Cluster - Frame Rate Booster
CodeRoadOne
$149.99
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
11/23(2021) |
149.99 |
11/23(2021) |
104.99 |
12/07(2021) |
149.99 |
11/19(2024) |
149.99 |
Jump AssetStore
CRO Mesh cluster contains the source code and shaders to optimize the CPU usage and unlock the true power of the GPUURP 10.6.0 is the default URP version of this packageFor URP 11.0.0 you will need to install the package: CodeRoadOne\CRO_MeshCluster\ScriptsAndMaterialsForURP.11.0.0.unitypackageFor URP 12.0.0 you will need to intall the package: CodeRoadOne\CRO_MeshCluster\ScriptsAndMaterialsForURP.12.0.0.unitypackageCRO Mesh cluster is a virtualized geometry system that is using an internal mesh format and render technology.Initial setup: (it will not work if this step is not done).1. After importing the tool you need to go to Window -> CRO Mesh Cluster.2. Press Setup CRO Mesh Cluster (if you have an URP project)3. Press URP -> CRO (this will convert all shaders from URP to CRO shaders)Demo scene setup: (the demo will not work if the following steps are not done).1: Open build setting2. Add 00_Boot on position 03. Add 01_StaticScene on position 14. Add 02_DynamicScene on position 25. Add 03_CollectedScene_CRO_EXPORTED on position 3Performance considerationsThis is a GPU intensive code and the performances will vary depending on the GPU card used. For example the demo scene include with the tool contains over 150 different meshes and over 55.000 game objects. We tested the FPS on two different PCs:First PCCPU Intel I7-9700K @ 3.60GHz8 Cores with 8 Logical CoresGPU NVidia RTX 2080FPSMesh Cluster Enable: 250-350Mesh Cluster Disabled: 45 - 75Second PCCPU Intel Xenon E5-2630 @ 2.30GHz12 Cores with 24 Logical CoresGPU NVidia GeForce GTX 1050 TiFPSMesh Cluster Enabled: 70-80 (without video recording)Mesh Cluster Disabled: 25-40Dynamic meshes are supported (moved, rotated or scaled every frame), there are some CPU implications on having 50.000 moving objects (getting the transform from Unity is not very fast).This code is heavy on the GPU side, this means on a slow GPU it will perform a worse than the native Unity renderer.If you have a lot of triangles in a scene and you don’t use LOD groups, you will end up with a slower version of the game (faster on CPU, but slower on GPU).To see a performance improvement, you will need a lot of different objects, and a few materials.The number of draw calls is increasing with the number of different materials. We will investigate on how to allow some parameters to change between materials in an attempt to minimize even more the number of draw calls.In Mesh Cluster Settings you are allowed to set the number of triangles per cluster. This is very important and can affect the performances in a bad way. Default we set it to 64 triangles. This means a mesh will always be converted to a multiple of 64 triangles so our rendering method will work. This means if you have a mesh with 4 triangles we will add 60 empty triangles, so the idea is that if you have less than 64 triangles is not necessarily better. Same thing if you have for example 65 triangle, we will create 2 clusters of 64 triangles, so your mesh will have 128 triangles in the end. To be super-efficient with this system it is recommended to have meshes that are multiple of triangles you set in the mesh cluster settings. Other things that you need to take into consideration, if you decrease the number of triangles per mesh, it will be a lot more expensive to do the visibility and not to mention the overhead of adding a bounding volume per every cluster, materials properties and so on, so decreasing it too much will make the game run slower.Mesh Cluster known restrictionsRender techWe support only URP (Universal Rendering Pipeline)LOD Group restrictionsLOD’s don’t have local transform saved. This means in all lods must have the Position and Rotation set to 0,0,0 and the Scale set to 1,1,1The first LOD (lod0) will give the visibility and shadow casting mode for the lod group. The rest of the lods are not checked and the visibility and shadow casting.Lighting restrictionsForward rendering, for the moment, supports only one directional light. There is no easy access to the internal unity list of lights so we will need to make a workaround until that data will be available from the engine. We will try to fix this in a later release. Deferred rendering path does not have this issue.We don’t support dynamic lights at this moment (in a later release we could allow one or two dynamic lights, but this will be after we fix the first part where we need to support more than one light)Light probes are computed for location 0, 0, 0. This means the probe occlusion and SH coefficients are not correct. We will try to rectify this in a later release, if possible, also we will need to see at what level of accuracy we can do it (This should be done after we support more than one light).Baked lighting – not working. We need to investigate Unity support for this feature.Only one directional shadow is supported. Adding the support for additional shadows will be investigated for later releases.Camera restrictionsWe didn’t test AR cameraVR has limited support for the moment. Two passes work as expected but it is very expensive in terms of rendering. It seems that we render everything 8 times instead of 3 times in our test scene. We will try to fix this issue as soon as possible.Shader/Material restrictionsMesh cluster is coming with the following shaders support:CRO_Lit that is a copy of the Universal Render Pipeline/Lit shader. It has all the properties but not everything is supported (check the known restrictions for more details, in particular lighting)CRO_Simple Lit, as the previous it is a copy of the Universal Render Pipeline/Simple lit shader.CRO_Unlit is a copy of Universal Render Pipeline/Unlit shader.Custom shadersCan be created, but it is not simple task. We will explain how to do a custom shader in a separate tutorial.We added support (automatic conversion to CRO shaders) for Universal Render Pipeline/Lit, Universal Render Pipeline/Simple Lit and Universal Render Pipeline/Unlit.We don’t support changing the materials at run time (we will investigate to see if we can support this and release it in a later version)Skinned object – not supported (we need to investigate and see if we can support them)Particles – not supportedTransparency – not correctly sorted. We don’t sort geometry at this moment, so we cannot render transparency back to front. A later version will support per material and per cluster sorting. This is still not correct but it will work a lot better.No support for HDR colour as vertex inputDepth texture featurePartially supported if occlusion culling is used. At this moment we render to the depth buffer only the objects that are visible taking into account the previous depth buffer. This means a few objects will not exist in the new generated depth buffer. We will try to fix this in a future release.Mesh rendererAt this time mesh cluster data and the mesh renderer data are loaded in memory. We don’t have a solution for this problem as some Unity feature require mesh renderer data to be in memory and CPU accessible. We will investigate possible solution for removing the data that when you don’t need it.Platforms supportedWe didn’t test Linux or MacOS, so we cannot say if the code is working or notPC version:We didn’t test OpenGL versions but we won’t support them officially.DX11 fully supportedDX12 crashes inside Unity code (there is nothing we can do for this)Vulkan version is really slow (we will investigate and if it is from our side, we will fix it)On Unity 2021.2 if you build a version and then play in editor everything will work as on DX11 (no slow downs, probably first time is taking along time to compile all shader variants), also the stand alone version does not have any slowdowns.Android version:Working with Vulkan but it is very slow (maybe the video card is not fast enough for mesh cluster)IOS version:Metal version is crashing inside Unity code (there is nothing we can do for this)Consoles:We didn’t test on any, but in theory they should work unless there is another crash inside Unity code.Unity version supportedWe tested with Unity 2020.3. Just to let everyone know we will officially support only the LTS versions of Unity. If a LTS version is remove we will remove official support for it as well.Unity 2021.1 (you will need to manually unpack the 2021.1 version for shaders and materialsUnity 2021.2 (same as 2021.1, needs manually unpack of the shaders and materials)Unity 2022.1 (same as 2021.2, needs manually unpack of the shaders and materials)DisclaimerThere could be other restrictions that we didn’t find yet. If you buy this product and you encounter an unlisted restriction, please let us know so we can try to fix it if possible.We are not responsible if you encounter errors that are impossible to fix (crash inside Unity or other packages that are not related to ours). We will still try to help you as much as we can and try to find for you a work around the error/issue.Known issuesWe compress the data aggressively and there are some differences between Unity Renderer and Mesh Cluster rendering (Render Quality).We emit different draw calls for shadows even if the shadow parameters of different materials are identical (Rendering Performance).We emit different draw calls for depth pre-pass even if the depth pre-pass parameters of different materials are identical (Rendering Performance).When creating a new shader or assigning a new material to a mesh we don’t correctly detect it.Workaround: Open advanced settings and press Cleanup export stats, then press setup/export current scene or setup everything.