A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by LouskRad, May 3, 2018.
does it working with Book of the Dead HDRP?
i got these errors ...
what is difference between GPUI lit shader and original HDRP lit shader??
have to using GPUI lit shader against of original HDRP?
The purpose of this method overload is to update the buffer partially. arrayStartIndex is the start index of the array that you supply to this method. bufferStartIndex is where you want to start when updating the buffer you've created with the InitializeWithMatrix4x4Array method for GPUI. count is how many of the matrix you wan to update, starting with the arrayStartIndex of your matrix array.
For upgrading a single matrix, you can give its index in your matrix array, its index on the buffer and the count as 1. For example if you are using a matrixArray that you have initialized the manager with, and wish to update the 3rd matrix in the array, you can do:
UpdateVisibilityBufferWithMatrix4x4Array(manager, prototype, matrixArray, 3, 3, 1);
This override was designed in the spirit of Unity's ComputeBuffer.SetData method.
Can you please contact us via support mail with your invoice so we can send you a fix.
we are working on an option to increase the Occlusion Culling accuracy in the manager. This will be available in the next update.
If you wish to manually handle the shaders that go in your builds, you can turn off the automatic handling of the shader variants collection from Edit -> Preferences-> GPUInstancer. You can turn off the Generate Shader Variant Collection option from there.
this problem is caused by the Book of the Dead project using an older, unsupported version of HDRP. You might try fixing the paths in the GPUI generated shaders, but please note that Tesselation is not supported with GPU Instancing in Unity.
GPUI creates a version of the original shader that is setup to work with itself. These shaders always have the "_GPUI" suffix.
in runtime or on adding prefabs?
This asset looks amazing!
I have one important question to ask: does this asset only work with prefabs? If I have a scene with 10k of the same GameObjects but none of them are prefab, will Frustum Culling and Occlusion Culling still work?
That would be awesome! BTW did you check out the culling solution Unity used in their Book of the Dead?
I tried it out yesterday and was very impressed by the level of detail and low on-screen triangles counts - 50-70K for a photorealistic environment. Maybe it could help you to achieve even further improvements!
Hello! I'm currently prototyping a space game with LOTS of units and TONS of bullets) I'm using ECS to calculate AI and movement and collisions and stuff, and it is working nicely, but how do I approach rendering entities using GPUI? Can you give a tip or a mini-guide maybe?
I wrote to you in the mail.
When I try to add the prefab manager to my scene, I get this error:
Instance of GPUInstancerPrefabManagerEditor couldn't be created. The script class needs to derive from ScriptableObject and be placed in the Assets/Editor folder.
Not sure why I'm getting this or how I should resolve it. This is Unity 2019.1.12f1 and the latest available GPU Instancer from the asset store.
on adding prefabs.
Out of the box, GPUI is designed for use with prefabs that you have instances of in the scene, but there are API methods for other options for runtime created GOs or a no-GO workflow. However, GPUI also comes with a tool that you can replace your scene GOs as the instances of a prefab.
we have plans to add a demo scene or a tutorial that shows how you can use GPUI with ECS/Job system, but at this point I cannot provide an ETA for this.
This might happen when you move GPUI folders into different assemblies (using ASMDEFs), and/or when you move some GPUI files into or out of special Unity folders, such as "/Plugins" or "/Editor". Can you please check if you set your assemblies correctly in your project?
I just wanted to let you know that the GPU Instancer team will be on a summer break until August 31st. We will be answering all the questions and support requests after the break.
Tree disapeared when I use Vegetation Studio? What should I do?
how can I update the Tree Manager on runtime? I would need to be able to create and remove tree instances. I couldn't find solution from the demos or the wiki.
Hey i have a small issue with the GPU instancing. When i add it to my scene it removes most of my grass when viewed from the camera but it also gives me this "missing" shader error:
Can you help?
It is worth mentioning im using unity 2019.1 and HDRP
Thank you for this great asset ! I bought gpui and crowd animations plugins. Both are simply a bless !!!
There is a way to implement your ‘frustum occlusion algorithms’ with other game object in my game that not use gpui ? (Object with small count) if no, can you advise about other asset that I can use to achieve this ?
Thank you so much and keep up the good work
+1 for SECTR integration / 5* as of today >= 233
Has anyone run the GPUI or GPUI Animation system using Unity 2019.2?
Hello, I recently purchased your GPU instancing asset and so far it seems pretty good. I have however been having a few problems with instancing SpeedTree terrain trees. After adding the Tree Manager and running the game, it seems that the generated billboards pop and flicker when moving the camera. They seem to be generating views where the leaves are not shown, or just the branches and no leaves.
Here is an image of the generated billboard atlas, as you can see two of the eight frames are glitched.
Help would be appreciated, thanks!
oculus player controller
and vr occlusion culling,
and activating "Use Fixed Update For Tracking" on the OVR Camera Rig causes culling to flash as soon as input is detected. close up crossquads are not effected
some maybe be mistaking this for other culling bugs
I'm seeing Performance Reporting log the following error a lot recently (e.g. for 59 unique players on Steam over the last 12 hours or so):
ArgumentException: Kernel 'CSInstancedRenderingVisibilityKernelLOD0' not found.
GPUInstancer.GPUInstancerManager.Awake () (at <00000000000000000000000000000000>:0)
This message is also reported at the time of the crash:
Kernel 'CSInstancedComputeBufferSetDataPartialKernel' not found
I'm also seeing a lot of warnings like the one below. However, when I check each game object, there are no missing components:
The referenced script on this Behaviour (Game Object 'paper_4') is missing!
Any ideas as to what is causing this? The build is 2018.4.5f1 on Windows 10.
Hi, while profiling, I found this. I'm using the latest GPUI and 2019.1.13
GPUI is taking about 30% of the whole CPU cycles.
I have very simple GPUI setup and GPUI shouldn't be too taxing.
Could you please explain what "Semaphore.WaitingForSignal" is doing here?
Getting a crash when adding GPUI Tree Manager()
NullReferenceException: Object reference not set to an instance of an object
GPUInstancer.GPUInstancerUtility.DetermineTreePrototypeType (GPUInstancer.GPUInstancerPrototype prototype) (at Assets/GPUInstancer/Scripts/Core/Static/GPUInstancerUtility.cs:1436)
GPUInstancer.GPUInstancerUtility.AddTreeInstancePrototypeFromTerrainPrototype (UnityEngine.GameObject gameObject, System.Collections.Generic.List`1[T] treeInstancePrototypes, UnityEngine.TreePrototype terrainTreePrototype, System.Int32 treeIndex, GPUInstancer.GPUInstancerTerrainSettings terrainSettings) (at Assets/GPUInstancer/Scripts/Core/Static/GPUInstancerUtility.cs:1343)
GPUInstancer.GPUInstancerUtility.SetTreeInstancePrototypes (UnityEngine.GameObject gameObject, System.Collections.Generic.List`1[T] treeIntancePrototypes, UnityEngine.TreePrototype treePrototypes, GPUInstancer.GPUInstancerTerrainSettings terrainSettings, System.Boolean forceNew) (at Assets/GPUInstancer/Scripts/Core/Static/GPUInstancerUtility.cs:1320)
GPUInstancer.GPUInstancerTreeManager.GeneratePrototypes (System.Boolean forceNew) (at Assets/GPUInstancer/Scripts/GPUInstancerTreeManager.cs:48)
GPUInstancer.GPUInstancerTerrainManager.SetupManagerWithTerrain (UnityEngine.Terrain terrain) (at Assets/GPUInstancer/Scripts/Core/Contract/GPUInstancerTerrainManager.cs:114)
GPUInstancer.GPUInstancerEditorConstants.ToolbarAddTreeManager () (at Assets/GPUInstancer/Scripts/Editor/GPUInstancerEditorConstants.cs:627)
Name Value Type
◢ prototype.prefabObject.GetComponent<LODGroup>().GetLODs().renderers.sharedMaterials UnityEngine.Material UnityEngine.Material
 null UnityEngine.Material
if (prototype.prefabObject.GetComponent<LODGroup>().GetLODs().renderers.sharedMaterials == null)
prototype.treeType = GPUInstancerTreeType.None;
Another issue, occurs after adding GPUI Tree Manager()
Shader error in 'GPUInstancer/Nature/SPDTree': undeclared identifier '_DitherMaskLOD2D' at Assets/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc(59) (on d3d11)
Compiling Vertex program with UNITY_PASS_DEFERRED LIGHTPROBE_SH UNITY_HDR_ON LOD_FADE_CROSSFADE PROCEDURAL_INSTANCING_ON LOD_FADE_PERCENTAGE EFFECT_BUMP EFFECT_HUE_VARIATION GEOM_TYPE_LEAF
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
UNITY_VERSION needs to be updated? This was mentioned months ago in another post but I'm on the latest version
I have the problem with Speedtree 8 and Unity 2019.2.1f1.
I would like to ask a generalized question, how is GPU Utilization and GPU Instance related? Please let me know, in some scenes, there is 35% GPU utilization, and in some scenes there is 43%. In most games 43% is norm, so I am not bothered but still I would like to know why do much difference.
@LouskRad : I'm getting an error. I'm on 2019.2.1f1
Shader error in 'GPUInstancer/Nature/SPDTree8': undeclared identifier '_DitherMaskLOD2D' at Assets/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc(59) (on d3d11)
Edit: Which makes my trees do this for some reason.
I fixed the issue simply by commenting out
uniform sampler2D _DitherMaskLOD2D;
//#endif // LOD_FADE_CROSSFADE
Not sure if this has any unintended side effects. But it appears to be running now.
Not sure if it's related to commenting the two lines above, but my SetPass calls skyrocket to 814 which is killing performance. Normally it's at roughly 140 setpass calls.
oh wait, thought I should mention - i'm doing the Map Magic Integration. Not sure if this could be causing these issues.
Turns out this is facing the same exact issue as Voxel Land.
The problem is coming directly from this - Gfx.WaitForPresentOnGfxThread.
Averaging around 50-60 ms per frame, but as high as 250+ at the beginning of each spike.
@N1warhead did you fix the issue with the Gpuinstancer/HDRP/Lit shader? if so how did you manage?
I literally just reformatted my computer to a clean windows install hoping it was old conflicted AMD Drivers or something, but that sadly didn't help so I'm back to square one.
I was posting a lot in this last night - created a thread based on Gfx.WaitForPresentGfxThread as that's the issue.
I show what's going on with the CPU and GPU between GPU Instancer and Voxeland. As both have this same issue.
Are you having the same problem?
Or were you in reference to the shader line comments I was talking about? if so that did make it work, but not sure if there was any unintended side effects by doing so.
I realized you said HDRP. I'm using the standard pipeline.
I do have the same problem. The thing is a single variable in one of the shaders that basically doesnt seem to compile.
Just do this.. Double click the error. When it opens up the shader code simply look for (right above it)
Just comment out the ifndef and endif lines like I put below.
uniform sampler2D _DitherMaskLOD2D;
//#endif // LOD_FADE_CROSSFADE
I have implemented this in a vr prototype, and it works gloriously, the player has a virtual digital camera that also shows the instances, however when capturing screenshots from this camera the instances are not visible on the resulting Texture2D.
Any ideas how I can save a screenshot from a specific camera at runtime with all effects and gpunstances?
RenderTexture possibly? -- I'm actually not sure if this is before or after the blit operation.
hi, i am geting this shader error with tree manager,
Is there any way to implement a max distance falloff for occlusion? I'm making long fields of grass and wanted to try to blend the far edge to a lower detail density. Thanks!
I have a problem. the player takes the shadows of other objects that are listed in the manager. how to solve it? That is, the player runs next to the object and the shadow of this object moves with the player. and sometimes instead of a player’s shadow on the ground, the shadow of a given object that moves with the player.
I am using a pooling system where instead of destroying prefabs...I just deactivate them and then activate them again essentially just recycling prefabs instead of destroying them.
I notice that when a prefab is deactivated and then reactivated again...it doesn't register with the GPU Instancer Prefab manager...
So my question is how do I register a prefab again with the prefab manager after it has been reactivated?
I am using gpu instancer in non gameobject mode.
I request you to add more tutorials where prefab in prefab manager can be set by api.
Also maybe you can add a parameter where we can select on which layer rendering is happening.
public static void DrawMeshInstancedIndirect(Mesh mesh, int submeshIndex, Material material, Bounds bounds, ComputeBuffer bufferWithArgs, int argsOffset = 0, MaterialPropertyBlock properties = null, Rendering.ShadowCastingMode castShadows = ShadowCastingMode.On, bool receiveShadows = true, int layer = 0, Camera camera = null, Rendering.LightProbeUsage lightProbeUsage = LightProbeUsage.BlendProbes, LightProbeProxyVolume lightProbeProxyVolume= null);
By layer I mean the bold part.
is it possible to use amplify imposter with the GPU Instancer?
Yes it is: https://wiki.gurbu.com/index.php?title=GPU_Instancer:FAQ#Amplify_Impostors
I keep getting this error. No idea what is causing it, or how to stop it.
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)