Difference between revisions of "GPU Instancer"

From GurBu Wiki
Jump to: navigation, search
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
GPU Instancer is an out of the box solution to display extreme numbers of objects on screen with high performance. With a few mouse clicks, you can instance your prefabs and Unity terrain details and trees.
+
GPU Instancer is an out of the box solution to display extreme numbers of objects on screen with high performance. With a few mouse clicks, you can instance your prefabs and Unity terrain details and trees. To provide the fastest possible performance, GPU Instancer utilizes [[GPU_Instancer:Terminology|Indirect GPU Instancing]] using Unity's DrawMeshInstancedIndirect method and [[GPU Instancer:Terminology#Compute_Shaders|Compute Shaders]]. GPU Instancing results in magnitudes of performance improvement over static batching and mesh combining. Also, other available solutions for GPU Instancing (including Unity's material option and the DrawMeshInstanced method) fail short on limited buffer sizes and therefore result in more draw calls and less performance. By using the indirect method GPU Instancer aims to provide the ultimate solution for this, and increases performance considerably while rendering the same mesh multiple times.
  
GPU Instancer provides user friendly tools to allow everyone to use Indirect GPU Instancing without having to go through the deep learning curve of Compute Shaders and GPU infrastructure. Also, an API with extensive documentation is provided to manage runtime changes.
 
  
 +
{| class="wikitable"
 +
|-
 +
| <youtube>oK3-bp9kiOE</youtube>
 +
|}
  
<youtube>oK3-bp9kiOE</youtube>
 
  
 +
----
 +
'''Features'''
 +
----
  
---------------------------------
+
 
'''Features'''
+
GPU Instancer provides user friendly tools to allow everyone to use Indirect GPU Instancing without having to go through the deep learning curve (or extensive development times) of Compute Shaders and GPU infrastructure. Also, an API with extensive documentation is provided to manage runtime changes.
---------------------------------
 
  
  
Line 23: Line 27:
 
* Easy to use interface.
 
* Easy to use interface.
  
* Tens of thousands of objects rendered lightning fast in a single draw call.
+
* [[GPU_Instancer:Features#Tens_of_Thousands_of_Objects_Rendered_Lightning_Fast_in_a_Single_Draw_Call|Tens of thousands of objects rendered lightning fast in a single draw call.]]
  
* GPU frustum culling.
+
* [[GPU_Instancer:Features#GPU_Frustum_Culling|GPU frustum culling.]]
  
* GPU occlusion culling (non-VR platforms only).
+
* [[GPU_Instancer:Features#GPU_Occlusion_Culling|GPU occlusion culling (non-VR platforms only)]].
  
* Automatically configured custom shader support.
+
* [[GPU_Instancer:Features#Automatically_Configured_Custom_Shader_Support|Automatically configured custom shader support.]]
  
* Supports HDRP and LWRP render pipelines.
+
* [[GPU_Instancer:Features#Support_for_HDRP_and_LWRP_Render_Pipelines|Supports HDRP and LWRP render pipelines.]]
  
* Complex hierarchies of prefabs instanced with a single click.
+
* [[GPU_Instancer:Features#Complex_Hierarchies_of_Prefabs_Instanced_with_a_Single_Click|Complex hierarchies of prefabs instanced with a single click.]]
  
* Multiple sub-meshes support.
+
* [[GPU_Instancer:Features#Multiple_Sub-meshes_Support|Multiple sub-meshes support.]]
  
* LOD Groups and cross-fading support (with animation or fade transition width).
+
* [[GPU_Instancer:Features#LOD_Groups_and_Cross-Fading_Support_.28with_Animation_or_Fade_Transition_Width.29|LOD Groups and cross-fading support (with animation or fade transition width).]]
  
 
* [[GPU_Instancer:Features#Automatic_2D_Billboard_Generation_System|Automatic 2D Billboard Generation System (Auto-added as Last LOD)]].
 
* [[GPU_Instancer:Features#Automatic_2D_Billboard_Generation_System|Automatic 2D Billboard Generation System (Auto-added as Last LOD)]].
  
* Shadows casting and receiving support for instances (frustum culled instances still can cast shadows).
+
* [[GPU_Instancer:Features#Shadow_Casting_and_Receiving_Support_for_Instances_.28Culled_Instances_Still_Can_Cast_Shadows.29|Shadows casting and receiving support for instances (frustum culled instances still can cast shadows).]]
  
 
* Ability to use custom shadow distance per prototype and to choose the LOD to render shadows with.
 
* Ability to use custom shadow distance per prototype and to choose the LOD to render shadows with.
  
* Unity 5.6 support.
+
* [[GPU_Instancer:Features#Unity_5.6_Support|Unity 5.6 support.]]
  
* Well documented API for procedural scenes and runtime modifications (examples included).
+
* [[GPU_Instancer:Features#Well_Documented_API_for_Procedural_Scenes_and_Runtime_Modifications_.28Example_Scenes_Included.29|Well documented API for procedural scenes and runtime modifications (examples included).]]
  
* Ability to Remove instances inside bounds or colliders at runtime.
+
* [[GPU_Instancer:Features#Ability_to_Remove_Instances_Inside_Bounds_or_Colliders_at_Runtime|Ability to Remove instances inside bounds or colliders at runtime.]]
  
* Ability to extend with custom Compute Shaders.
+
* [[GPU_Instancer:Features#Ability_to_Extend_with_Custom_Compute_Shaders|Ability to extend with custom Compute Shaders.]]
  
* Example scenes that showcase GPU Instancer capabilities.
+
* [[GPU_Instancer:Features#Example_Scenes_That_Showcase_GPU_Instancer_Capabilities|Example scenes that showcase GPU Instancer capabilities.]]
  
  
 
'''Prefab Instancing Features:'''
 
'''Prefab Instancing Features:'''
  
* Ability to automatically instance prefabs at your scene that you distribute with your favorite prefab painting tool.
+
* [[GPU_Instancer:Features#Ability_to_Automatically_Instance_Prefabs_at_Your_Scene_That_You_Distribute_with_your_Favorite_Prefab_Painting_Tool|Ability to automatically instance prefabs at your scene that you distribute with your favorite prefab painting tool.]]
  
* [[GPU_Instancer:Features#Automatically_Add-Remove_prefab_instances_without_any_aditional_code|Automatically Add-Remove prefab instances without any aditional code]].
+
* [[GPU_Instancer:Features#Automatically_Add_and_Remove_Instances_at_Runtime_.28without_any_Aditional_Code.29|Automatically Add-Remove prefab instances without any additional code.]]
  
* Automatic detection and updating of transform position, rotation and scale changes.
+
* [[GPU_Instancer:Features#Automatic_Detection_and_Updating_of_Transform_Position.2C_Rotation_and_Scale_Changes|Automatic detection and updating of transform position, rotation and scale changes.]]
  
* Full or area localized rigidbody and physics support.
+
* [[GPU_Instancer:Features#Full_or_Area_Localized_Rigidbody_and_Physics_Support|Full or area localized rigidbody and physics support.]]
  
 
* [[GPU_Instancer:Features#Nested_Prefabs_support_.28Unity_2018.3_and_later.29|Nested Prefabs support (Unity 2018.3 and later)]].
 
* [[GPU_Instancer:Features#Nested_Prefabs_support_.28Unity_2018.3_and_later.29|Nested Prefabs support (Unity 2018.3 and later)]].
Line 70: Line 74:
 
* [[GPU_Instancer:Features#Add-Remove-Update_prefab_instances_with_or_without_instantiating_GameObjects|Add-Remove-Update prefab instances with or without instantiating GameObjects (examples included)]].
 
* [[GPU_Instancer:Features#Add-Remove-Update_prefab_instances_with_or_without_instantiating_GameObjects|Add-Remove-Update prefab instances with or without instantiating GameObjects (examples included)]].
  
* Instance based material variations through API (similar to Material Property Blocks).
+
* [[GPU_Instancer:Features#Instance_Based_Material_Variations_Through_API_.28Similar_to_Material_Property_Blocks.29|Instance based material variations through API (similar to Material Property Blocks).]]
  
 
* Enabling and disabling instancing at runtime per instance basis.
 
* Enabling and disabling instancing at runtime per instance basis.
  
* API to manage instanced prefabs at runtime.
+
* [[GPU_Instancer:Features#Extensive_API_to_Manage_Instanced_Prefabs_at_Runtime|API to manage instanced prefabs at runtime.]]
  
* Includes mobile demo scene with custom controllers.
+
* [[GPU_Instancer:Features#Includes_Mobile_Demo_Scene_with_Custom_Controllers|Includes mobile demo scene with custom controllers.]]
  
  
 
'''Detail Instancing Features:'''
 
'''Detail Instancing Features:'''
  
* Dense grass fields and vegetation with very high frame rates.
+
* [[GPU_Instancer:Features#Dense_Grass_Fields_and_Vegetation_with_Very_High_Frame_Rates|Dense grass fields and vegetation with very high frame rates.]]
  
* Included vegetation shader with wind, shadows, AO, billboarding and various other properties.
+
* [[GPU_Instancer:Features#Included_Vegetation_Shader_with_Wind.2C_Shadows.2C_AO.2C_Billboarding_and_Various_Other_Features|Included vegetation shader with wind, shadows, AO, billboarding and various other properties.]]
  
* Support for custom shaders and materials.
+
* [[GPU_Instancer:Features#Support_for_Custom_Shaders_and_Materials|Support for custom shaders and materials.]]
  
* Cross quadding support: automatically turns grass textures to crossed quads.
+
* [[GPU_Instancer:Features#Cross_Quadding_Support:_Automatically_Turns_Grass_Textures_to_Crossed_Quads|Cross quadding support: automatically turns grass textures to crossed quads.]]
  
* Ability to paint prefabs with custom materials on Unity terrain (with Unity terrain tools).
+
* [[GPU_Instancer:Features#Ability_to_Paint_Prefab_Instances_with_Custom_Materials_and_LOD_Groups_on_the_Unity_Terrain_.28with_Unity_Terrain_Tools.29|Ability to paint prefabs with custom materials on Unity terrain (with Unity terrain tools).]]
  
 
* Ability to use prefabs with LOD Groups on Unity terrain.
 
* Ability to use prefabs with LOD Groups on Unity terrain.
Line 97: Line 101:
 
* API to manage instanced terrain detail prototypes at runtime (examples included).
 
* API to manage instanced terrain detail prototypes at runtime (examples included).
  
* Editor GPU Instancing simulation.
+
* [[GPU_Instancer:Features#Editor_GPU_Instancing_Simulation|Editor GPU Instancing simulation.]]
  
  
 
'''Tree Instancing Features:'''
 
'''Tree Instancing Features:'''
  
* Dense forests with very high frame rates.
+
* [[GPU_Instancer:Features#Dense_Forests_with_Very_High_Frame_Rates|Dense forests with very high frame rates.]]
  
 
* Speed Tree support with wind animations.
 
* Speed Tree support with wind animations.
Line 110: Line 114:
 
* Included billboard baker and renderers.
 
* Included billboard baker and renderers.
  
* Custom vertex color wind animation support for Soft Occlusion Tree shaders.
 
  
 +
'''Third Party Integrations:'''
  
'''Third Party Integrations:'''
+
* [[GPU_Instancer:Features#Gaia_Integration|Gaia integration.]]
  
* Gaia integration.
+
* [[GPU_Instancer:Features#Map_Magic_Integration|Map Magic integration.]]
  
* Map Magic integration.
 
  
 +
'''Lighting Limitations:'''
  
'''Planned Features:'''
+
* Baked Global Illumination is not supported for instanced prototypes.
  
* Support for animation baking and skinned mesh renderers.
+
* '''Only for Unity versions prior to 2018.2.0f2:'''' In forward rendering mode, only directional and ambient lights are supported for instanced prototypes. '''(This limitation does not apply to deferred rendering mode.)'''
  
  
Line 138: Line 142:
  
 
* Modern Consoles (PS4, Xbox One)
 
* Modern Consoles (PS4, Xbox One)
 
 
To provide the fastest possible performance, GPU Instancer utilizes Indirect GPU Instancing using Unity's DrawMeshInstancedIndirect method and Compute Shaders.
 
 
 
GPU Instancing results in magnitudes of performance improvement over static batching and mesh combining. Also, other available solutions for GPU Instancing (including Unity's material option and the DrawMeshInstanced method) fail short on limited buffer sizes and therefore result in more draw calls and less performance. By using the indirect method GPU Instancer aims to provide the ultimate solution for this, and increases performance considerably while rendering the same mesh multiple times.
 

Revision as of 02:15, 11 February 2019

About | Features | Getting Started | Terminology | Best Practices | F.A.Q.


GPU Instancer is an out of the box solution to display extreme numbers of objects on screen with high performance. With a few mouse clicks, you can instance your prefabs and Unity terrain details and trees. To provide the fastest possible performance, GPU Instancer utilizes Indirect GPU Instancing using Unity's DrawMeshInstancedIndirect method and Compute Shaders. GPU Instancing results in magnitudes of performance improvement over static batching and mesh combining. Also, other available solutions for GPU Instancing (including Unity's material option and the DrawMeshInstanced method) fail short on limited buffer sizes and therefore result in more draw calls and less performance. By using the indirect method GPU Instancer aims to provide the ultimate solution for this, and increases performance considerably while rendering the same mesh multiple times.




Features



GPU Instancer provides user friendly tools to allow everyone to use Indirect GPU Instancing without having to go through the deep learning curve (or extensive development times) of Compute Shaders and GPU infrastructure. Also, an API with extensive documentation is provided to manage runtime changes.


  • Out of the box solution for complex GPU Instancing.
  • VR compatible. Works with both single pass and multipass rendering modes.
  • Mobile compatible. Works with both iOS and Android.
  • Easy to use interface.
  • Ability to use custom shadow distance per prototype and to choose the LOD to render shadows with.


Prefab Instancing Features:

  • Enabling and disabling instancing at runtime per instance basis.


Detail Instancing Features:

  • Ability to use prefabs with LOD Groups on Unity terrain.
  • Further performance improvements with automatic spatial partitioning.
  • API to manage instanced terrain detail prototypes at runtime (examples included).


Tree Instancing Features:

  • Speed Tree support with wind animations.
  • Tree Creator support with wind animations.
  • Included billboard baker and renderers.


Third Party Integrations:


Lighting Limitations:

  • Baked Global Illumination is not supported for instanced prototypes.
  • Only for Unity versions prior to 2018.2.0f2:' In forward rendering mode, only directional and ambient lights are supported for instanced prototypes. (This limitation does not apply to deferred rendering mode.)


Requirements:

  • DirectX 11 or DirectX 12 and Shader Model 5.0 GPU (Windows, Windows Store)
  • Metal (macOS, iOS)
  • OpenGL Core 4.3 (Windows, Linux)
  • Vulkan (Android, Windows, Linux)
  • OpenGL ES 3.1 (Android 8.0 Oreo or later)
  • Modern Consoles (PS4, Xbox One)