Jump to content

Sector blinks when Culling Camera moves through (see-through) Portal


Deadcow
 Share

Recommended Posts

I've got a problem with SECTR Culling Camera - when it moves through some (see-through) portals - connected sector blinks for about one frame. 

spacer.png

 

I don't use streaming (yet), no neibhor loaders, just Sectors, Portals and Culling Camera with this setup

Изображение

 

I'm slightly paniking on this one already, since I put some efforts to integrate SECTR and see great performance results. So I hope you'll be able to help me with this 😑

Link to comment
Share on other sites

13 hours ago, Deadcow said:

I've got a problem with SECTR Culling Camera - when it moves through some (see-through) portals - connected sector blinks for about one frame. 

spacer.png

 

I don't use streaming (yet), no neibhor loaders, just Sectors, Portals and Culling Camera with this setup

Изображение

 

I'm slightly paniking on this one already, since I put some efforts to integrate SECTR and see great performance results. So I hope you'll be able to help me with this 😑

I would add your neighbor loader in to your character. 
Then I would take a look at your culling, as this seems like a culling issue between portals. Loading in the next portal should make this go away (using the loader). 

 

Link to comment
Share on other sites

9 hours ago, Bryan said:

I would add your neighbor loader in to your character. 
Then I would take a look at your culling, as this seems like a culling issue between portals. Loading in the next portal should make this go away (using the loader). 

 

I thought that Neibhor Loader makes no sense if I only use Sectr Core and Vis. 
Anyway, I tried that initially but it maked no difference. It looks like something invisible blocking Culling Camera sight, like Camera thinks that it inside of some geometry or something.

I tried to remove all geometry around the entrance just in case, but with no luck. Also I noticed, that this happens only in one direction. When I start game in "sector A" and go to "B", this "B" blinks in front of me, wnen I start game in B sector and go to A it blinks behind of me at the same point. So in this case "sector A" works persistingly fine

Link to comment
Share on other sites

I was wrong and this issue is not one-frame timed. I found position in the middle of the doorway where sector B is constantly culled out (no matter how I rotate the camera).

Then I tried to slightly move the portal... and it (almost) helped. For most of the time it was fine but it blinked once while I tried to reproduce the bug. I'll continue to try to slightly move the portal, but it'll be helpful to figure out what causing the problem in the first place

Link to comment
Share on other sites

Ah ok, portal position could effect this indeed. 
You should be able to snap to the mesh, you could try to swap the position of the portal itself. 

For example if its a door way swap to the other side of the door. 
Note you can overlap sectrs if you need to. 
Its not preferred but you can do it if its causing to much of an issue. 

Please let me know how it goes. 
 

Link to comment
Share on other sites

  • 3 weeks later...

@Bryan I believe I have a similar or related issue. In my case however I don't have the same "flash", but I do have a single frame stutter when I pass through a portal. This happens when traveling in either direction through the portal. 

In my case I've set up a grid of sectors where a portal exists at each corner and each edge midpoint for a total of eight (except for the sectors at the edges of the world). This is because I have a 2.5D streaming platform world. You can view screenshots and a write-up here for more specifics https://derekknox.com/articles/generating-2d-and-3d-streamable-worlds-in-unity/. But here is one screenshot from the article: example-in-action.png?v1.1

My questions are:

  1. Is Sectr smart enough not to reload an existing sector? From what I can tell, my issue seems to be the sector is reloaded, but I don't know for sure. 
  2. What (if any) is the optimal way to define the portals and sector such that a character with a NeighborLoader of `MaxDepth = 1` loads the surrounding eight neighbor sectors?
    1. I have this working from a streaming perspective, but the issue is I have the stutter behavior so I feel as though something is not set up properly.
  3. If sectors are designed to be flush with each other (as is my case, again see the attached link above for details) what is the correct way to set up their corresponding portals?

Thank you in advance. Sectr rocks and I look forward to solving this jitter issue soon with your help.

Link to comment
Share on other sites

I've since confirmed the issue for me was due to the `Resources.UnloadUnusedAssets` call in `SECTR_Chunk`. I actually discovered this in debugging the source and then found the below thread which confirmed.

I don't like editing 3rd-party source due to the fragility related to potential future asset update conflicts 😞, but this looks to the solution for now. @Peter  is there any plan to update Sectr to resolve this issue in a non-comment-out-the-source way?

 

Link to comment
Share on other sites

  • 2 weeks later...
On 2/22/2022 at 11:44 PM, wizardpoop said:

I've since confirmed the issue for me was due to the `Resources.UnloadUnusedAssets` call in `SECTR_Chunk`. I actually discovered this in debugging the source and then found the below thread which confirmed.

I don't like editing 3rd-party source due to the fragility related to potential future asset update conflicts 😞, but this looks to the solution for now. @Peter  is there any plan to update Sectr to resolve this issue in a non-comment-out-the-source way?

 

Very interesting, I will run tests on this today. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...