Search Unity

[RELEASED] GPU Instancer

Discussion in 'Assets and Asset Store' started by LouskRad, May 3, 2018.

  1. PakkapornC

    PakkapornC

    Joined:
    Jul 19, 2021
    Posts:
    4
    Hi, I'm using GPUI with my Speedtree prefabs. But after I activated LOD cross fade in the Speedtree prefabs, they disappear from the scene when I hit play. There is no error shown in Console. Do you have any suggestions for this case?

    GPUI version: I tried both ver1.6.0 and 1.7.0
    Unity version: 2020.3.21
    HDRP: 10.6.0

    Thank you
     
  2. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,

    Not every billboard shader have cross-fading support currently, but we are looking into adding it. Can you please tell me which shaders you are using for the trees?
    Also please update to the latest version (v1.7.1), there have already been some improvements on this matter.

    Hi there,
    I have not encountered this error before, so I do not know what causes it or if it is related to GPUI at all. Please make a bug report following this guide with a sample project where we can replicate this issue so we can investigate.

    Hi there,
    I have tried using SpeedTree with 2020.3 HDRP and did not see this issue. However I had to add the GPUI setup to the SpeedTree shader graph first (GPUI manager throws an error saying you should add the setup, if you did not).
    Make sure that the shader you are using is setup for GPUI. And if the issue continues, please make a bug report following this guide with screenshots of the GPUI Manager and the Materials you are using for the trees?
     
  3. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi everyone,

    GPUI v1.7.1 is now available on the Asset Store.

    Be advised that there is currently a shader compiler bug with Unity 2021.2.8f1 which arbitrarily removes the procedural instancing variants on builds. We added a temporary menu item to fix this under Tools->GPU Instancer->Help->Unity 2021.2.8 Shader Bug Fix.

    This update comes with auto. shader conversion support for Better Lit Shader and also a stackable for Better Shaders. So now you can use these assets with GPUI.

    There is also improvements for MapMagic 2 integration. Please make sure to re-import the GPUI_MapMagic2_Integration package under GPUInstancer/Extras after updating to access these new features.

    This update also includes various other improvements and fixes. Here is the full change log:

    New: Better Lit Shader support
    New: Better Shaders support
    New: MapMagic 2 integration editor simulation support for Terrain details
    New: MapMagic 2 integration floating origin support
    New: Added menu item option to add Detail Managers under Terrain Game Objects
    New: Added Select Shader button when there is an incompatible shader warning under prototype settings
    New: Added temporary menu item to fix Unity 2021.2.8 shader compiler bug
    New: Added help menu items to access online documentation
    New: Added LOD cross-fading support for Tree Soft Occlusion shaders
    New: Added AddPrototoypeToManager API method to add pre-defined prototypes to Prefab Manager

    Changed: Auto converted shaders from Packages folder will be created under GPUInstancer/Shaders folder instead of PrototypeData
    Changed: Prototype LOD Settings can now be edited when multiple prototypes are selected

    Fixed: HDRP LOD Cross Fade does not transition smoothly
    Fixed: When a prototype does not have an LOD group but have a billboard, cross fading is not applied
    Fixed: Tree Manager edit prototype prefab button does not edit the prototype on the additional terrains
    Fixed: Generate Billboard toggle is not applied when editing multiple prototypes
     
    Deleted User and PutridEx like this.
  4. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    57
    I have a problem with nintendo switch and gpu instancerem (objects are smaller than they should be) and crowd animation (nothing appears) in URP
     
  5. ysundawa

    ysundawa

    Joined:
    Mar 2, 2020
    Posts:
    33

    I just updated my Editor to 2021.2.9f1 (previously 2021.2.7f1), and now my Trees not rendered on Built result except the Billboard only, but it works fine in editor. Is this the same error caused by those "Shader Compiler Bug" above?

    Already try to execute : Tools->GPU Instancer->Help->Unity 2021.2.8 Shader Bug Fix. but trees still missing..

    kindly advice, ..thanks.

    EDIT : 30-Jan-2021
    --> I tried to toll back to 2021.2.7f1 --> and the Trees rendered as expected. Might be a bug on 2021.2.9f1 .... for time being I will stick with 2.7f1 .. thanks.
     
    Last edited: Jan 30, 2022
  6. Deleted User

    Deleted User

    Guest

    Amazing thank you so much for the MM2 add-on !
    Confirming the "2021.2.8 Shader Bug Fix" works in 2021.2.9f1 (you need to flush the scene) and also in 2022beta5.
     
    GurhanH and Lars-Steenhoff like this.
  7. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    GPUI does not support nintendo switch. You can see the list of supported platforms from the Minimum Requirements.

    Some shaders might need to be edited manually. Which shaders are you using for the trees?
     
  8. Sterner

    Sterner

    Joined:
    Nov 11, 2012
    Posts:
    33
    Seems like the "2021.2.8 fix" doesn't fix the shader graph shaders
     
  9. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    What we added is a temporary workaround which can only edit auto. generated shaders' code, so it won't work with shader graph. We can't fix the main source of this problem since it is a Unity bug.

    I highly recommend not to use the new Unity versions with procedural instancing until Unity fixes this issue. Workarounds are messy and time consuming.

    If for some reason you have to use these Unity versions:
    Add the PROCEDURAL_INSTANCING_ON keyword manually to shader graph by adding a boolean keyword with the following settings:
    upload_2022-2-2_15-27-41.png

    I am not sure if this will work with all shaders. It will also add unnecessary variants to the build and the build will take longer when this shader is edited.
     
    Sterner likes this.
  10. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Anyone know if variant shader removal issue is fixed for 2021.2.10f1?
     
  11. ysundawa

    ysundawa

    Joined:
    Mar 2, 2020
    Posts:
    33
    just tested 2021.2.10f1 .. seems like the problem still there, rolling back to 2.7f1 now...
     
  12. ysundawa

    ysundawa

    Joined:
    Mar 2, 2020
    Posts:
    33
    I am using Nature Shader asset to convert Nature Manufacturer trees (Need the interactionfeature), using the instanced indirect.... not sure in detail which shader, cause the conversion done fully by Nature Shader.

    Edit : https://assetstore.unity.com/packag...ium=affiliate&utm_source=partnerize-linkmaker --> FYI
     
  13. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    The shader bug is possibly related to the bug explained in this forum post. So it might be fixed in 2021.2.12f1.
     
  14. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    The billboards generated by GPUI 1.7.1 are still dark in ambient lighting in HDRP13 unity2022.1.0b6
    same as what happened in hdrp12.

    T$B~25IJRET253Z9RH7LQ8B.png
     
  15. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    GPUI uses a simple lit shader graph shader for the billboards in HDRP. You can edit it according to your needs. It is under GPUInstancer\Shaders\Billboard\BillboardHDRP_GPUI.shadergraph
    For example, increasing Metallic value might help.
     
  16. unity_68E2DE7C7CD47333A564

    unity_68E2DE7C7CD47333A564

    Joined:
    Jul 1, 2021
    Posts:
    5
    hey so i got myself a grass shader plugin from the store, and would like to know how should i place the grasses. I want to hand paint the grasses and use the instancer to leverage the performance..
    So should i spawn in the grasses using unity's terrain system and the instanced renderer .. like bloating the hierarchy field with that many gameobject would be a nightmare for the performance and the editor file.. but if i place them as a tree object would that affect the AI or pathfinding in any ways .. i read the documentation but i'm not sure about it .. so does that also applies for the A* pathfinding algorithm..(ik this is kinda off topic but i just wan't to be sure like otherwise it would be a hell to again design things from start)

    any suggestions would be great
     
  17. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    Hi all,

    Does crossfade for LOD groups in Android VR not work at all, or is it something I can resolve?

    My objects have LOD groups and I specifically want them to crossfade animation in Prefab Manager. It does work if I play in editor, but after taking the build, they immediately switch instead of crossfading.

    I tried different things like not stripping shaders, 2021.2.8 bug fix from the menu, but no dice.

    I'm currently on 2021.2.11f1 with standard pipeline, OpenGL ES 3.2 supported.
    All objects have standard shader, no custom shader in LOD groups.
    I also tried multi pass and single pass, LOD switching is still immediate.
     
  18. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    How you place your instances wouldn't matter for the rendering process. Both Prefab Manager and Tree Manager uses the same core rendering system. So you should make your decision based on other criteria.
    If you want to use prefab instances but have issues with memory/performance, you can use the No-GameObject workflow with some coding.

    Hi there,
    Unfortunately LOD cross-fading is currently not supported on Android, because of the buffer limitations for shaders on Android devices.
     
    TanselAltinel likes this.
  19. Deleted User

    Deleted User

    Guest

    Sadly the procedural instancing bug is still present in 2021.2.11f1; works with the 'hot fix'. Thank you Unity !
     
    ScottJak likes this.
  20. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    I see. However, this is something I'd really like to have for the project I'm working on, not a must but a very nice to have.
    Is there any way you can direct me to implement/enable it myself and see the results?
     
  21. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    15
    I currently have an issue where my prefabs instances aren't being removed. I have tried enabling Auto Add/Remove instances and then destroying the gameobjects and also removing the instance explicitly via storing a list of GPUInstancerPrefab and calling RemovePrefabInstance on them. Initially I am adding the instances at runtime too with RegisterPrefabInstanceList and then calling InitializeGPUInstancer. I'm removing the instances, and then adding different ones in the same frame. Am I missing a step somewhere, or do I need to wait a frame in between or similar?
     
  22. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Unfortunately you can not simply enable it by changing couple of lines of code. Many parts of GPUI works differently on android. To bypass that you would need to change a lot of code and as a result your application will not work on many devices. But I added this to our roadmap so we will look into finding a solution.

    Hi there,
    You can add/remove instances during the same frame. There might be same conflicting calls because of execution order, if you are using many different API methods and also "Auto Add/Remove". I recommend to choose one approach and stick with it. Either use "Auto Add/Remove" or AddPrefabInstance / RemovePrefabInstance or RegisterPrefabInstanceList / UnregisterPrefabInstanceList and InitializeGPUInstancer.
     
    TanselAltinel and Ell223 like this.
  23. Ell223

    Ell223

    Joined:
    Jan 27, 2014
    Posts:
    15
    Thanks. It was this- sticking to one pair has fixed it.
     
  24. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    190
    Current project is for one specific device with Qualcomm XR2, so it's not an issue of supporting a large variety of devices.
    Thanks for the reply though.
     
  25. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    I'm running into an issue with shading of Amplify Imposters when they are being instanced with GPUI. The first screenshot shows them as just regular prefabs in edit mode, where the shadow/lighting is correct. The second shows what it looks like in play mode, where the shadows/lighting is wrong and completely different looking. I've got the imposter set to use the shadow from the prior LOD as the docs say. Maybe I'm missing something else to get this working?



     
  26. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    If you are on Standard pipeline, you need to enable Shadow with Original Shader option to be able to use shadows with impostors. You can see the explanation about how to use Amplify Impostors with GPUI here.
    If the issue persist, please email us a sample following this guide so we can investigate.
     
  27. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    I thought I had done that, but that was indeed the issue. Thanks for the help!
     
  28. oldcrank

    oldcrank

    Joined:
    Jan 13, 2015
    Posts:
    5
    Is there a chance this same issue would be affecting Unity 2020.3 as well? I’m having an issue with tree and object instances glitching in and out as I move the camera about… but it only happens in a build. In-editor it’s all fine.

    I’m using the MM2 integration if it matters.
     
  29. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    We did not get any reports about an issue in 2020.3. I don't think it is related. It sounds like a culling problem. Can you please email us a sample project following this guide?
     
  30. roundyyy

    roundyyy

    Joined:
    Dec 23, 2019
    Posts:
    112
    Hello. I have a problem with tree and colliders. It has 3 capsule colliders to match more or less bark. Problem I have is that in runtime they are not matching mesh (seems like they are placed as source). I have random rotation and scale on GPUI. Tree doesn't use LOD system ,it's just one mesh, colliders as children. Screenshots of setup attached. Thank you
     

    Attached Files:

  31. oldcrank

    oldcrank

    Joined:
    Jan 13, 2015
    Posts:
    5
    Thanks. My project is a little too big to send but let me play around with it to see if I can repeat the issue in a fresh project using the same setup. If I can I’ll submit it with the link above.
     
  32. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Hi there,
    GPU Instancer does not manage colliders, they are handled by the Unity Terrain. So when the trees have asymmetrical colliders and the Unity Terrain is not applying rotation on the trees, enabling "Use Random Rotation" can cause a mismatch between rendering and colliders. You should be seeing the same rotation and scale when the GPUI Tree Manager is enabled or disabled. So you need to edit the Tree Settings on the prototype to match with the default Unity Terrain rotations and scale.

    There is also a collider rotation issue with Unity Terrain in some Unity versions (see issue tracker).

    If you are not able to apply random rotation, adding an LOD Group component on the parent GameObject of the tree prefab (even if there is only one renderer) might allow you to apply random rotation on the Unity Terrain.
     
  33. puntoeli

    puntoeli

    Joined:
    Feb 28, 2022
    Posts:
    1
    Is Gaia Extension good for Gaia Pro 2021 too? I sent an email about the fps to the support I hope to receive an answer soon
     
    SHSA likes this.
  34. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Running into a freezing issue when any GPU Instancer manager is enabled in the hierarchy of a scene when using a 2019 iMac and the scene view is open. Strange thing is that it only happens on that iMac with Big Sur, but on my MacBook Pro with Monterey, it works fine. It freezes 100% of the time when opening the scene view, whether loading the scene or entering play mode. There are seemingly no related errors/warnings that I can find in the Editor.log after having to force kill Unity.

    I assume it must be something in the manager initialization rather than the actual rendering since it happens both on scene load and when entering play mode, but I can't imagine why it would only happen on this one Mac. It is also odd that it only freezes when switching to the scene view. Just staying in the game view everything works correctly without issues. I tried disabling Graphics Jobs without any change. I'm not sure how else to debug this, any ideas? Using Unity 2021.2.11 with the latest GPU Instancer.
     
  35. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    Sounds like a Unity bug, might need to be reported to Unity. If it is happening with the Detail Manager when the editor simulation for the scene view is active, try disabling it and see if it changes anything. There might be an issue with running procedural instancing in editor mode.
     
  36. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    After some more testing, it has been narrowed down to the tree manager. Just having the details manager and the prefab manager enabled avoids the issue, but as soon as the tree manager is enabled (even just by itself without the others), the issue happens 100% of the time. The issue also doesn't happen if the terrain is allowed to render the trees instead of GPUI. Not sure if this gives us anything new to go off of?
     
  37. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Just another update on this. I tried reducing the trees being added to the Unity terrain to see if that made any difference. The issue still happened, but it didn't lock up the entire computer so much that I was able to get a screenshot of what the scene view looks like with the issue happening. Does this give any hints about what is going on by chance (and again, this only happens with the tree manager active in the scene, not affected by detail or prefab managers)?

    Edit: The cyan color probably isn't related after all. Clearing the GI cache and trying again caused that color to go away, but Unity still freezes if the tree manager is active.

     
    Last edited: Mar 4, 2022
  38. oldcrank

    oldcrank

    Joined:
    Jan 13, 2015
    Posts:
    5
    Checking back in on my "disappearing trees" on builds when using the MM2 integration, I've narrowed the issue down to the Occlusion Culling option. When I disable that, everything works fine in the builds. Wondering now if I have something on my player character that is causing minute collisions with the occlusion code, thereby making the trees think they should be occluded. So it's very likely an issue in my own project and not an issue with GPUI.

    Is there a place in GPUI to specify which layers will be used as occlusion objects? Since I'm using the MM2 integration, I'm not sure if I should be including any other GPUI objects in the scene to control it.
     
  39. HurdyDurr

    HurdyDurr

    Joined:
    Jan 1, 2020
    Posts:
    1
    Hello, We're trying to implement global illumination on our individual instances of prototypes, which we are initializing with a matrix and without gameobjects. It seems possible in theory by overloading the DrawMeshInstanceIndirect method, and passing in a (LPPV) to give unique lighting data to different instances. Is it viable to use this method and could anyone point us in the right direction for where we might be able to pass this data into the GPUI api?
     
  40. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    The shader variant issues in Unity versions 2021.2.8-11 might be causing this with your tree shaders. Scene view can use different shader variants depending on the settings. Upgrading to the latest version (currently 2021.2.14) might solve the issue. You can also test it by adding the same trees to the Prefab Manager with some prefab instances in the scene and see if it is specific to the Tree Manager or the tree prefabs.

    GPUI uses the depth texture for occlusion culling. So every object that writes to depth becomes an occluder. You can select which objects will be culled (occludee) with the "Is Occlusion Culling" option but you can not select which objects are occluders.
    You can check from the GPUI Hi-Z Occlusion Generator component that is attached to the camera at runtime, if there are any problems with the depth texture. For example there might be some objects writing incorrect depth information because of a shader issue.
    Another possible issue is precision. For example I recently saw an example where very low (e.g. 0.001) scale values were causing precision issues during occlusion culling calculations. In this case, it is better to set the Scale Factor on the Model Importer instead of having very low scale values on the prefab transforms.

    Hi there,
    Unfortunately GPUI does not support light probes. You can see the lighting limitations from the Known Limitations.
    By default all instances share the same probe value (as if they are all located at the camera position), and there is an option to disable light probe usage completely by enabling the Disable Light Probes option.

    With DrawMeshInstanceIndirect method, you can not send per instance lighting data. But it is possible to implement your own lighting system with a custom shader and use StructuredBuffers to send instance based lighting data (e.g. texture UV etc.) by using Material Variations.
     
  41. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Unfortunately, this doesn't seem to be it as the same issue happens on 2021.2.14. After doing quite a bit more debugging, we've found that it seems to be related to the number of prefabs in the tree manager list. We have 25 different trees/plants in the tree manager, which still causes the entire computer to freeze even when the terrain is cleared and none are rendering (but with the tree manager still active). It doesn't stop freezing until cutting the list down to 15 prefabs, and it doesn't matter which 15.
     
  42. liyingsong

    liyingsong

    Joined:
    Sep 9, 2021
    Posts:
    5
     
  43. liyingsong

    liyingsong

    Joined:
    Sep 9, 2021
    Posts:
    5
    03-14 10:38:48.733 21951-22069/? I chatty : uid=10360(com.DefaultCompany.GPUInstanceDemo) UnityMain identical 3 lines
    03-14 10:38:48.808 21951-22069/? I chatty : uid=10360(com.DefaultCompany.GPUInstanceDemo) UnityMain identical 3 lines
    03-14 10:38:49.637 1625-1854/? I HwWindowManagerServiceEx: com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity blur level: -1
    03-14 10:38:49.690 1625-1775/? I WindowManager: Changing focus from Window{a7737b9 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity} to Window{a6b8699 u0 com.huawei.android.launcher/com.huawei.android.launcher.unihome.UniHomeLauncher} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:6655028 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6654504 com.android.server.wm.DisplayContent.layoutAndAssignWindowLayersIfNeeded:6004292 com.android.server.wm.DisplayContent.positionStackAt:5732288
    03-14 10:38:49.693 1625-1775/? W HwActivityTaskManagerServiceEx: setResumedActivityUncheckLocked start call, from: ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}, to: ActivityRecord{af8e5c2 u0 com.huawei.android.launcher/.unihome.UniHomeLauncher t1}
    03-14 10:38:49.697 1625-1775/? I WindowManager: Animation done in AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}} isHidden:true hiddenRequested:true
    03-14 10:38:49.767 1625-1874/? W 00202/HwQoEAccAppAware: uid = 10360, pktname = com.DefaultCompany.GPUInstanceDemo, className = com.unity3d.player.UnityPlayerActivity
    03-14 10:38:49.768 1625-1874/? I HwAudioServiceEx: ComponentInfo : className = com.unity3d.player.UnityPlayerActivity, flag = onPause, isHomeActivity = , isTop = false
    03-14 10:38:49.783 3253-3788/? E DollieAdapterService: notifyActivityState pkg:com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity state:16 fg:false mUid:10360
    03-14 10:38:49.829 21951-21951/? I DecorView[UnityPlayerActivity]: pkgName:com.DefaultCompany.GPUInstanceDemo old windowMode:1 new windoMode:1, isFixedSize:false
    03-14 10:38:49.858 21951-21951/? I DecorView[UnityPlayerActivity]: pkgName:com.DefaultCompany.GPUInstanceDemo old windowMode:1 new windoMode:1, isFixedSize:false
    03-14 10:38:49.863 1625-2231/? I WindowManager: notifyAppStopped: AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}
    03-14 10:38:49.863 1625-2231/? E WindowManager: win=Window{a7737b9 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity} destroySurfaces: appStopped=true win.mWindowRemovalAllowed=false win.mRemoveOnExit=false
    03-14 10:38:53.054 3253-16084/? I Hicom_Monitor: mAppSwitchNotifierEx. uid: 10360, foreground app: com.DefaultCompany.GPUInstanceDemo, foreground activity: com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.054 1625-2552/? I ActivityTaskManager: setAppStartingWindow: token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}} pkg=com.DefaultCompany.GPUInstanceDemo transferFrom=null newTask=false taskSwitch=true processRunning=true allowTaskSnapshot=true activityCreated=true LowRamTaskSnapshots=false
    03-14 10:38:53.059 1625-1874/? W 00202/HwQoEAccAppAware: uid = 10360, pktname = com.DefaultCompany.GPUInstanceDemo, className = com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.059 1625-1874/? I HwAudioServiceEx: ComponentInfo : className = com.unity3d.player.UnityPlayerActivity, flag = showStartingWindow, isHomeActivity = , isTop = false
    03-14 10:38:53.066 1625-1858/? I WindowManager: addWindow: Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406} client:com.android.server.wm.TaskSnapshotSurface$Window@b16f57d currentDisplayId:0 requestDisplayId:0 token:Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}
    03-14 10:38:53.070 1625-2552/? I WindowManager: Check opening app=AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}: allDrawn=false startingDisplayed=false startingMoved=false isRelaunching()=false startingWindow=Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406}
    03-14 10:38:53.072 1625-1858/? I WindowManager: Check opening app=AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}: allDrawn=false startingDisplayed=false startingMoved=false isRelaunching()=false startingWindow=Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406}
    03-14 10:38:53.081 1625-8609/? I WindowManager: Check opening app=AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}: allDrawn=false startingDisplayed=false startingMoved=false isRelaunching()=false startingWindow=Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406}
    03-14 10:38:53.085 1625-1858/? I WindowManager: Check opening app=AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}: allDrawn=false startingDisplayed=true startingMoved=false isRelaunching()=false startingWindow=Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406}
    03-14 10:38:53.118 21951-21951/? I DecorView[UnityPlayerActivity]: pkgName:com.DefaultCompany.GPUInstanceDemo old windowMode:1 new windoMode:1, isFixedSize:false
    03-14 10:38:53.118 21509-4339/? I CAWARENESS_20409_AppUsageManager: onEvent, packageName=com.DefaultCompany.GPUInstanceDemo, activityName=com.unity3d.player.UnityPlayerActivity, uid=10360
    03-14 10:38:53.118 3253-4555/? I Hicom_Monitor: mActivityNotifierEx, className = com.unity3d.player.UnityPlayerActivity, uid = 10360
    03-14 10:38:53.119 1625-1874/? W 00202/HwQoEAccAppAware: uid = 10360, pktname = com.DefaultCompany.GPUInstanceDemo, className = com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.119 1625-13952/? W 00202/HiData_HwAppQoeActivityMonitor: handleActivityChange, curPackage:com.DefaultCompany.GPUInstanceDemo, curClass:com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.119 1625-2466/? W 00202/HiData_HwAppQoeResourceManagerImpl: checkIsMonitorVideoScenes input :com.DefaultCompany.GPUInstanceDemo,com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.123 1625-7222/? I WindowManager: Changing focus from null to Window{a7737b9 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:6655028 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6654504 com.android.server.wm.WindowManagerService.relayoutWindow:6257868 com.android.server.wm.Session.relayout:6262564
    03-14 10:38:53.127 1625-1874/? I HwAudioServiceEx: ComponentInfo : className = com.unity3d.player.UnityPlayerActivity, flag = onResume, isHomeActivity = , isTop = true
    03-14 10:38:53.131 3253-3788/? E DollieAdapterService: notifyActivityState pkg:com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity state:2 fg:true mUid:10360
    03-14 10:38:53.135 21509-22810/? I CAWARENESS_20409_AppUsageFilterAbility: publishData com.DefaultCompany.GPUInstanceDemo com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.135 21509-22810/? I CAWARENESS_20409_AppUsageFilterAbility: publishData com.DefaultCompany.GPUInstanceDemo com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.135 21509-22810/? I CAWARENESS_20409_AppUsageFilterAbility: publishData com.DefaultCompany.GPUInstanceDemo com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.144 21509-22816/? I CAWARENESS_20409_LifecycleCompatibleFence: processAppUsageData com.DefaultCompany.GPUInstanceDemo com.unity3d.player.UnityPlayerActivity
    03-14 10:38:53.174 1625-1850/? I StatusBarDisable: setFlags what=0 which=1 pkg=Window{a7737b9 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity}
    03-14 10:38:53.255 1625-1858/? I WindowManager: Removing Window{ac05ae1 u0 SnapshotStartingWindow for taskId=406} from AppWindowToken{b147791 token=Token{b43233f ActivityRecord{aa76ec6 u0 com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity t406}}}
    03-14 10:38:53.360 776-1735/? E BufferQueueProducer: [SurfaceView - com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity#0]:305: dequeueBuffer: attempting to exceed the max dequeued buffer count (2)
    03-14 10:38:53.657 1075-1562/? I AGPService: GameFpsDetect: target layer found - SurfaceView - com.DefaultCompany.GPUInstanceDemo/com.unity3d.player.UnityPlayerActivity#

    this Logs
     
  44. liyingsong

    liyingsong

    Joined:
    Sep 9, 2021
    Posts:
    5
    When I removed Vulkan, it was fine o_O
     
    booferei likes this.
  45. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
    I assume that Unity may perform some optimizations knowing if objects are static or not. I assume, for example, that the shadow system may cache the shadow casted by static casters and therefore compute shadows only for moving objects. If you know that what I am saying is true, how would this work with GPUI?
     
  46. jukibom

    jukibom

    Joined:
    Aug 31, 2015
    Posts:
    54
    Hey, thank you very much for adding floating origin support to the map magic integration, much appreciated! I did have to fiddle with getting the correct transform and ended up commenting out the auto-setting in the GPUInstanceMapMagic2Integration:

    Code (CSharp):
    1.  
    2.         if (useFloatingOriginHandler)
    3.         {
    4.             Terrain[] activeTerrains = Terrain.activeTerrains;
    5.              if (activeTerrains != null && activeTerrains.Length > 0 && activeTerrains[0] != null)
    6.                 floatingOriginTransform = activeTerrains[0].transform;
    7.         }
    8.  
    this grabs the transform of the first terrain and prevents the user from overriding in the editor - but once a player moves far enough that the tile gets unloaded everything breaks. I needed to set the transform to the parent entity (the one containing the MapMagicObject component) instead.


    I'm currently looking at using the Instance Remover, but it looks like the detail objects reappear upon floating origin correction. Is there any way around this?
     
  47. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    24
    Hey, we're getting some unexpected behaviour from the Shadow LODs.

    It seems that the first setup for Shadow LODS results in no shadow being rendered at LOD0, while it seems as though it should be rendered with LOD1.
    LOD_1.png
    This second setup also results in the same behaviour, making it seem as though the Shadow LODs are actually referencing eachother in some way?
    LOD_2.png

    This is strange as if you setup the Shadow LODs without using the None category they will render the shadows using the LOD mesh selected, which is the expected behaviour.

    Are we using the Shadow LODs wrong here or is there an issue with the setting? For context, this is using v1.5.3 of GPUI but I've not found anything relevant in the changelogs for more recent releases.
     
  48. GurhanH

    GurhanH

    Joined:
    Apr 24, 2017
    Posts:
    539
    GPUI does not support baked lighting. You can read about the lighting limitations here.

    Hi there,
    Thank you for the feedback. We have not tested MM2 integration in combination with these features, so we will look into recreating this setup. If you can email us a bug report with a sample project, it will speed up the process, and help us not to miss any special case.

    Hi there,
    Thank you for the feedback. I was able to recreate the issue. It is possibly caused by a change in the SetFloats methods behaviour in Unity. We will look into it and possibly switch to a more reliable method in the next update. For now you can try changing the following line and then set the LOD Shadow values again and see if it solves the issue:
    GPUInstancerEditor.cs line 774:
    from this:
    Code (CSharp):
    1. selectedPrototype.shadowLODMap[index] = 9;
    to this:
    Code (CSharp):
    1. selectedPrototype.shadowLODMap[index] = 7;
    Please note that line numbers will be different if you are not using v1.7.2.
     
  49. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    178
    Is GPUI compatible with URP 12 / UNITY 2021.2 ?
     
  50. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    I'm using Unity 2021.2.8 HDRP and a TVE shader and there is no performance improvement.
    I have also tested in the TreeInstancingDemo scene and there is still no expected performance gain compared to the Unity default.

    I tried with the below suggested fix and it made no difference:
    New: Added temporary menu item to fix Unity 2021.2.8 shader compiler bug
     
    Last edited: Mar 21, 2022