Search Unity

Official Hybrid Renderer V2 (0.4.0)

Discussion in 'Graphics for ECS' started by SebastianAaltonen, Mar 16, 2020.

Thread Status:
Not open for further replies.
  1. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Yeah. Mega city streams in all subscenes and all LODs (several matrices each) and will therefor run out of memory in Hybrid V2. You can work around this by disabling a select few subscenes (around 8 walls/floors I think I had to disable) and it should run.

    We will implement a way for LODs to share data quite soon, which will reduce memory usage a lot.
     
    keeponshading and mariandev like this.
  2. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
  3. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Thanks for the info. I will try this workaround,
    Our planned scenario has some more subscenses and much more different entities. Around factor 20.

    Please implement cross fading as soon if possible too.
    It s the most missed feature in HDRP.
    Especially for trees and some parts of the vegetation.
    CTI Trees and Speedtrees with GPU Instancer are benchmark here in BuiltInRP.
    In current HDRP i found no solution to even get close to this.

    Do you also get the ambient light from the HDR Sky. Cannot get it.
     
  4. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
  5. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    We will look at some kind of cross fade support, exactly how to do is it still undecided. Not sure about HDR sky color. We do have some global probe support. I will ask around.
     
  6. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    It alway happen when I delete a lod entity.
    see also:
    #525
    #447
    #477
    and so on..
     
  7. jasons-novaleaf

    jasons-novaleaf

    Joined:
    Sep 13, 2012
    Posts:
    181
    Are there any demos/tutorials on the Hybrid Renderer v2? and if so, could you point me to one please?
     
  8. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Currently no. We will publish a set of sample scenes after the next package drop. At least that is the plan.
     
  9. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    hey joelv, how to fix this?
     
  10. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    I don't know and I have had no answers yet for if it has been fixed or not.
    Can you report a bug using the unity bug reporter with repro steps so that we can track it and ensure it gets looked at and fixed?


    EDIT: scratch that. It seems the bug is fixed for hybrid 0.11 (to be released soon(ish))
     
    Last edited: Jan 15, 2021
    linfuqing likes this.
  11. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256
  12. Dimetrock

    Dimetrock

    Joined:
    Dec 9, 2012
    Posts:
    37
    deus0 likes this.
  13. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    jasons-novaleaf likes this.
  14. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    This is still not fixed in most recent update. Back to using this work around I guess (this fix is required for split screen where each player has their own world)
     
  15. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937

    Hi.
    I deactivated 20 subscenes to eliminate the memory problems for now.
    IBL Ambient Light is working now again in latest Hybrid Renderer V2 (0.11.0-preview.42).

    After updating to

    Unity 2021.1.0b3
    (latest Packages entities, hybrid renderer V2, 24.01....)


    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.     "com.autodesk.fbx": "4.0.0-pre.1",
    4.     "com.unity.2d.sprite": "1.0.0",
    5.     "com.unity.2d.tilemap": "1.0.0",
    6.     "com.unity.audio.dspgraph": "0.1.0-preview.11",
    7.     "com.unity.burst": "1.4.1",
    8.     "com.unity.cinemachine": "2.7.1",
    9.     "com.unity.entities": "0.17.0-preview.41",
    10.     "com.unity.ext.nunit": "1.0.6",
    11.     "com.unity.ide.visualstudio": "2.0.5",
    12.     "com.unity.ide.vscode": "1.2.3",
    13.     "com.unity.jobs": "0.0.7-preview.9",
    14.     "com.unity.mathematics": "1.2.1",
    15.     "com.unity.platforms.windows": "0.10.0-preview.10",
    16.     "com.unity.render-pipelines.core": "11.0.0",
    17.     "com.unity.render-pipelines.high-definition": "11.0.0",
    18.     "com.unity.rendering.hybrid": "file:../LocalPackages/com.unity.rendering.hybrid@0.11.0-preview.42",
    19.     "com.unity.scriptablebuildpipeline": "1.15.1",
    20.     "com.unity.shadergraph": "11.0.0",
    21.     "com.unity.test-framework": "1.1.20",
    22.     "com.unity.timeline": "1.5.1-pre.3",
    23.     "com.unity.ugui": "1.0.0",
    24.     "com.unity.xr.legacyinputhelpers": "2.1.7",
    25.     "com.unity.modules.ai": "1.0.0",
    26.     "com.unity.modules.androidjni": "1.0.0",
    27.     "com.unity.modules.animation": "1.0.0",
    28.     "com.unity.modules.assetbundle": "1.0.0",
    29.     "com.unity.modules.audio": "1.0.0",
    30.     "com.unity.modules.cloth": "1.0.0",
    31.     "com.unity.modules.director": "1.0.0",
    32.     "com.unity.modules.imageconversion": "1.0.0",
    33.     "com.unity.modules.imgui": "1.0.0",
    34.     "com.unity.modules.jsonserialize": "1.0.0",
    35.     "com.unity.modules.particlesystem": "1.0.0",
    36.     "com.unity.modules.physics": "1.0.0",
    37.     "com.unity.modules.physics2d": "1.0.0",
    38.     "com.unity.modules.screencapture": "1.0.0",
    39.     "com.unity.modules.terrain": "1.0.0",
    40.     "com.unity.modules.terrainphysics": "1.0.0",
    41.     "com.unity.modules.tilemap": "1.0.0",
    42.     "com.unity.modules.ui": "1.0.0",
    43.     "com.unity.modules.uielements": "1.0.0",
    44.     "com.unity.modules.umbra": "1.0.0",
    45.     "com.unity.modules.unityanalytics": "1.0.0",
    46.     "com.unity.modules.unitywebrequest": "1.0.0",
    47.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    48.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    49.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    50.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    51.     "com.unity.modules.vehicles": "1.0.0",
    52.     "com.unity.modules.video": "1.0.0",
    53.     "com.unity.modules.vr": "1.0.0",
    54.     "com.unity.modules.wind": "1.0.0",
    55.     "com.unity.modules.xr": "1.0.0"
    56.   }
    57. }
    more changes here
    https://forum.unity.com/threads/megacity-demo-2019-lts-community-upgrade-thread.914306/#post-6760291


    Build and Editor runs fine now in V2

    b.JPG

    v2_2.JPG

    3.JPG


    but i get following exeptions

    Code (CSharp):
    1. System.IndexOutOfRangeException: Index {0} is out of restricted IJobParallelFor range [{1}...{2}] in ReadWriteBuffer.
    2.  
    3. Thrown from job: Unity.Workflow.Hybrid.LightPoolSystem.FindClosestLightsJob
    4. This Exception was thrown from a job compiled with Burst, which has limited exception support.
    5. 0x00007ff95b1819cb (0770985590c22c7b761e14469f66428) [IJobForEach.gen.cs:2911] Unity.Entities.JobForEachExtensions.JobStruct_Process_EC`2<Unity.Workflow.Hybrid.LightPoolSystem.FindClosestLightsJob,Unity.Transforms.Translation>.ExecuteChunk
    6. 0x00007ff95b181120 (0770985590c22c7b761e14469f66428) [IJobForEach.gen.cs:2888] Unity.Entities.JobForEachExtensions.JobStruct_Process_EC`2<Unity.Workflow.Hybrid.LightPoolSystem.FindClosestLightsJob,Unity.Transforms.Translation>.Execute
    7. 0x00007ff95b181a41 (0770985590c22c7b761e14469f66428) 40442C54EDDC00A6
    8. 0x00007ff65a1be9f0 (Unity) ExecuteJob
    9. 0x00007ff65a1bfa6f (Unity) ForwardJobToManaged
    10. 0x00007ff65a1baff0 (Unity) JobQueue::Exec
    11. 0x00007ff65a1bb2aa (Unity) JobQueue::ExecuteJobFromHighPriorityStack
    12. 0x00007ff65a1bb839 (Unity) JobQueue::ProcessJobs
    13. 0x00007ff65a1bd85f (Unity) JobQueue::WorkLoop
    14. 0x00007ff65a378c5e (Unity) Thread::RunThreadWrapper
    15. 0x00007ff9acf07c24 (KERNEL32) BaseThreadInitThunk
    16. 0x00007ff9ae8acea1 (ntdll) RtlUserThreadStart
    17.  
    Do you have an idea here?
    The lights for neon signs and street lights work fine but they kick in later as in the 2019 original release.
     
    Last edited: Jan 29, 2021
  16. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    i created a new project and added Hybrid Renderer 0.11 (V2)
    closing the sub-scene with 2 LightMapped cubes throws errors and the entities become invisible.

    Texture creation failed. 'RGB_ETC2_SRGB' is not supported for Sample usage on this platform. Use 'SystemInfo.IsFormatSupported' C# API to check format support.
    UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    Unity.Entities.Conversion.JournalingUnityLogger:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/JournalingUnityLogger.cs:41)
    UnityEngine.Texture2DArray:.ctor (int,int,int,UnityEngine.Experimental.Rendering.GraphicsFormat,UnityEngine.Experimental.Rendering.TextureCreationFlags)
    Unity.Rendering.LightMaps:CopyToTextureArray (System.Collections.Generic.List`1<UnityEngine.Texture2D>) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/LightMaps.cs:51)
    Unity.Rendering.LightMaps:ConstructLightMaps (System.Collections.Generic.List`1<UnityEngine.Texture2D>,System.Collections.Generic.List`1<UnityEngine.Texture2D>,System.Collections.Generic.List`1<UnityEngine.Texture2D>) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/LightMaps.cs:67)
    Unity.Rendering.LightMapConversionContext:processLightMapsForConversion () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/RenderMeshConversionContext.cs:188)
    Unity.Rendering.RenderMeshConversionContext:processLightMapsForConversion () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/RenderMeshConversionContext.cs:328)
    Unity.Rendering.MeshRendererConversion:OnUpdate () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/MeshRendererConversion.cs:41)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.GameObjectConversionUtility:Convert (Unity.Entities.World) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:152)
    Unity.Entities.GameObjectConversionUtility:InitializeIncrementalConversion (UnityEngine.SceneManagement.Scene,Unity.Entities.GameObjectConversionSettings) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:251)
    Unity.Scenes.Editor.LiveLinkDiffGenerator:Convert (Unity.Entities.GameObjectConversionUtility/ConversionFlags) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkDiffGenerator.cs:250)
    Unity.Scenes.Editor.LiveLinkDiffGenerator:UpdateLiveLink (UnityEngine.SceneManagement.Scene,Unity.Entities.Hash128,Unity.Scenes.Editor.LiveLinkDiffGenerator&,int,Unity.Scenes.LiveLinkMode,UnityEditor.GUID,Unity.Build.BuildConfiguration) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkDiffGenerator.cs:430)
    Unity.Scenes.Editor.LiveLinkConnection:AddLiveLinkChangeSet (Unity.Scenes.Editor.LiveLinkDiffGenerator&,Unity.Entities.Hash128,System.Collections.Generic.List`1<Unity.Scenes.LiveLinkChangeSet>,Unity.Scenes.LiveLinkMode) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkConnection.cs:540)
    Unity.Scenes.Editor.LiveLinkConnection:Update (System.Collections.Generic.List`1<Unity.Scenes.LiveLinkChangeSet>,Unity.Collections.NativeList`1<Unity.Entities.Hash128>,Unity.Collections.NativeList`1<Unity.Entities.Hash128>,Unity.Scenes.LiveLinkMode) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkConnection.cs:476)
    Unity.Scenes.Editor.EditorSubSceneLiveLinkSystem:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/EditorSubSceneLiveLinkSystem.cs:44)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)

    _______________________________________________________________________

    NullReferenceException
    Unity.Rendering.LightMaps.CopyToTextureArray (System.Collections.Generic.List`1[T] source) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/LightMaps.cs:52)
    Unity.Rendering.LightMaps.ConstructLightMaps (System.Collections.Generic.List`1[T] inColors, System.Collections.Generic.List`1[T] inDirections, System.Collections.Generic.List`1[T] inShadowMasks) (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/LightMaps.cs:67)
    Unity.Rendering.LightMapConversionContext.ProcessLightMapsForConversion () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/RenderMeshConversionContext.cs:188)
    Unity.Rendering.RenderMeshConversionContext.ProcessLightMapsForConversion () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/RenderMeshConversionContext.cs:328)
    Unity.Rendering.MeshRendererConversion.OnUpdate () (at Library/PackageCache/com.unity.rendering.hybrid@0.11.0-preview.42/Unity.Rendering.Hybrid/MeshRendererConversion.cs:41)
    Unity.Entities.ComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    Unity.Entities.Conversion.JournalingUnityLogger:LogException(Exception, Object) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/JournalingUnityLogger.cs:50)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:477)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.GameObjectConversionUtility:Convert(World) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:152)
    Unity.Entities.GameObjectConversionUtility:InitializeIncrementalConversion(Scene, GameObjectConversionSettings) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities.Hybrid/GameObjectConversion/GameObjectConversionUtility.cs:251)
    Unity.Scenes.Editor.LiveLinkDiffGenerator:Convert(ConversionFlags) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkDiffGenerator.cs:250)
    Unity.Scenes.Editor.LiveLinkDiffGenerator:UpdateLiveLink(Scene, Hash128, LiveLinkDiffGenerator&, Int32, LiveLinkMode, GUID, BuildConfiguration) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkDiffGenerator.cs:430)
    Unity.Scenes.Editor.LiveLinkConnection:AddLiveLinkChangeSet(LiveLinkDiffGenerator&, Hash128, List`1, LiveLinkMode) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkConnection.cs:540)
    Unity.Scenes.Editor.LiveLinkConnection:Update(List`1, NativeList`1, NativeList`1, LiveLinkMode) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/LiveLinkConnection.cs:476)
    Unity.Scenes.Editor.EditorSubSceneLiveLinkSystem:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/EditorSubSceneLiveLinkSystem.cs:44)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:472)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystemGroup.cs:417)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ComponentSystem.cs:114)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
     
  17. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    Unfortunately this seems to have slipped our radar accidentally. We'll try to get this fixed in a future version.
     
    Opeth001 likes this.
  18. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Is there a quick fix we can do while we wait for the next version of Hybrid Renderer ?
    thanks!
     
  19. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    Opeth001 likes this.
  20. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Not sure why 0.11 logs lots of errors. I believe previous version dun have such issue.

    upload_2021-1-26_20-34-37.png
     
  21. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @joelv, @JussiKnuuttila. Any idea why Hybrid Renderer 0.11 become spamming errors?
     
  22. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    What unity version are you running? Supposedly this could be fixed as of 2020.2.3f1
     
    optimise likes this.
  23. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I see. I'm using 2020.2.2f1. I still waiting for 2020.2.3f1 public release.
     
  24. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    I'm trying to use BatchRendererGroup to render some instanced geometry in edit mode within the scene view, but it only renders into the game view. The instances render correctly, everything works as expected, it just does not show in scene view.

    Is this a limitation of BatchRendererGroup ? Nothing in the documentation suggests it wouldn't work.

    *EDIT* it was the Scene culling mask, requires
    EditorSceneManager.GetSceneCullingMask(EditorSceneManager.GetActiveScene())

    The default value when unspecified (the parameter is optional) of
    9223372036854775808UL seems to only apply for game mode, not sure how it relates to the scene view though.... documentation needs more detail.
     
    Last edited: Feb 2, 2021
  25. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    GetDOTSInstancingCbuffers and GetDOTSInstancingProperties both return NativeArrays of 0 length when used with a ShaderGraph shader that has Hybrid Per Instance properties ( HDRP 10.2.2 and Hybrid 0.11.0-preview.42 using ENABLE_HYBRID_RENDERER_V2 scripting define)

    IS this a known issue? I'm following the documentation trying to set the properties in a BatchRendererGroup

    I tried the V1 method (GetBatchVectorArray) but am not seeing any changes, I looked in RenderDoc and it looks like the constant buffers were not getting the properties set.
    So then I tried V2 method but hit the Length 0 blocker.

    **EDIT**

    Also you will get a massive editor crash if the Shader Graph property that is set to Hybrid Per Instance is not marked Exposed.
     
    Last edited: Feb 2, 2021
  26. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    Last edited: Feb 3, 2021
  27. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    Multiple Worlds
    The classic GameObject Unity doesn't have a concept of multiple worlds. And Unity's existing rendering architecture (URP and HDRP) doesn't support multiple worlds either. The hybrid renderer is using managed HDRP/URP components for lights/decals/probes/cameras/etc and these primitives don't support multiple worlds. Rendering multiple worlds simultaneously needs architectural changes throughout the engine. However we can add support for having DOTS rendering systems in multiple worlds, and rendering a single select world at a time (one of them is active). Changing between the worlds costs some time, since all the hybrid managed components in the affected worlds need to be disabled/enabled to make sure that Unity/URP/HDRP only sees the managed components of the active world. This task is included in our 2021 roadmap.

    If you have some use cases for multiple worlds that require simultaneous rendering of multiple DOTS worlds, please let us know, and we can include these use cases for future planning.

    BatchRendererGroup

    The BatchRendererGroup (BRG) API is indeed poorly documented and very hard to use correctly. It was originally implemented quickly for Megacity, and has since been patched several times to allow the hybrid renderer team to add missing URP and HDRP features.

    BRG is a very low level API. You are responsible for setting up all per-instance data for rendering. Including all built-in Unity inputs. The only way to do this in a robust way to do this is to use the shader reflection API. Ask the shader what kind of inputs it expects to have. You need to provide all of these inputs. If you want to support shader/material default values, you need to use the shader/material APIs to ask for the default values and fill them in the arrays for instances that use the default values. Built-in properties like light layers, transform params, inverse matrix, previous matrix, LOD fade value, closest light source indices, SH probe interpolated values, etc must all be calculated by the user and provided to the BRG API. The BRG V1 API set only supports limited amount of these inputs. V2 is more flexible but requires a ComputeBuffer as a side channel and metadata offset buffers (in the format provided by the shader reflection API). There's no automation. Currently the hybrid renderer package is the best example how to use this API. It will require 1000+ lines of code to handle all the cases properly.

    If you are seeing flickering or have troubles seeing objects in some viewports, you probably didn't fill some input data correctly.

    We are in process of implementing a new more efficient/flexible backend and later exposing a C# API that replaces the old BRG. This new API will be 100% supported and documented, and there will be samples showing how to use it. I would not recommend writing your own renderers on top of the old BRG API. We will still support the BRG API for some time, but it will remain a very tricky API to use correctly with lots of sharp edges and big ties to the hybrid renderer design. The new API will work 100% correctly without DOTS too. At this point of time, we don't have ETA for the release of the new API.
     
  28. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @SebastianAaltonen. Will older GLES devices will be supported in future HR package? My DOTS game needs to target old devices.
     
    Opeth001 likes this.
  29. SebastianAaltonen

    SebastianAaltonen

    Unity Technologies

    Joined:
    Feb 21, 2020
    Posts:
    112
    We are aware that many customers need GLES 3.1/3.2 support. There are some technical issues in GLES on some Android vendors that are hard to workaround. We are trying to find out a way to support GLES, but the support is not going to be landing soon. If you need to scale to old mobile devices, we recommend to use GameObjects and URP. DOTS is currently not ready for old low end mobile devices.
     
    optimise likes this.
  30. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    I have such a usecase. Literally 3-5 parallel worlds (think of this new game called the medium), but the switching is happening on a button press. Currently i just destroy and load every object in "realtime" (no real loss in performance since instantiating of the same object is fast), but i could now think about showing them at the same time and doing a transition from 1 world to another.
     
    Last edited: Feb 2, 2021
  31. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Oh. Oooh.

    That would explain a lot. A lot of problems I was seeing past months. Thank you for sharing that because I don't believe I ever read that stated anywhere so far and it's [ly] far from being immediately obvious from outside.
     
    Last edited: Feb 3, 2021
  32. XRA likes this.
  33. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    I find working with separate worlds highly convenient as it enables data namespaces, context and responsibility separation. For example, I can create distinct worlds dedicated to:
    - short gameplay loop (what's on screen, player interacting in the immediate world)
    - long gameplay loop (persistent larger world data and it's logic)
    - additional visual ui & fx

    There are cases where I need to render data from all these contexts at once, think: global game world state map in visible immediate player world with ui/fx.

    Keeping contexts separate significantly reduces range of possible system-data interactions thus making everything much simpler to model in meat-cpu, easier to debug and easier to test.
    Surrendering all this because of rendering requirement is definitely viable, but we will miss it greatly.
     
    Last edited: Feb 12, 2021
    jdtec, JesOb, djsell and 1 other person like this.
  34. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    The thing I lack clarity on is what mechanism allows HybridV2ShaderReflection to return the CBuffer and Instancing Properties length.
    What does the shader reflection need in order to get that information. Is it purely the UNITY_DOTS_INSTANCING_ and related macros?

    After experimenting, it seems like it is related to the conversion step and requires use of the
    MaterialProperty attribute. Though I'm not 100% clear on this. (In the cases where I was seeing Length 0 for the CBuffer and properties it was when not using the mix of MaterialProperty attribute and IComponentData on the object)
     
    Last edited: Feb 3, 2021
  35. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @joelv. I just test it with 2020.2.3f but the bug still haven fixed yet.
     
  36. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Right, so this must have been a different bug than we thought it was. Can you report it so that we can track when it is fixed?
     
  37. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    You can refer to Case 1308787 project or I need to submit another new bug report?
     
  38. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Thanks. I tried to repro but was not able to immediately. A second bug report would be preferable I think, with steps how to reproduce the bug. You can probably reference the other bug and say we should use the project from that.
     
    optimise likes this.
  39. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Alright. Case 1312138.
     
  40. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    66
    Hi,
    I'm currently working on a big architectural environment with 17million vertices and 50000 objects. Would it be useful to use the hybrid renderer or doesn't it work that way?
     
  41. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Currently the hybrid renderer works best if you want to render a lot of things with the same mesh and material. If you on the other hand have 50000 unique meshes it will waste a lot of CPU and GPU memory and will potentially be slower than other ways of drawing.
     
  42. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Thank you!
     
  43. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    I have case with minigames inside big game displayed on some ingame terminal like in DeusEx
    So I can render minigame world into RenderTexture and then draw it on terminal.

    Main Goal is separation of concerns, so I can spawn miniGame world play it and destroy afterwards without event thinking about possible collisions between 2 world entities, archetypes and systems.

    With such approach every minigame can be developed as completely separate small game and with separate team and only integrates into main game on late stages.
     
  44. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    It seems that in HybridRendererv2 Environmental Reflections are not calculated properly. In the picture below the space station on the left is not converted to entities and the one on the right is converted to entities. We can see environmental reflections on both but the ones on the space station on the right are waaaaay less pronounced. Any idea how to fix it? @joelv @Sebastion_Allnot
     
    Last edited: Feb 10, 2021
  45. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    It's a niche case but I used multiple worlds previously to render a second rollback catch-up world. This was mostly for debugging. I also used it for a time travel prototype where different timelines of the worlds were rendered on top of each other.

    I admit those are quite niche situations, that said, I feel like there's going to be more cases like this that crop up and it feels odd to sacrifice these things for a rendering system limitation.
     
  46. Fancisco_Greco

    Fancisco_Greco

    Joined:
    Jan 26, 2021
    Posts:
    20
    Is console support still planned for 2020.2?
     
    AlexHolderDev likes this.
  47. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    This is fixed for me in latest Hybrid Renderer V2 in HDRP. ("com.unity.rendering.hybrid": "0.11.0-preview.42")
    Here you can find some nice new examples
    https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/HybridHDRPSamples
    https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/HybridURPSamples
     
  48. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @joelv. Any new progress for this case 1312138?
     
  49. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    We are working through bugs and features as quickly as we can. Once we fix a bug we will try to remember to reply to the reporter. Bugs gets prioritized depending on impact and so on so things might not move at once.
     
    optimise likes this.
  50. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Is there an eta for point lights using URP & Hybrid renderer?
     
    SamOld likes this.
Thread Status:
Not open for further replies.