Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Graphics [RELEASED] Perfect Culling - Pixel Perfect Occlusion Culling

Discussion in 'Tools In Progress' started by PatrickKa, Apr 18, 2021.

  1. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    The main problem is that culling requires performing some operation on Renderers and other UnityEngine.Object. I'm not sure whether I'd like to do that because there is always a risk that the change is not properly reverted and becomes permanent. This is not a problem at all in play mode because it is essentially operating on a copy. Maybe there is a way to create a little custom view or something to overcome this limitation while still not operating on the actual Renderers in the scene.
     
  2. crowmaster

    crowmaster

    Joined:
    Jul 6, 2012
    Posts:
    73
    I got a proposed solution for this issue. You can use Camera.onPreCull and Camera.onPostRender to disable/enable culled meshes respectively.
    I used this approach for my other systems and it was working quite reliably.
    I can also propose to automatically activate editor culling when Scene Camera -> Occulsion Culling editor flag is set.
     
  3. crowmaster

    crowmaster

    Joined:
    Jul 6, 2012
    Posts:
    73
    I am not sure, but it seems when enabling shadows occlusion quality suddenly turns much worse? (tried baking with shadows enabled & disabled)
     
  4. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    By default Perfect Culling doesn't know about shadows at all. However you can double check that this is also true for you by opening the file PerfectCullingConstants.cs and looking for this line:
    Code (CSharp):
    1. /// <summary>
    2. /// Allows to set Renderers to only shadow casting instead of disabling them completely.
    3. /// </summary>
    4. public const PerfectCullingRenderToggleMode ToggleRenderMode = PerfectCullingRenderToggleMode.ToggleForceRenderingOff;
    In this configuration shadows do not matter and you may see shadows popping in and out as objects are culled. If you are experiencing such issues you could change the mode to PerfectCullingRenderToggleMode.ToggleShadowcastMode. Of course, this will be more expensive as it needs to render more objects.

    If you are just saying that rendering shadows increases draw calls then that is just how shadow mapping works and not related to Perfect Culling at all.
     
  5. davdun

    davdun

    Joined:
    Mar 17, 2015
    Posts:
    9
    One question, does merge downsample take into account line of sight between probes? e.g. would it merge probes that are fully occlued from each other due to a wall or a floor between the probes? If not, would that not be an enchancement? (i.e. so probes on different floors don't get merged into one for example).
     
  6. davdun

    davdun

    Joined:
    Mar 17, 2015
    Posts:
    9
    Alternatively allow the merge down samples iteration be defined per axis, instead of a single radius (i.e. 4 horizontally, 1 vertically)
     
    atomicjoe likes this.
  7. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Hey, this is a great question. Unfortunately it does not take line of sight into account but I have written down some ideas to potentially add it. The main challenge here is to implement it in an efficient way that still scales well for millions of cells. That is the only reason why it does not already exist but I will for sure investigate it again soon!

    Some hacky way would be to just raycast between probes but the merge step is highly parallelized and it may be difficult to raycast as it is using ordinary threads and Unity usually doesn't allow access from anything but the main thread. Furthermore it may be unreliable and way too slow. I'm sure I will figure something out eventually though. :)

    This is an interesting idea and I made a note to look into it.
     
    Last edited: Jan 7, 2023
    atomicjoe likes this.
  8. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,866
    Please do! :)
     
  9. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,120
    Is there a way to mark a particular object cull to shadows only? That way I can hand select big meshes to be culled, but still render their shadows so that there's no shadow popping. If I change it to cull all objects as shadows only it won't be as efficient. Culling an object completely including its shadows is fine for most small/medium objects.
     
    atomicjoe likes this.
  10. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Yes. Just set the ToggleRenderMode to PerfectCullingRenderToggleMode.ToggleShadowcastMode and make sure to configure the shadowCastingMode on your objects properly as it will automatically fallback to the faster ToggleForceRenderingOff mode when shadowCastingMode is set to Off.

    If you need something more specialized you can customize the ToggleRenderer function in PerfectCullingUtil.cs. Just be aware that ToggleRenderer is a hot spot and may be called for thousands of Renderers.
     
  11. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    154
    I'm trying to get this to work on my M1 MacBook Pro, but it is freezing the editor and requiring a forced restart with this error every time I try to bake. I followed the tutorial video exactly.


    Code (CSharp):
    1. Exception: GPU returned duplicates. This should never happen. Please re-bake and try to restart Unity if this keeps on happening please file a bug report. Values: 0 and 0, Indices: 0 and 1
    2.   at Koenigz.PerfectCulling.PerfectCullingBakerHandle.Complete () [0x00079] in Assets/Koenigz/Perfect Culling/Scripts/PerfectCullingBakerHandle.cs:32
    3.   at Koenigz.PerfectCulling.PerfectCullingBakingBehaviour.CompletePending (System.Collections.Generic.List`1[T] pending) [0x00004] in Assets/Koenigz/Perfect Culling/Scripts/PerfectCullingBakingBehaviour.cs:438
    4.   at Koenigz.PerfectCulling.PerfectCullingBakingBehaviour+<PerformBakeAsync>d__18.MoveNext () [0x00774] in Assets/Koenigz/Perfect Culling/Scripts/PerfectCullingBakingBehaviour.cs:349
    5.   at Koenigz.PerfectCulling.PerfectCullingBakingManager.EditorUpdate () [0x0000c] in Assets/Koenigz/Perfect Culling/Scripts/PerfectCullingBakingManager.cs:224
    6.   at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () [0x00032] in /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:356
     
  12. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Hey,

    What Unity version are you using? Are you using the most recent Perfect Culling version? Are you using the Apple Silicone or Intel version for Unity?

    There have been problems with the Apple Silicone version in the past but I came up with a workaround that fixed it for everybody. Maybe that workaround is no longer functioning.

    I'd suggest to double check whether it also happens in the Intel version for you because that one always worked.
     
  13. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    154
    I'm using Unity 2021.3.12 with the latest version of PC. I'm using the Apple Silicon version, yes. I can try the Intel version, but last I tried it was so slow it was basically not usable for real development work.

    Edit: Well, I can't even get our project to open in the Intel version, it just keeps freezing as soon as the editor opens up, so not sure I'm going to be able to test outside of the silicon version.
     
    Last edited: Feb 9, 2023
  14. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Does the issue reproduce in the example scenes that are included in the Perfect Culling asset?
    Could you try to clear all bake groups, re-add them and attempt to bake again?

    Edit: We also may want to move this towards communication via mail. For instance I was not notified about your edit. Concluding that the forum may not be ideal for this.
     
  15. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    508
    I checked out this asset when it was first released and liked what I saw, it was just missing a feature I needed. I'm back just checking to see if some features were added.

    1. It is possible to bake occlusion data for levels that span multiple scenes? My levels are made up of multiple scenes and I bake lighting, nav mesh, etc by opening multiple scenes at the same time then start the bake process.

    2. This may be obvious, but does this handle dynamic objects? I haven't seen it mentioned anywhere. My game is a VR game with a lot of objects that can be picked up by the player. I want to make sure this can cull those objects when they are behind walls.
     
  16. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    1. You can load all scene simulatenously and bake them together. This will make sure that occluders in other scenes are also taken into account.

    2. You could disable then when nearby renderers are occluded. But you cannot cull fully dynamic objects that move around a lot.

    I attached some documentation for you to review.

    I hope this helps.
     

    Attached Files:

  17. dzungchaos

    dzungchaos

    Joined:
    Apr 13, 2021
    Posts:
    7
    Could you please give an example of how to do that in the source code?
     
  18. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    You don't need code for that. You should be able to use the PerfectCullingSceneGroup component. I attached the documentation.

    If you really want to do it in code you may be able to do so using the API defined in PerfectCullingAPI.BakeGroup though.
     

    Attached Files:

  19. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    @PatrickKa I'm interested in culling dynamic objects. Would it be possible to have the current system mark cells in the 3D world grid as occluded when the camera is in a specific cell? This data could then be used to occlude dynamic objects that are in that occluded cell. For example, we could create static cubes for each of these cells and use the current baking system to determine their visibility for the whole baking volume. Then we could use the volume of those cubes to detect whether a dynamic object is inside them and guaranteed to be occluded. Thanks!
     
  20. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    The problem is that you'd need transparent cubes to do this and at some point the rendering resolution would become an issue as there are too many transparent objects stacked on top of each other (but maybe it would work well enough for a low amount of cells). Generally I think it definitely should be possible and I'm generally convinced that it should be possible to leverage Perfect Culling to build a dynamic occlusion system on top of it. I actually also was trying an approach where I compared visible renderers of two cells. If they have no renderers (or a defined threshold) in common they are most likely occluded. The main advantage being that it does not require another bake but it was not working well enough when I tried it (if you design your level around this idea by for instance using two meshes for a wall so they are clearly separated, etc. it should work very well though). I also may give it a shot again in the near future and I also had your idea already but I haven't had a chance to give it a try.

    However many things have been added to Perfect Culling since and you should actually be able to use PerfectCullingSceneGroup to enable/disable scripts when a renderer becomes visible (see example scene Demo_UnityBehaviours). That should be good enough to prototype the cube idea. Just make sure to add the level geometry itself as Additional Occluders and make sure to render transparent cubes.
     
  21. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    249
    I have been having problems with reimport triggering while baking perfect culling.
    unity 2021.3.16f1
    perfect culling 1.2.4
    HDRP 12.1.8
     
  22. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Thank you for the report. I think I have been able to reproduce the issue. I will report back when I fully understood the problem and found a workaround/solution.

    EDIT: One way to workaround it may be to uncheck "use Unity for rendering" in the Perfect Culling settings - this only works on Windows systems though.
     
    Last edited: Apr 3, 2023
    jiraphatK likes this.
  23. Lyje

    Lyje

    Joined:
    Mar 24, 2013
    Posts:
    168
    Hi, I've just been implementing Perfect Culling in an upcoming game and it's really nice so far! I've not got a huge amount of experience with it yet but it seems to do what we need, and the sampling provider system works nicely to customise PC to our use case.

    With that in mind I have a feature request - this addresses a couple of relatively minor things I've worked around in our case but would be nice to have out of the box.

    Basically, it would be nice to have a "batch mode" for baking, either as a separate PerfectCullingAPI.Bake call or a bool in PerfectCullingConstants. Most importantly this would suppress anything requiring user input, for example the "no renderers found" popup or EditorSceneManager.SaveModifiedScenesIfUserWantsTo (possibly with a bool somewhere for defaulting to saving or not saving). A less important option would be to bake syncronously so batch processing wouldn't need to use editor coroutines.

    As I say, not a big deal if these features don't make it in, as it's fairly easy to work around. But doing so requires editing the PC code and changing third party internals is always a little nerve-wracking!
     
    PatrickKa likes this.
  24. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Initially the bake was fully synchronous but the Unity Editor is not setup to render multiple "frames" like that in sequence and even less so when you do it from an Editor script without rendering real frames. It eventually crashes the Editor because memory is not correctly released, etc.

    Batch processing features are a great idea though. :)

    The problem is that Perfect Culling temporarily unassigns the render pipeline in an attempt to escape the multiple render pipeline nightmare. While that does work as expected it is the cause for the reimport. I will see whether it can be solved in a different way. Unfortunately Unity makes it very hard due to bugs and other constraints in all render pipelines and the fact that everything is relying on different components that cannot easily be referenced without causing script errors for other pipelines again, etc.

    The native renderers should workaround the issue. I will continue to see what else I can do to workaround it within Unity though.
     
    Lyje likes this.
  25. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    249
    Thanks. Atleast in the meantime there is work around.
     
  26. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    172
    Hi, is there a way to quickly add and bake all static objects to perfect culling?

    I frequently change the scene by adding or removing new objects to the scene.

    It would really improve my workflow to not always have to select all objects and add them to the bake groups whenever I add new renderers to the scene.
    I would like to click "bake" and have it correctly bake for all new objects in my scene.
    It would also be fine if this were an API call, or a series of API calls. Is this possible? Thank you.
     
  27. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    Btw, the pc_renderer_vulkan dll file in the package is marked with "Any platform", which causes it to get included in builds. I only realized this because my UWP (Windows Store) app was failing certification and it was due to this dll being included.
     
  28. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    Also, the PerfectCulling ColorTable.asset file is getting included in builds and adding 180KBs of data, which I assume is not needed at runtime.
     
  29. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Sorry for the late reply. The Unity forum is very unreliable when it comes to notifications. Feel free to contact via mail if you really are in need of a reply.

    The full source code is included so you can take a look how it is working and extend and modify as needed.

    Something like this could work:
    Code (CSharp):
    1.  
    2. var inputRenderers = FindStaticRenderers();
    3. volume.bakeGroups = PerfectCullingUtil.CreateBakeGroupsForRenderers(inputRenderers, (x) => true).ToArray();
    4. EditorUtility.SetDirty(volume);
    5. PerfectCullingBakingManager.BakeNow(volume);
    6.  
    Thank you for letting me know. I will make sure it gets stripped properly.

    I will make sure it is getting stripped as well.

    In the past there was some ideas to potentially allow baking at run-time but that did not really go anywhere. I will make sure it gets stripped. :)
     
  30. Avol

    Avol

    Joined:
    May 27, 2016
    Posts:
    95
    No solution for asset reload on bake start and end? Previous posts were talking about a fix, with disabling code, but that's already disabled in the latest release.
     
  31. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    You are using HDRP? If you are on Windows you can open the Perfect Culling Settings and uncheck "use Unity for rendering". That should workaround the issue.

    There is no fix yet as it is a difficult problem due to how render pipelines and everything work despite Perfect Culling using unlit shaders :-/ I already prototyped other solutions but they did not work or have been so slow that even the asset reload was more desirable. I keep on trying though.
     
    Avol likes this.
  32. Avol

    Avol

    Joined:
    May 27, 2016
    Posts:
    95
    Yes, using HDRP on windows. Will try the setting.
    Still causes the reimport of .fbxs and vfxs. :p also after baking, plugin could restore loaded scenes, or at worst not remove them from scene list.
     
    Last edited: May 16, 2023
  33. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    Hi @PatrickKa, is there a new update coming soon that might take care of the .dll and the PerfectCulling ColorTable.asset issue?
    Also, I see that there's a lot of code that's in the Scripts folder that could be moved to the Editor folder. I assume this is partly due to the previous plan you mentioned of allowing baking at runtime. But the more code that's moved to the Editor folder, the less code gets into player builds (unfortunately, even with stripping set to High, unused code can get included). It would certainly help a lot to reduce build size for platforms such as WebGL.
    Thanks!
     
  34. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    I moved the following folders and files into the Editor folder without any compilation issues
     

    Attached Files:

  35. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    I can absolutely get this done. Hopefully it would go out next week already then. Sorry for the delay. I thought you already applied the change yourself and that made me think it was rather low in priority.

    I will make that change for sure :) :) :)
     
  36. VoxelBoy

    VoxelBoy

    Joined:
    Nov 7, 2008
    Posts:
    240
    Just realized that even the scripts in the Editor folder are getting included in the player builds due to how the Asmdef is set up. It's at the root level and everything it encompasses is being built for All platform builds.
     

    Attached Files:

    PatrickKa likes this.
  37. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    304
    Unity 2020.3.48, OSX, getting these two issues with version 1.2.5:

    Assets/Koenigz/Perfect Culling/Scripts/Baker/Native/PerfectCullingBakerNativeWin64.cs(307,17): error CS0246: The type or namespace name 'pc_renderer' could not be found (are you missing a using directive or an assembly reference?)
    Assets/Koenigz/Perfect Culling/Scripts/Baker/NativeVulkan/PerfectCullingBakerNativeVulkanWin64.cs(185,17): error CS0246: The type or namespace name 'pc_renderer_vulkan' could not be found (are you missing a using directive or an assembly reference?)
     
  38. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    I sent you a PM :) In a nutshell I think this should be resolved by deleting the Perfect Culling folder and reimport it cleanly but there are some other issues caused by re-organizing the project structure in 1.2.5 that are addressed in 1.2.5.1 (still in review, download link in PM).
     
  39. detowu

    detowu

    Joined:
    Oct 19, 2016
    Posts:
    3
    I just ran into the same issue. Could you send mit that PM too please?
     
    PatrickKa likes this.
  40. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    304
    Issue solved indeed. :)

    Anyways, I'd like to ask a feature: in the Renderer Selection tool, would it be possible to add a list of shaders to exclude, so the culling bake will ignore all objects using that shader?

    Context: I use EasyRoads plugin and it generates some transparent, editor-only meshes to show terrain deformation and other stuff. These meshes are hidden in the Scene view so I cannot select them or tell Perfect Culling to ignore them, so they always end up in the culling bake. But those meshes all use a specific shader so it would be easy to exclude them on a per-shader basis.
    I know it's a bit project-specific, but I think it might come in handy in other cases too.
     
    PatrickKa likes this.
  41. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    I made a note to add a filter for shader names. Though I think I probably should also ignore objects that are hidden and that may solve it, too. :)
     
    DanjelRicci likes this.
  42. DanjelRicci

    DanjelRicci

    Joined:
    Mar 8, 2010
    Posts:
    304
    Ah yeah, that would work great too! Thanks a lot.
     
  43. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    39
    Hi, I'm using perfect culling for the very first time.. How do I know that it works? In the scene it shows that it culls my objects correctly.
    upload_2023-6-29_21-46-5.png

    But the performance says otherwise. My game performs significantly worse (lower FPS) and it doesn't show any tris reduction. Any idea what I might be doing wrong? I'm following the documentation step by step, and it says that I should get objects popping out, but I didn't. Either I set the cell size etc correctly or it's not working at all. :/

    I'm on Unity 2021.3.27 URP 12

    EDIT:

    I discovered the stats and it shows that it doesn't cull correctly, I thought the visualization in the scene windows represents the actual culling, guess not. If it doesn't work, is the worse performance expected? Meanwhile I will try tweaking the parameters.
    upload_2023-6-29_21-54-38.png

    EDIT:
    When I enable this option
    upload_2023-6-29_22-17-45.png
    It seems to draw lines from all directions. Looks like it determines everything as visible.
    upload_2023-6-29_23-3-1.png
     
    Last edited: Jun 29, 2023
  44. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Hey,

    Did you also evaluate performance in a build? Generally it should not make performance worse because it does very little work at run-time (and if you don't move the camera it should be pretty much free). So that is not expected at all and the only thing I can imagine is that you see overhead caused by rendering debug gizmos, etc. Also check whether you see any errors in your Console.

    It is hard to say with only a couple of images but I think your scene looks like it simply may not allow for too many culling opportunities. The trees are essentially translucent at the top and the wooden part is too thin to really occlude objects.

    For now I'd suggest to play around with the demo scenes and make sure that they work. It should also give you a better idea what to expect. Furthermore I'd recommend to read through the Troubleshooting document.

    Feel free to reach out via mail to share more images of your level and your settings. I find the forum to be rather unreliable at times.

    EDIT:
    Maybe also test to set Merge-Downsample Iteration to 0 on the Perfect Culling Volume and set Include Neighbor Radius to 0 on the Perfect Culling Camera and rebake. This should give you the raw and most aggressive bake output.
     
  45. detowu

    detowu

    Joined:
    Oct 19, 2016
    Posts:
    3
    Is Perfect Culling compatible with IL2CPP and Android 64bit builds? Since we switch to IL2CPP I'm able to bake, but it just culls everything. Before that it was working.

    Edit: seems like IL2CPP is not the problem. But if I set the graphics API of the editor to OpenGL it culls everything. I keep on investigating, maybe I just missed something.

    Edit2: never mind. Everything works just fine after rebake... Sorry for bothering you! :)
     
    Last edited: Jul 6, 2023
    PatrickKa likes this.
  46. sa-muratbalci

    sa-muratbalci

    Joined:
    Nov 17, 2022
    Posts:
    1
    Hi,
    I just started using Perfect Culling, got a hefty amount of performance bump already!

    I am baking using Native renderer as Unity re-import causes crashes.

    1- [Solved] The "Visibility Layer" on Perfect Culling Volume seems like not working, as I have removed some layer from there yet some meshes on those layers are still getting culled after re-bake. Those meshes are children of a gameobject/mesh that is in a different layer that is ideally cullable.
    edit- just checked the code, it does not do what I originally thought it would but when used in that way it works. so I will remove those from bake groups by hand because of 2:

    2- `Perfect Culling Scene Group` to exclude things from getting culled didn't work for me. I am baking a multiscene setup with "Perfect Culling > Bake > Bake all" button.
    -Hmm just checked the seems like I need to implement it as override methods were empty. My mistake for not checking before.

    3- [Solved]Things stay culled when I teleport my player rig but I will need to check my logic as I would think it would have updated culling regardless of teleportation.
    - Turns out some meshes that were in bake were being destroyed causing toggle method to get exceptions.
     
    Last edited: Jul 11, 2023
  47. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    Hey,

    Sorry for the delay. I had to deal with some health issues but I'm feeling much better again!

    If you want to exclude things from culling you may want to use a PerfectCullingRendererTag and check Exclude from bake (you may need to remove all bake groups and re-add them for it to take effect because already assigned renderers are not removed).

    If you are still in need of help or have feedback to make the asset more intuitive and easier to use just to let me know.
     
    sa-muratbalci likes this.
  48. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    249
    Hey all, just want to share some finding.
    The code that triggers the reimport is the one inside Unity Baker that change the graphic pipeline, so if you use Native renderer or Vulkan for a bake it should fix it right? nope. mine still trigger reimport. after some logging, I found out that the reference plugin of the native renderer and vulkan of my PerfectCullingResourcesLocator is missing for some reason, so it fallback to UnityBaker. After reassigning the plugin to the PerfectCullingResourcesLocator, all is well again.

    btw, I think you should add some logging to tell if the plugin is missing and it fallback to UnityBaker to save us sometime of figuring this out ourselves.

    upload_2023-7-18_16-21-10.png
     
    PatrickKa and Smack332 like this.
  49. PatrickKa

    PatrickKa

    Joined:
    Apr 30, 2014
    Posts:
    233
    That are some great findings and makes sense. Thank you!

    You are right that there should be more logging. I was under the impression the references would never get lost but chances are that some of the recent updates that changed the file structure may have broken it in the update process.

    Anyway you cannot really have enough logs so I will add that for sure :)
     
    jiraphatK likes this.
  50. jacobian

    jacobian

    Joined:
    Jul 20, 2015
    Posts:
    17
    Hello, I'm quite likely to purchase your asset. For mobile vr. I have my own implementation of the basics, cube map and color coding game objects, but yours seems to be much much more feature rich. i'm wondering about how much ram it uses, and suspect its a lot. My game is open level design hub world-ish.
    Wasn't quite sure how i was going to do the cells myself. Does it have ways to reduce the data generated, one example I kind of saw in a talk some time ago is to have master nodes which list all the visible objects and from there every cell only lists its omissions' and additions to that list, very likely to save on a lot of memory since the change between nodes is likely to be minimal. Also to have streamable assets so i can load only the closer cells in to ram??