Hi there, There should be an error message in the manager and/or in the console window related to this. The issue is most likely that GPUI cannot find the instanced version of the shaders. For example, if you have changed the location of the folders or your shader files, this would create the problem you mention after an update since the references could be lost to the auto-converted shaders. As for the issue you reported for 1.2.1, the error should not appear in later versions. The tree proxy and hi-z occlusion generator shaders are now added to your builds automatically even if you don't manually put them.
Is this the reason for the HDRP (6.9.0) terrain paint details not working? Everything is pink, but during run-time/play mode everything looks fine? HDRP terrain tree painting works in scene, but nothing is showing during run-time? Does it matter if I used the tree manager to do lots of grass/detail instead of detail painting or would it kill performance? Likewise if I only use prefabs and the prefab manager for everything? What GPU instancer managers should I be using when using the HDRP pipeline?
"The game objects are instantiated with the MeshRenderers turned of because GPUI takes over their rendering." how can I turn them on after instanciating to build the NavMesh and then turn them off for GPUI ?
The following is from the forum post dedicated on Crowd Animations. At this point, we cannot give an ETA.
The reason why terrain details don't show in HDRP is because Unity does not still offer a working HDRP grass shader. That is, the details would look pink without GPUI too. However, when you run the scene GPUI takes over the rendering with the auto-created HDRP Lit shader and your details start showing correctly. The main difference between the Tree Manager and the Detail Manager is that the latter uses spatial partitioning techniques to lower GPU memory usage; you would not see a noticeable difference in performance unless you have millions of detail instances. You could also use the Prefab manager to the same effect with the Tree Manager in terms of performance. Also, you can take a look at the best practices wiki.
You can disable GPUI Manager you are using to enable the MeshRenderers at any time. Enabling it again will turn the Mesh renderers off and render your registered instances with GPUI.
sadly this does not work as expected. the good thing is, now I can generate the navmesh after disable the GPUI Manager. But after GPUI Manager enabled the Mesh renderers behave random. I try to do GPUInstancerPrefabManager.UpdateTransformDataForInstance(GPUInstancerPrefab); what sometimes work sometimes not even with very close similar objects. enable disabel the GPUI Manager in Editor improves this behavior a bit but also not at 100%;
I just got this error. Not sure if this has been reported or if any solutions exist around this. On HDRP. Code (CSharp): Compute shader (CSTextureUtils): Property (source) at kernel index (0) has mismatching texture dimension (expected 2, got 5) UnityEngine.ComputeShader:Dispatch(Int32, Int32, Int32, Int32) GPUInstancer.GPUInstancerUtility:CopyTextureWithComputeShader(Texture, Texture, Int32, Int32, Int32, Boolean) (at Assets/InitialStuff/GPUInstancer/Scripts/Core/Static/GPUInstancerUtility.cs:3207) GPUInstancer.GPUInstancerHiZOcclusionGenerator:UpdateTextureWithComputeShader(Int32) (at Assets/InitialStuff/GPUInstancer/Scripts/GPUInstancerHiZOcclusionGenerator.cs:232) GPUInstancer.GPUInstancerHiZOcclusionGenerator:OnEndCameraRendering(Camera) (at Assets/InitialStuff/GPUInstancer/Scripts/GPUInstancerHiZOcclusionGenerator.cs:221) GPUInstancer.GPUInstancerHiZOcclusionGenerator:OnEndCameraRenderingSRP(ScriptableRenderContext, Camera) (at Assets/InitialStuff/GPUInstancer/Scripts/GPUInstancerHiZOcclusionGenerator.cs:187)
This should be fixed in GPUI version 1.2.3. The issue was that Unity changed the format of the depth render texture that they use in the HDRP versions for Unity 2019.2. If you are still having this issue with GPUI v1.2.3, can you please tell us which Unity and HDRP versions you are using?
Code (CSharp): // Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "SFShaders/segment shader" { Properties { } SubShader { Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" } Cull Back CGPROGRAM #pragma target 5.0 #include "UnityCG.cginc" #include "Assets/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc" #pragma multi_compile_instancing #pragma instancing_options procedural:setupGPUI #pragma surface surf Standard keepalpha addshadow fullforwardshadows struct Input { half filler; }; void surf(Input i , inout SurfaceOutputStandard o) { o.Albedo = float3(1, 0, 0); } ENDCG } //Fallback "Diffuse" CustomEditor "ASEMaterialInspector" } This is my simple shader I am using with gpu instancer. The problem is the objects are being rendered black instead of red
Hi there, we have tested this, and this shader works as intended with GPUI: The issue might be caused by a screen space effect on your camera, or any other external tools you might be using.
I was using no gameobject workflow. DefineGameObjectAsPrefabPrototypeAtRuntime and InitializeWithMatrix4x4Array and the object was black After that I created a prefab with same material and added it to gpu instancer prefab manager and it started working both on the instances of prefab and the instances on no gameobject workflow
GPUI keeps track of the custom shaders and shader variants on the defined prototypes within GPUInstancerShaderBindings and GPUIShaderVariantCollection. If you use a no-gameobject workflow with no predefined prototypes these shaders and variants are not registered. In this case you can either once add these prefabs to the Prefab Manager to register them as you did, or right click on your material and select GPU Instancer -> Setup Material for GPUI
Yes, we removed all missing field from the Map Magic Data and it worked, GPUI is amazing!! Our grass looks so much better than before and the performance is really good. We just have now a issue with the Occlusion Culling, sometimes it's calculating the Bounds of the objects wrong, or at least I think that's the issue, here the Bug: Sometimes the Trees disappear even they should be in view and it's only when you move the camera. Also, the settings in the GPUI Map Magic Integration don't save the settings in our Project when we Import new Prototypes, is there a way to restore these settings or do we just have to uncheck all other Prototypes which are already Imported? Also, we added in GPUInstancerHiZOcclusionGenerator.cs 3 lines at line 218 just because we got problems with our water which does change the _CameraDepthTexture: Code (csharp): if ( unityDepthTexture != null ) if ( unityDepthTexture.name != "_CameraDepthTexture" ) unityDepthTexture = null; So maybe considering to adding it in future versions, on the same Frame it gets the _CameraDepthTexture again. Thanks for the Amazing tool, all the best flow.
Is there a way to make objects in the GPUInstancer pipeline show up when rendering a camera with RenderWithShader? I am using a replacement shader for thermal/IR vision and GPUInstancer to render trees, but I cannot get them to show up in the camera when the replacement shader is active.
Hey sorry if this has already been answered, I'v been getting weird multi colored glowing ghost geo flashing at certain angles, all the shader conversion stuff seemed to work fine, but if I stand in a spot where everything that's GPU instanced is being occluded, I see huge transparent ghostly versions of that geo swiping around the screen. I can't do a screenshot right now, I'd need to get permission from my producer and make sure it's approved to post it, was just wondering if anyone else encountered this, or has a fix? Thanks in advance. I'll post a screenshot if I can later.
Hi, I Picked this up today. it looks way better and runs faster than what I managed to crap out. Part of my game lets you cut grass and collect points. I added my own mower and have it "cutting". I want it to add a score every time it "cuts". The old solution I used "grassAdd.Grass += 1;" anytime the mower had a collision with the grass collider. I've been trying to add that to the GPUinstanceremover script but the best I can manage is having continuously count up regardless if it has been cut or not. Am I on the right track? Thanks.
The Tree Manager is not rendering during run-time with HDRP? I'm using Unity 2019.2.6f1 HDRP 6.9.0. Thanks!
Thank you for the feedback. The occlusion culling feature requires the _CameraDepthTexture to work, so if you modify this it could break. You can enable the debugger from the HiZOcclusionGenerator script that is added to your camera during play mode, which would overlay the texture that GPUI is using for its culling operations on the screen. The flickering issue looks like caused by the incorrect depth texture, and you can verify it from this debugger.
You could try setting up your replacement shader to work with GPUI, and disable the Use Selected Camera Only option from your manager.
Hi there, it looks like a shader incompatibility. GPUI auto converts most shaders, but in some cases you might need to manually set the shader up. You can take a look at this wiki page to setup your shader manually for GPUI.
Hi there, The remover script works on the GPU, so using it for calculating how many you have removed would not be ideal. On the other hand, GPUI does not remove the colliders on instanced objects, so your solution should still work if you use your old system and have the manager use the "Auto. Add/Remove feature".
This worked, thanks! However, I just realized the trees do not show up even when rendering normally. It seems to be because I am rendering the camera by calling Camera.Render while Camera.enabled is set to false (reason why is to manually control the framerate of the camera). My best guess is that draw calls submitted with DrawMeshInstancedIndirect do not show up when rendering with Camera.Render. I "solved" this by enabling the camera for a single frame whenever I want it to render instead of calling Camera.Render, but it might be worth noting this limitation in the documentation.
Hey guys, just purchased the asset and it's already doing wonders in our high polycount scene. However, when running a build on a pc without a dedicated gpu, it actually makes the performance way worse. Is there a way to detect whether the build is running on a machine with a capable graphics card or not in order to either enable or disable the Instancer managers?
Thanks for your reply. Alright so if I understand correctly, some scenes are not able to function in HDRP which means HDRP is not fully supported? If so, you should really make this clear on the asset store page, because it simply says the following: And so, the only limitation I was aware of (even after reading the documentation) is Could you state which features are not supported out of the box for HDRP? Anyway, I think GPUI can still be very useful for me and all the demo scenes look really great. The demo I am mainly interested in is the DetailInstancingDemo. I'm aware HDRP has issues with (or doesn't support) details on terrain. So what I'm interested in, is if there's a way I could recreate this scene for example by treating the details as Terrain Trees or maybe just as game objects and feeding them to GPUI? Thanks, Lenne
I purchased your asset a year ago for a game I am working on, great piece of work. However I have a question; Recently Unity announced DOTS and I am wondering if there are benefits on using your asset over ECS. I am about to start implementing ECS, but before I go down that rabbit hole I thought I should ask if you could help cure my ignorance on the differences. (sorry about my ignorance) Thanks kindly, and have a wonderful weekend
I'm interested in this asset, I know it does not directly work with Vegetation Studio, but I was wondering if I could use Vegetation Studio for my terrain and this asset for the map detail and props?
I recently purchased this asset but am disappointed to find that it might not work for what I'm doing. For my project I need to populate terrain with thousands of trees, and the terrain will generally be viewed from a high vantage point. I was hoping to use the auto billboard generation to make this possible, but right now GPU Instancer only generates billboards for side views. I know this is how billboards generally work, but it limits what this asset can be used for. Is there currently any way to have GPU Instancer generate a top-down billboard? If not, is this something you would consider adding as an option? Would be a HUGE help for my project. Not sure how I'm going to achieve what I want to do otherwise since without billboarding the FPS drops to 5-10. Along with that, is it possible to change the distance at which billboards are created? The pop-in is really bad when a forest is viewed from the top. Since the quality of individual trees isn't super important it'd be nice to save on resources by using just billboards. Thanks in advance for your consideration EDIT: just discovered that the standard Unity terrain has options for changing the distance billboards are displayed at and also displays a top-down billboard. Would still be nice for GPU Instancer to support this!
Tree Manager doesn't work with baked shadows. Tried both IsShadowCasting on and off. You can see the error in the game view. Scene looks fine if I disable Tree Manager prior to starting the scene.
I'm new to using the GPU Instancer so pardon me if these questions make no sense. I've so far instanced 60 different runtime generated prefabs through code but I'm at 1 fps since many of those prefabs are buildings (from the Dark City 2 pack) with hundreds of thousands of gameObjects. Going off the runtime tutorial in the unitypackage and your video from: 1. How do I handle runtime generating a bunch of building prefabs with nested gameObjects? Codewise, would I need loop through every building and add each wall/window to the instance prefab list and each instance of that wall/window (for multiple buildings) to the instance list? 2. What if two different buildings have the same window? Does the instance prefab list need to be unique? Will GPU Instancer know to handle them in the same batch/similarly? 2.5 What if the two windows have the same mesh but different materials (or v.v.)? Should I add both to the instance prefab list? 3. Finally, what about nested gameObjects without any mesh filters/renderers (i.e. colliders or blank parent gameObjects of a bunch of walls, for example), will the program ignore them for batching?
Is it possible to change the LOD Bias Adjustment during runtime? Would be great to allow the user to pick a quality level. Setting lodBiasAdjustment from code doesn't seem to have any effect while the game is running.
Yes, since GPUI leverages the power of the GPU to free resources in the CPU, it would beat the purpose if you use it in a shared system with no dedicated GPU. The queries that you can make from Unity would be in the SystemInfo class but as far as I know there is no query that you can make to determine whether a platform has a dedicated GPU. You could try something like: if (SystemInfo.graphicsDeviceName.Contains("Intel") || SystemInfo.graphicsDeviceName.Contains("Integrated") to cover the mostly used integrated GPUs, but of course this would not cover every integrated GPU out there.
We have tested the Tree Manager with Unity 2019.2.6f1 and HDRP 6.9.0 with trees that use the HDRP Lit shader and all seems to be working in order. Can you tell us what tree shader you are using?
It is not the case that some HDRP scenes don't function with GPUI, rather, GPUI's demo scenes are not designed for HDRP (they don't have versions that have HDRP specific shaders). GPUI is designed to provide out of the box indirect instancing to provide performance, and this will work in HDRP scenes as well. However, GPUI also provides some custom tools for ease of use and visual quality, (e.g. the LOD color changer or the Foliage shader) which are designed for the Standard pipeline and these don't have additional HDRP versions (reason for this being Unity changing the HDRP shaders with each update and also not supporting indirect instancing with shadergraph yet). You can use the detail manager by using a custom HDRP foliage shader that is setup to use with GPUI. But again, Unity has not improved the shadergraph to allow for this setup so the shader must be written without it.
Hi there, GPUI is a rendering solution, as opposed to DOTS. Thus it would lower your draw calls and leverage the power of your GPU for rendering unrelated to whether you use DOTS or not. Please have in mind, however, if you are planning to use GPUI with DOTS, you need to use a no game object workflow since you do not have conventional GameObjects with DOTS.
Hi there, Yes, VS and GPUI can't work on the same objects. However, you can use GPUI for your prefab instances and VS for your vegetation in the same scene.
Hi there, You can change the billboarding distance from the Billboard Settings. As for the top down billboards, GPUI has a 2D billboard generation system as you mentioned; however it also supports custom billboards, so you can either make your own billboards or use other tools (such as the Amplify Impostors) if you want more detailed billboards.
Hi there, Unity does not support indirect instancing with baked shadows. You can check GPUI's lighting limitations from here.
Hi there, you can check this wiki page to determine what you should define as a prototype to the Prefab Manager. The page also contains information on Nested Prefabs. For runtime added instances, you can use the Auto. Add/Remove instances feature, which does not require you to write any additional scripts. If you wish to register your instances from code, however, you can take a look at the AddRemoveInstancesDemo scene for an example. Also, GPUI checks the original prefab for the material, so the variations on the prefab instances will not be registered. For an example for material variations, you can check the ColorVariationsDemo scene. Finally, GPUI only checks the Mesh Renderers and LOD Groups on the prefabs, so all other components will be ignored. GPUI disables the renderers and takes over rendering, leaving all other components intact.