#Cull Factory: Stops rendering faraway rooms

7574 messages · Page 8 of 8 (latest)

austere stirrup
#

oh I should also note that this isn't a fix for light bleeding, it actually fixes the light bleeding being fixed in some cases lol

previously, CullFactory would assume the light from the window was only visible through the portals leading out of the window room, but now it just assumes that the light is visible on everything in its area of influence, meaning that it will always shine through walls where it would in vanilla (if I implemented it right)

#

it involved me writing some new geometry algorithm that I couldn't find anyone describing online, so there's a good chance I goofed it somewhere

orchid jetty
#

i've been noticing it with stuff that i thought used to be fixed

#

not the window lights

#

but stuff like fireplaces

#

or the chandeliers from main

austere stirrup
#

huh

#

so the light bleeding fix you're talking about is the shadow fade disabler option?

#

those will bleed if that option is off

orchid jetty
#

it's on for me

#

if you think this is worth investigating

#

ill try to find a replicable seed with just cullfactory (or cullfactory and lethal sponge)

#

it could be a conflict, just not sure what else would be touching it other than sponge

austere stirrup
#

yeah if it's reproducible with just the two, or especially just cullfactory

#

what's the multiplier set to in sponge where you're having this issue?

orchid jetty
#

looks like i either changed the cap from 250 to 150

#

or the default changed at some point

#

i have the mult set to 10, the default

austere stirrup
#

good lordy

#

yeah that would do it

#

how is the default 10?!

#

I would add an option to make the shadow fade distance option able to always override shadow fade distance, but the thing is, I saw a severe performance drop on grand armory when it used to do that

#

the heuristic reclaimed all the lost performance by preventing it overriding the lights on that interior, while still doing so on mansion

#

probably the best thing would be for LethalSponge to let you adjust the shadow fade distance the same way, so you can match the values, but 10x multiplier is insane for a default, especially if it's going to also affect shadows

#

ahhh wait, I was misreading the code, it's not a 10x multiplier of the fade distance, but a 10x factor of the range, I'm not sure how those values would compare to the vanilla ones then

#

it does make perfect sense for the lights to bleed given that it's not setting the shadow fade distance to match, though

orchid jetty
austere stirrup
#

I believe so, yeah

#

should be fairly easy to repro if I'm right, since any light that you see through walls once should always do that at the same distance

minor nymph
#

so if i turn off this option will be alright?

austere stirrup
#

I believe so, yeah

gaunt herald
#

is it better to stay on cullfactory stable or switch to beta?

minor nymph
#

If you find a bug, you can report it and go back to the stable version.

austere stirrup
#

up to you, the changelog outlines the improvements so you can decide if it's anything you want

#

I don't think it's particularly likely to be severely broken, but it's possible there may be some new culling bugs

#

(it's also better for me the more people use the beta and report any bugs on it, obviously)

gaunt herald
#

ok i tried beta and got something weird (that probably isnt you)

#

first launch of the day using beta, it was causing stutters on the ship, that got worse when landed. i tried again with stable and it didn't happen, so i thought it was beta. i tried beta 1 more time and the stutters are gone

#

i dont really know why first launches behave poorly like this but at least is not an issue with beta

#

on a more positive note

#

the fps in the ship is a little better

#

normally in my profile it drops down to 106-109 when turning but now the lowest is 114

austere stirrup
#

huh, I wouldn't have expected much to change on the ship thonk

#

or..maybe I can think of one reason it could, but not sure

#

and as far as stutters go, I wouldn't tend to expect CullFactory to be able to cause stutters since the work it does each frame is pretty consistent, but lemme know if it seems to correlate to the beta

gaunt herald
#

error spam when quitting to menu

#

menu music is playing but screen is stuck like this

#

(this is on beta)

#

all the menu buttons seem to work the same but can't see them

gaunt herald
#

oh, this too when successfully leaving a lobby

austere stirrup
#

oh weird what the

#

it should be unsubscribing from that when you exit to menu, I'll check in a bit

#

good thing this is beta 😅

austere stirrup
#

CullFactory 2.0.0 Beta 1

Fixed

  • Error spam when exiting to the menu
#

that exception should be prevented at the source, but I also implemented some cleanup when going to the menu that should prevent any warnings about destroyed tile renderers as well

#

huh, from your logs it looks like someone destroyed a whole tile in an interior though, no idea why anyone would be doing that lol

#

you might get warnings about destroyed objects still with whatever happened there

steady bane
#

could it be zeranos?

austere stirrup
#

oh hmm, maybe

#

it mentioned halation in the logs but I don't know if I was looking at something referring to the current moon or not

#

lemme check

#

oh yea it does claim to have been landing on Halation when the first CullFactory exception happened

#

good lordy this is why I avoid MonoMod

#

it's so funny seeing 3 patches from one mod and 2 from another though, that doesn't seem necessary lmao

#

looks like it was actually the second landing, but I get no errors landing twice thonk

#

I guess I'll just have to assume that the fix will mean whatever wawa encountered is now a warning instead of a full camera freeze

#

good enough for now shrug

austere stirrup
#

2.0.0 Beta 2

Fixed

  • Incorrect tile bounds on SleepsDungeon, caused by a bad calculation of world bounds for tiles with overridden bounds
steady bane
#

Yippee!!!!

#

Does it work now? Or still buggy

austere stirrup
#

it looked okay in my quick test, but you'll have to tell me if it holds up everywhere lol

north kraken
austere stirrup
#

hmm, hopefully also with a seed and profile code for me to reproduce the issue

split pivot
austere stirrup
#

oh boy

#

well if you can get me a seed for this so I can reproduce it that would be good

#

I don't really have time to spam seeds looking for issues anymore

#

looks like some tile around there has incorrect bounds, but if this only happens with the beta version then I might have to reevaluate

north kraken
#

@austere stirrup This should be it along with the code we used 01991140-551a-34f3-479b-7d0ce0b44f74

#

Moon was Defectus

austere stirrup
#

nice thanks

north kraken
#

yw

north kraken
austere stirrup
#

right

north kraken
austere stirrup
#

not yet, I'm planning on taking a look today

north kraken
#

Okay for now I just added deepcore to the blacklist

austere stirrup
#

indeed, there's a good chance that's what I'll have to do on my end until a fix can be made by the interior author

north kraken
austere stirrup
#

uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

I have bad news

#

this interior is illegal

#

it is simply undefined behavior to have doorways that don't align to cardinal directions

#

I'm surprised there haven't been a bunch of issues with tiles colliding

#

the way that CullFactory works, there's no way for it to account for this, so the interior has to go in the blacklist

minor nymph
#

I removed from my modpack since a lot of times monsters get stuck.

austere stirrup
#

I did notice that too

#

a masked was killed on the surface because it spawned off the navmesh somehow

#

anyway

#

2.0.0 Beta 3

Fixed

  • An exception in the far clip plane override code when a second lobby is started with a different player count

2.0.0 Beta 4

Fixed

  • Disabled culling on the Deepcore Mines interior, due to non-axis-aligned doorways
#

anywho if yall get a chance to try this latest version today or tomorrow, lemme know, and if things seem stable still I'll probably push it to stable

north kraken
#

@dull copper How dare you make your interior be illegal greed

dull copper
#

i could have sworn all my doorways are aligned

#

i think a decent bit of my objects have culling though??? It should be fine without it

austere stirrup
#

if you mean LOD culling on the tile meshes, that's risky

#

mineshaft caves do that, and you can see through the world sometimes because of it

#

CullFactory specifically disables that on any static geometry in the interior because it renders that kinda useless anyway with how much geometry it can correctly eliminate

austere stirrup
#

if you're unsure where to look, I'll get tile info later

dull copper
austere stirrup
#

gotcha

#

then it'll at least be less noticeable

dull copper
#

im pretty sure its only on stalagmites, rocks, etc

#

the lights also all have a short cull distance i think

#

did that due to well, the 5 floors

austere stirrup
#

makes sense

#

i kinda wonder if I should have an option for minimum light fade distance Hmm most interiors can get away with much higher numbers for that without performance degradation when CullFactory can be enabled

#

especially if the shadow fade distance doesn't activate before the light fade, since that means that lights can be culled based on line of sight

austere stirrup
#

@north kraken have you continued using the beta? no issues since the Beta 4 went out?

#

I'm looking to push it to stable finally

north kraken
austere stirrup
#

ah, I was about to look and see if that was the case yet teehee

#

good to know

#

will do

#

CullFactory 2.0.0

Added

  • Handling for multiple dungeons being spawned simultaneously

Fixed

  • Lights flickering visibly when they exist outside their parent tile (e.g. the window room in mansion)
  • Incorrect tile bounds on SleepsDungeon, caused by a bad calculation of world bounds for tiles with overridden bounds
  • Disabled culling on Outfall to prevent culling issues when landing
  • An exception in the far clip plane override code when a second lobby is started with a different player count

Changed

  • Optimized culling algorithms slightly
#

now to see what weird mod combinations manage to break this 😅

north kraken
austere stirrup
#

hmm, could be

#

if you notice that and manage to get to a position where it stays consistently unlit, you could try toggling culling in LethalConfig

#

definitely worth reporting if something like that is happening

north kraken
#

I just was like "That's kind of funny"

#

XD

austere stirrup
#

since theoretically I should be covering every case to make lighting consistent with no culling, but I also often have to tweak that logic if I make refactors

#

huh I see

#

how close were they to each other?

north kraken
#

Wouldn't explain the one I found that lead to a dead end earlier on that wasn't lit probably but lemme see if I can find it

austere stirrup
#

anyway, the only difference between culling on and off should be the options for shadow fading and LOD culling, so if you notice anything that falls outside of those categories when you toggle it, it's good for me to know

#

especially if the lights come in and out visibly that would be suspicious

north kraken
#

It might be LOD Culling beinky funky, I noticed the ones not lit looked like the model was lower res

austere stirrup
#

I'm preeeetty sure LODs can't affect light enablement, but I may be wrong

north kraken
#

I did notice they weren't constantly lighting up anymore from a distance though so it's possible it was the Culling lol, but I'm also glad. I always found it weird how in the past I could stand far away and they would stay lit and play the audio on a weird idle loop lol

austere stirrup
#

huh, that is curious

#

I'm curious if there's any angle at which it does light up, but especially whether disabling culling would fix that

#

lemme know if you try that at some point

north kraken
#

Doesn't seem to be CullFactory, it's something else. I noticed it seems like only one of them is lighting up and others are not but idk what would be affecting them lol. It's possible it was the readdition of Lethal Things maybe since I know it hooks into a few things strangely iirc but idk why it would break the Tesla Gate Lights. I do know TestAccount plans to become a maintainer for the mod and he'll likely rewrite it since he mentioned he had some issues with the code of Piggy's Variety so it's quite possible Piggy's mod just hooks into something that something else could easily hook into which prevents all the Tesla Gates from lighting up lol

#

@gaunt herald You play with Piggy's mod, have you ever run into this issue and have you found what causes it?

gaunt herald
#

No I haven't

#

The tesla gates have always been on

lusty kindle
#

I've used the Tesla gates for a long time and never had this issue either

steady bane
#

Tesla gates working fine for me

north kraken
austere stirrup
#

how do people keep making errors like this happen lol

#

did you change lobby size through MoreCompany or anything like that?

#

also, when did this happen?

north kraken
#

Had a player dc mid round, that's all I can guess is what caused it

#

cus it broke when going back into orbit

austere stirrup
#

you're sure this is the first error?

#

this would break a whole lot more than CullFactory

#

this isn't a case of me having a cached array that mismatches the size of the player scripts array, I'm directly reading from it here

#

if someone is going around destroying players from that, it's not just gonna be CullFactory breaking

north kraken
#

I see something about a NetworkObject getting destroyed when he dced I think, but nothing about the player object

#

but he said he wasn't holding anything

#

idk

#

I clearly blame the Bozo Ferris Wheel since he was riding it when it happened greed

#

@split pivot

split pivot
#

Power went out while I was vibing in there smh

austere stirrup
#

you don't have a mod that adds extra "players" somehow, do you? I don't know if there are mods that add to the allPlayerScripts array, but maybe that could be the culprit

#

not sure if something like LethalInternship does that

#

if something like that was left behind as the ship was taking off, that could explain it

steady bane
#

morecompany greed

austere stirrup
#

not exactly what I mean

#

MoreCompany sets the array of players at load-in, and it is supposed to keep a fixed number for the entire duration of the run

#

it also never destroys players (in keeping with vanilla behavior)

minor nymph
#

I noticed that teleport for an specific place when someone disconnect

austere stirrup
#

@split pivot this looks sus:

NullReferenceException: Object reference not set to an instance of an object
  at itolib.Behaviours.Kinematics.PlayerSeater.PlayerSitLocal (GameNetcodeStuff.PlayerControllerB player, System.Boolean unsit) [0x0000d] in ./Behaviours/Kinematics/PlayerSeater.cs:284 
  at itolib.Behaviours.Kinematics.PlayerSeater.PlayerSitClientRpc (Unity.Netcode.NetworkBehaviourReference playerReference, System.Boolean unsit) [0x0010f] in ./Behaviours/Kinematics/PlayerSeater.cs:271 
  at itolib.Behaviours.Kinematics.PlayerSeater.__rpc_handler_2014183484 (Unity.Netcode.NetworkBehaviour target, Unity.Netcode.FastBufferReader reader, Unity.Netcode.__RpcParams rpcParams) [0x00064] in <09cf80b3b5c446459e8523dd7f6f0365>:IL_0064 
  at (wrapper delegate-invoke) <Module>.invoke_void_NetworkBehaviour_FastBufferReader___RpcParams(Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.__RpcParams)
  at Unity.Netcode.RpcMessageHelpers.Handle (Unity.Netcode.NetworkContext& context, Unity.Netcode.RpcMetadata& metadata, Unity.Netcode.FastBufferReader& payload, Unity.Netcode.__RpcParams& rpcParams) [0x0004e] in <895801699cfc4b4ab52267f31e2a4998>:IL_004E 
north kraken
#

I have MoreCompany yeah

austere stirrup
#

although that's coming from a NetworkBehaviourReference, huh

north kraken
#

But like you said it shouldn't destroy stuff

austere stirrup
#

indeed

#

any time I've thought it might be, it hasn't been that lol

#

wait

#

you said he was riding in something

#

does that something parent the player to it

#

@split pivot

#

I forget exactly how the player is set up to not get destroyed with the level, but you may be playing with fire if you're parenting the player to something in the level

north kraken
#

he said the Ferris Wheel uses playerphysicregions which reparent the player

austere stirrup
#

gotcha

#

hmm

#

probably would be worth someone trying to repro that

#

I'm working rn so I can't look into it, but I'm 90% sure that this requires no action on my part anyway

#

it's perfectly fine for me to assume there's no nulls in that array, since every other place that references it does and will break if that's not true

#

you'd probably have a lot of perma-broken enemies at the very least

split pivot
#

It did cause some unintended player animation shenanigans due to not resetting things properly lol

austere stirrup
#

huh, so you were intentionally passing null then?

split pivot
#

Oh whar, no

#

It uhhh

austere stirrup
#

or was target transform null?

split pivot
#

attachedPlayerTransform only gets assigned when a player's attached

austere stirrup
#

ohhh

split pivot
#

However for some stuff that I want multiple players to be using at the same time (PlayZone's slides for instance), every player attaches locally

austere stirrup
#

so that was the null, I see

#

damn

split pivot
#

Ye

#

I do network the sitting down part, but the player entering the slide itself is local

austere stirrup
#

I wonder still if it's possible that being seated when the ship takes off causes any issues though

#

but if so, I have to check if the elevators in black mesa do the same thing

split pivot
#

Player gets killed as the ship leaves iirc

#

So I don't think they remain parented before scene unloads

austere stirrup
#

hmmm yeah that could be

#

I haven't looked at that logic in a while, but it does seem like the player stuff would run first

split pivot
#

But yeah I got pranked by having my power go out while riding the Ferris wheel greed

#

It do be a somewhat unusual scenario

#

Immediately exiting instead of hitting quit lobby

austere stirrup
#

I would expect that to time you out eventually, but it's possible you were still "connected" on the host side until takeoff

#

so essentially I would imagine it was the same as you just remaining connected and seated until takeoff

#

probably worth trying both a connected takeoff and killing the client before takeoff

austere stirrup
#

@north kraken it has been done

CullFactory 2.0.1

Fixed

  • A rare exception that would occur on some seeds with long sightlines through many tiles
minor nymph
#
Stack trace:
CullFactory.Behaviours.CullingMethods.CullingMethod.RestoreShadowDistanceFading () (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:449)
CullFactory.Behaviours.CullingMethods.CullingMethod.OnDisable () (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:386)
UnityEngine.Object:DestroyImmediate(Object)
CullFactory.Behaviours.CullingMethods.CullingMethod:Initialize() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:91)
CullFactory.Data.DungeonCullingInfo:RefreshCullingInfo() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Data/DungeonCullingInfo.cs:46)
CullFactory.Extenders.LevelGenerationExtender:OnLevelGenerated() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Extenders/LevelGenerationExtender.cs:44)
RoundManager:DMD<RoundManager::SetLevelObjectVariables>(RoundManager)
RoundManager:DMD<RoundManager::FinishGeneratingNewLevelClientRpc>(RoundManager)
RoundManager:__rpc_handler_2729232387(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
RoundManager:DMD<RoundManager::FinishGeneratingNewLevelClientRpc>(RoundManager)
<LoadNewLevelWait>d__133:DMD<RoundManager+<LoadNewLevelWait>d__133::MoveNext>(<LoadNewLevelWait>d__133)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)``` this was on dine v73
minor nymph
#

It seems like it only logs this error when generating a mineshaft interior.

#

vow happens the samething

north kraken
#

Did Mineshaft get changed in v73?

#

🤔

austere stirrup
#

can I get a seed and profile please

#

I have a suspicion though

minor nymph
#

I tested again with just this modpack, and the same error logs only when a mineshaft interior generates.

deep sigil
#
[Info   :CullFactory] Generation has completed with seed 51189474.
[Info   :CullFactory] Preparing tile information for Level1Flow took 10.351ms
[Error  : Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array.
Stack trace:
CullFactory.Behaviours.CullingMethods.CullingMethod.RestoreShadowDistanceFading () (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:449)
CullFactory.Behaviours.CullingMethods.CullingMethod.OnDisable () (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:386)
UnityEngine.Object:DestroyImmediate(Object)
CullFactory.Behaviours.CullingMethods.CullingMethod:Initialize() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:91)
CullFactory.Data.DungeonCullingInfo:RefreshCullingInfo() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Data/DungeonCullingInfo.cs:46)
CullFactory.Extenders.LevelGenerationExtender:OnLevelGenerated() (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Extenders/LevelGenerationExtender.cs:44)
RoundManager:DMD<RoundManager::SetLevelObjectVariables>(RoundManager)
RoundManager:DMD<RoundManager::FinishGeneratingNewLevelClientRpc>(RoundManager)
RoundManager:__rpc_handler_2729232387(NetworkBehaviour, FastBufferReader, __RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle(NetworkContext&, RpcMetadata&, FastBufferReader&, __RpcParams&)
Unity.Netcode.ClientRpcMessage:Handle(NetworkContext&)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc(FastBufferWriter&, UInt32, ClientRpcParams, RpcDelivery)
RoundManager:DMD<RoundManager::FinishGeneratingNewLevelClientRpc>(RoundManager)
<LoadNewLevelWait>d__133:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

[Warning:LethalPerformance] GrabbableObject search called with inactive objects, probably will cause incompatibility!
#

I got this error too.

north kraken
#

@austere stirrup It looks like CullFactory is gonna need an update

austere stirrup
#

indeed

tulip wave
#

It seems like the same problem I had with sellbodies. Just use the netcodepatcher and pass it the correct Unity version as a parameter.

austere stirrup
#

this has nothing to do with rpcs

#

I already have an idea of what to do to fix it, I just needed time to test it

austere stirrup
#

2.0.2

Fixed

  • An exception that would occur on v73 when landing on certain seeds
clear kiln
austere stirrup
#

oh

#

lol

#

nope

#

I knew that would happen someday, I wish I could specify it in the manifest

clear kiln
#

surprised no one reported this for 2 hours

austere stirrup
#

idk I guess people were waiting for it to show up on their manager of choice probably

#

uploaded it to the right place

#

thanks for letting me know btw

#

I was too absorbed in fixing PathfindingLib to notice

minor nymph
#

Failed to find the call to begin dungeon generation in RoundManager

#

one of this mods are making cullfactory log this error

austere stirrup
#

oh huh

#

it'll still work I believe, but I'll look into that

#

probably LLL tbh

austere stirrup
#

fixed it in 2.0.3

upper gull
#

i feel like i should mention it here too, culling works terribly with midnight sanctuary, but idk how to disable it cuz i need the dun gen name

visual agate
#

With imperium you can determine which map is generated and in the field to determine it the name you need here would be shown so maybe try that

upper gull
#

mkay

#

thanks for the advice ill go try

#

its called outdoorflow wtf

#

crazy cuz the name of the interior is SanctuaryFlow

clear kiln
#

theres two internal names ig

#

i didnt know cullfactory was referring to the one thats harder to find for normal people

#

im not surprised theres two internal names though cause items and monsters also have this

upper gull
#

like ughhh

#

i wish it was mornal

clear kiln
#

i like the maneaters internal names

#

"Maneater", "Large axle", and "CaveDwellerBaby"

upper gull
#

?whyd i smell normla like theat

#

wtf sorry i am being harrassed by cat

upper gull
visual agate
clear kiln
#

zeekerss copy pasted the large axle internal stuff to create all the new items of v60

#

including the maneater

#

thats also why all of them were conductive in the first v60 beta

#

and why toilet paper was still for a while

upper gull
#

lmao

steady bane
#

Maneater is a large axle?????!!?!?!

hardy stratus
austere stirrup
remote crystal
#

there seems to be issues with slope tiles in mineshafts sometimes. every now an then when running next to the wall in those tiles the interior around gets culled due to cullfactory thinking you're on a different tile, in the case of this seed the tile below. i hadn't seen these issues until v2.0 release. example seed: 31508785 slope tile next to fire

austere stirrup
#

oh interesting, I've never noticed this either

#

do you have a profile code for that run so I can try to repro?

#

I'm guessing brutal company may affect the interior RNG

remote crystal
austere stirrup
#

ah ok, nice, will check it out in a bit here then

#

wait, I forgot to ask which moon this was oopsie

#

although if it just always happens in this tile then it might not matter

#

hmm, first seed I found a slope on it didn't happen, so maybe not

remote crystal
austere stirrup
#

oh god

#

it's scaled tiles again

#

zeekerss why

remote crystal
#

uh oh MONKA

remote crystal
#

@austere stirrup any news on fixing the issue?

austere stirrup
#

I didn't have a chance to look at it over the last few weekends, but I'll see if I can come up with a fix now

#

it's mostly time consuming because I have to go back and test the other mods that were affected by this

austere stirrup
#

just as I suspected, fixing the vanilla case breaks the mod case

#

fun

quasi sphinx
#

For some reason my modded moon is being culled but its just the vanilla interior. The uh...whats it called Factory

quasi sphinx
#

@austere stirrup

#

Just wanted to uh

#

Ping ya

#

sorry

weak moth
#

interesting

ripe pelican
#

interesting

quasi sphinx
#

What

steady bane
#

What

austere stirrup
#

interesting

jovial hearth
#

is today zaggy-friday? zaggy-appreciation day Givelove

austere stirrup
#

@quasi sphinx are you doing anything funky like rotating the dungeon root?

quasi sphinx
#

I didnt even touch the dungeon root

#

Unless

#

I think I lowered it

#

Is that a problem?

austere stirrup
#

translating it shouldn't cause any issues theoretically

#

unless there's two dungeons

quasi sphinx
#

Hmm.

austere stirrup
#

er

quasi sphinx
#

Thats local btw

austere stirrup
#

that doesn't look axis-aligned

quasi sphinx
#

Does that matter?

austere stirrup
#

what's the rotation?

quasi sphinx
#

NOT 0

#

Should I just copy paste another dungeon root

austere stirrup
#

no that is fine

quasi sphinx
#

Oh

austere stirrup
#

but it could be a parent of this transform that's the issue

#

you gotta go all the way up the hierarchy and check everything

quasi sphinx
austere stirrup
#

what about the parent of LevelGeneration?

quasi sphinx
#

Systems?

austere stirrup
#

ya

quasi sphinx
austere stirrup
#

ah there you go

quasi sphinx
#

?

austere stirrup
#

rotation y is not a multiple of 90

#

your dungeon is not axis-aligned

quasi sphinx
#

How would I fix it?

#

THis is my first time making a proper moon

austere stirrup
#

if you don't have anything that depends on that rotation, you can just 0 out the y axis

#

systems generally doesn't contain anything visual except the eventual generated dungeon afaik

quasi sphinx
#

Just Itemdropship

#

But I can move it back

austere stirrup
#

ah, if you want to fix up the dropship you can copy the world transform in the ... menu in the top right of Transform, then paste it back after

#

but that should do, yeah

quasi sphinx
#

Dont worry I just moved it back

#

Thanks a ton!

#

Lemme test it rq!

austere stirrup
#

hopefully that's all it takes

austere stirrup
#

ahh, sorry I haven't gotten back to this, I've been busy so it kept slipping my mind

#

I was trying to see if the author of the school interior would get back to me about the version of DunGen they used, but I haven't heard yet, so I'll probably just have to block culling there and hope that everyone else is using the right one

#

unfortunately even if I found out the version that broke this, I likely wouldn't be able to check for it, since DunGen doesn't save a version number to the assets sad

austere stirrup
#

2.0.4

Fixed

  • Occasional culling issues in the sloped tile in the mineshaft interior

hopefully nothing else breaks by changing this 🤞

orchid jetty
#

has anybody run into issues with this in v80

#

just out of curiosity

#

like... i assume this is gonna need a manual update to disable dungen's built-in culling right

#

to avoid weird conflicts

#

or at least clean up rooms disappearing at the end of long hallways (like how cavern tiles have their LOD groups patched)

ripe crane
#

unless it just happens to overlap nicely in functionality

#

would be nice

austere stirrup
#

if they're fighting over visibility, then both get confused about what is visible and what isn't

austere stirrup
#

gonna take some fiddling

#

but yeah, I'm definitely going to be disabling the vanilla culling, at least if CullFactory is enabled

#

possibly just always, since it's nice to be able to disable culling via the mod options, and CullFactory's depth culling is basically a more advanced version of the vanilla culling (by nature of checking for overlapping renderers from adjacent tiles, and light influences, etc)

austere stirrup
#

new DunGen seems to have fixed the stupid tile scaling issue thank god

#

I've got CullFactory working in the new version mostly, I just have to figure out how to disable the vanilla culling without changing behavior, because apparently Zeekerss made it so that some enemy depends on the culler's current tile (which is a public field instead of a property so I can't patch it yip)

austere stirrup
#

If anyone wants to give an updated CullFactory a test lemme know, I don't wanna push it out there untested but I don't have a ton of time for testing myself

#

should be good to go, but I'd rather have confirmation from a not-10-minute smoke test

#

(I'll have to DM the build since we're not supposed to toss around assemblies in the server 😅)

#

I'm especially interested to hear if it works well on custom interiors, since this update introduced yet another method of calculating tile bounds, so I've had to use a heuristic to determine which bounds calculation to use

orchid jetty
#

if you send it to me i'll try it next time i get the opportunity to play

austere stirrup
#

done

#

currently it disables vanilla culling entirely (no option to re-enable), but I may look into making that dynamic at some point, it seems it may be easier than I initially thought

#

main reason I'd do that is to compare performance between our version of depth culling and vanilla's, but it doesn't hurt to have vanilla as a fallback

north kraken
#

V80 finally hit Main branch it seems btw

austere stirrup
#

oh my

#

well I'll be lookin at updating other mods tomorrer

#

won't have too much time, so the number of updated mods depends on how hairy things are

orchid jetty
#

im not sure if this is a new issue with the v81 update, or if it's also maybe a mod conflict, but i did notice this weird issue where walking against a pillar on the stair tile lets me see through some walls

#

cramming my back against this pillar, facing forward, then slowly walking left/right causes it to happen

#

this is seed 51335969 on Rend

#

player position 8.0682 -233.542 5.765, rotation 0 89.3389 0

#

when i get a sec i'll try on a profile with less mods just to see

#

also causes funky flickering with the flashlight when rotating the camera

austere stirrup
#

hmm, hopefully not an issue with my tile bounds heuristic, lemme see if I can repro

#

ah, got it

#

this is something I've noticed very occasionally before as well, I think it must be some floating point error somewhere

#

lemme see if I can find a fix

#

I suspect the solution is probably just to fix the bounding edges with doors on them after calculating world bounds

narrow bone
#

me hoping its the most difficult, most eggregious error in the history of mod errors

austere stirrup
#

this guy

#

yeah that seems to have helped

#

I'm gonna push out the update in a moment with that fix

#

2.0.5

Fixed

  • Compatibility with v80+ (vanilla culling will be disabled)
  • Culling issues on interiors that were created on a different DunGen version due to bounds calculation changing over time
  • Standing in a doorway between tiles causing a room to disappear on rare occasions
#

available on Thunderstore Soon™

narrow bone
#

damnit

oak plover
#

How's CullFactory these days vs the new Vanilla 80+ system? just generally better to use CullFactory?

gaunt herald
austere stirrup
#

vanilla culling is essentially the same as depth culling in CullFactory

#

using portal occlusion culling means that you can see rooms from farther away, and it'll often be able to cull more

#

also worth noting that vanilla culling doesn't cull lights yet, though not sure how much that matters

#

it really depends on what the render distance of lights is

orchid jetty
#

personally i will still be using it but you don't need it so much anymore

orchid jetty
#

i appreciate the option to disable culling completely

#

imperium freecam is so annoying to use now with vanilla's culling 😅

#

idk if you'd like to add specific compatibility for that case (or if that's something giosuel needs to do on his side?) but ideally culling for first person and no culling for freecam would be awesome

austere stirrup
#

Imperium had compatibility for it before, but the Thunderstore NuGet source was having trouble so it's gone for now

#

or I believe it did? dunno if it was shipped

remote crystal
#

@austere stirrup I'm seeing reports that CullFactory disables cadaver growths from infecting players

winter robin
tacit fulcrum
#

W

winter robin
#

Ok I believe I found the issue

#

In OnOcclusionCullerPositionChanged you are trying to populate culler.currentTile by doing:

        if (culler.currentTile == null)
            culler.currentTile = culler.FindCurrentTile();
    protected Tile FindCurrentTile()
    {
        foreach (Tile allTile in allTiles)
        {
            if (!(allTile == null) && allTile.Bounds.Contains(targetTransform.position))
            {
                return allTile;
            }
        }
        return null;
    }

this only works if allTiles is populated, but that is never the case because the culler is disabled by another patch which removes the OnDungeonGenerationComplete event callback that would call AdjacentRoomCullingModified::AddDungeon to initialize and populate that list

So StartOfRound.Instance.occlusionCuller.currentTile is always null, causing an early return in CadaverGrowthAI::InfectPlayers()

#

A possible fix could be to invoke AdjacentRoomCullingModified::OnEnable() manually after disabling it

#

I don't think the culler is disabled anywhere in the game so at least in vanilla it should work

austere stirrup
#

ah, right

#

I'll have to check to make sure, but I should be able to make it use my own tile information instead

#

I'll get to that later today

orchid jetty
#

i thought imperium update made this happen and never looked into it with more detail

austere stirrup
#

2.0.6

Fixed

  • Cadaver growths being unable to infect players

Changed

  • Optimized some parts of the portal occlusion culling algorithm
#

optimizations are very minor, I don't expect to really see much change in performance

#

perhaps though

minor nymph
#
Stack trace:
CullFactory.Data.GrabbableObjectContents.CalculateBounds () (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Data/GrabbableObjectContents.cs:28)
CullFactory.Behaviours.CullingMethods.CullingMethod.DoCulling (System.Collections.Generic.List`1[T] cameras) (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:300)
CullFactory.Behaviours.CullingMethods.CullingMethod.DoCullingScriptableRenderPipeline (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Behaviours/CullingMethods/CullingMethod.cs:251)
UnityEngine.Rendering.RenderPipelineManager.BeginContextRendering (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <c39a522eee05469b8171a6cfeb646c59>:IL_000A)
UnityEngine.Rendering.RenderPipeline.BeginContextRendering (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <c39a522eee05469b8171a6cfeb646c59>:IL_0001)
(wrapper dynamic-method) UnityEngine.Rendering.HighDefinition.HDRenderPipeline.DMD<UnityEngine.Rendering.HighDefinition.HDRenderPipeline::Render>(UnityEngine.Rendering.HighDefinition.HDRenderPipeline,UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <c39a522eee05469b8171a6cfeb646c59>:IL_001C)
UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) (at <c39a522eee05469b8171a6cfeb646c59>:IL_0046)
``` log spam this error here
austere stirrup
#

oh what the hell

#

will fix when I get home, kinda looks like I goofed rebuilding it

minor nymph
#

its when I open a door with a key

gaunt herald
austere stirrup
primal musk
#

@austere stirrup There is a severe and annoying error with CullFactory that occurs when landing/taking off the ship; resulting in the player being temporarily frozen, and the console/log file getting bloated with errors being spammed every millisecond

primal musk
#

Didn't notice this acknowledgement until now

hoary steeple
#

Hiii, is CullFactory still useful in v80/v81? I see that some modpacks are removing it because they say the vanilla culling is better, but others, like Starter Pack, are keeping it.

minor nymph
#

its better than vanilla culling

hoary steeple
#

Tyyy

austere stirrup
#

I'd definitely like to hear if there are actual reasons why people say that vanilla culling is better

#

vanilla culling is very rudimentary, and I'm not sure if it culls lights yet anyway

steady bane
#

ive never heard that before

austere stirrup
#

yeah

#

tbf, I don't imagine most people are aware of the difference, so I suspect a lot of that is coming from second/third hand talk about how vanilla got culling and that broken telephone'd into "vanilla better"

#

but if there are actual reasons, then sounds like something I should look into

orchid jetty
#

does cullfactory patch item rendering on the bodycams at all

#

ive noticed when people are carrying like, apparatus and stuff, i can see them glowing on the bodycam and doing the carry pose but there's nothing in their hands

#

i was wondering if you knew, top of your head, if cullfactory might be impacting that

#

next chance i get i was gonna test it in a profile with fewer mods and see if it's vanilla

austere stirrup
#

it could, but I would suspect that is more likely down to LoD?

#

if you can see an item in a player's hand when you go inside, you should also see it when you're looking at it through the body cam, at least from CullFactory's perspective

#

I suppose it could also be layer mask, that's probably more likely

#

the low res cams probably don't include PhysicsProps

orchid jetty
#

yeah if it's not cull factory i was thinking the vanilla camera might just be missing that layer

#

good you mention LOD though

#

that might mean lethal sponge's LOD setting is messing with them (iirc, by default, lethal sponge sets items to cull from a certain distance)

#

i didnt think of that yet

austere stirrup
#

ahh, yeah, that definitely seems like it would do it

#

it's been a bit since i looked at LOD groups, but I'm sure that the culled LOD would be the one it would select

#

not only based on resolution, though that is a factor, but because zeekerss has all the ship cameras set to use the lowest quality always

minor nymph
#

So is it better to turn off LODs in lethalsponge? And I noticed only dog teeth show in the external camera.

minor nymph
austere stirrup
#

LODs on items aren't really useful with CullFactory, at least not unless you have a ton of items spread all over the moon

#

CullFactory culls items in the interior based on visibility

#

it also culls every item on the surface while inside and vice versa

minor nymph
#

Talking about bodycam, the bodycam doesn't appear in the view command with tworadarmap installed.

orchid jetty
#

bottles and most of dine's scrap have lods

#

and probably express this bug

#

lethalsponge just adds lods to the items which dont already have them

#

is there some simple way to toggle lod culling off entirely for a specific camera? similar to how cullfactory always draws lods unculled

#

or is that more of an intricate process

austere stirrup
austere stirrup
#

I made CullFactory iterate all the LOD groups to remove ones that have no renderers iirc

last venture
#

when not specific camera, remove tag 9

#

I have no idea if this would actually work, but it is certainly an idea

#

this would also break any tiles that were manually tagged with 9 to prevent culling unless you cache every tile you add/remove the tag from but

#

idk it's an idea I had

austere stirrup
#

wait, what's tag 9?

last venture
#

at least with the vanilla culling

austere stirrup
#

oh right gotcha

#

the issue is LODGroups having culling levels withouth any objects, so it's not affected by that

gaunt herald
#

how viable would this be

orchid jetty
#

well unless the fog color matches the camera "background", this would create noticeable holes in the world

austere stirrup
#

not sure if I see the point, at least if your idea is that it'll help with performance

#

once you get things limited down to the possibly visible set with portal occlusion culling, there's not a lot of headroom left

#

I would expect less than 5% difference tbh

agile falcon
#

I noticed that Wesley's Interiors Greenhouse the culling is abit aggressive, if you use a jetpack inside the place falls apart.

#

Same for Midnight Sanctuary

austere stirrup
#

hmm, I'll have a look

#

I think wesley should have an idea of what needs to be done for that but if it turns out to be unfixable I can add an override

#

wait, what's Midnight Sanctuary? I don't see it in WesleysInteriors description

austere stirrup
#

I see

#

ah yeah greenhouse's tile bounds are just way shorter than the wide open tiles

steady bane
#

I would never have expected someone to use jetpack inside them, specially midnight, i thought it had an antijetpack thingy lol hehe

austere stirrup
#

looks kinda like they were sized to the enclosed tiles

#

if wesley is planning on updating soon then I'd bring it up to him, otherwise I can add this to the blacklist

#

I can't check midnight sanctuary rn but probably a similar situation if the symptoms are the same

#

it's an easy fix if you bring it up to the author

#

(it's also worth noting that vanilla depends on the same sort of bounds check now, so this issue would occur with or without CullFactory)

tired wolf
#

Not sure why but using Cullfactory on my moon (unreleased) was causing the Dungen to not load

austere stirrup
#

I haven't heard anyone else mention something like that, but I assume you mean that it goes away after disabling it?

#

any errors in the log? and does it happen with only the two?

tired wolf
austere stirrup
#

Noticed a little buggy boo while working on Black Mesa

2.0.8

Fixed

  • Fully-shadowed lights not being culled without "Disable shadow distance fading" enabled
austere stirrup
#

2.0.9

Added

  • A debug option to display a visualization of the visibility testing

Fixed

  • The view through ImmersiveEntrance's portals hiding some rooms
limber geode
#

Is there a good way to find the dungeon flow names?

#

I'm trying to disable culling on Mel's Mausoleum interior since some of the new tiles are a little jank with Cullfactory rn

pine palm
limber geode
#

Huh

#

I can't get it to work with that name

#

maybe I need to turn something else off lol

scenic goblet
# limber geode Is there a good way to find the dungeon flow names?

This is the solution I came up with for getting interior names

internal static class InteriorHelper
{
    private static readonly Dictionary<string, string> _dungeonFlowToReadableNames = [];

    static InteriorHelper()
    {
        _dungeonFlowToReadableNames.TryAdd("Level1Flow", "Facility");
        _dungeonFlowToReadableNames.TryAdd("Level2Flow", "Mansion");
        _dungeonFlowToReadableNames.TryAdd("Level3Flow", "Mineshaft");
    }

    public static string GetCurrentInteriorName()
    {
        return GetInteriorName(GetCurrentDungeonFlow());
    }

    public static string GetInteriorName(DungeonFlow dungeonFlow)
    {
        if (dungeonFlow == null)
            return "DungeonFlow is null";

        foreach (var kvp in _dungeonFlowToReadableNames)
        {
            if (dungeonFlow.name.StartsWith(kvp.Key, StringComparison.OrdinalIgnoreCase))
            {
                return kvp.Value;
            }
        }

        return dungeonFlow.name;
    }

    private static DungeonFlow GetCurrentDungeonFlow()
    {
        if (RoundManager.Instance == null)
            return null;

        int index = RoundManager.Instance.currentDungeonType;
        return RoundManager.Instance.dungeonFlowTypes[index].dungeonFlow;
    }
}
limber geode
#

Wo

#

Neato

austere stirrup
#

CullFactory prints the flow name to the logs during generation, so you can use that to find it

#

if you search "with flow" you should find it

scenic goblet
ripe pelican
#

Probably easiest for them to just install Lunar Config and grab the flows from there

sturdy spear
#

@austere stirrup Let's say theoretically, I wanted to add a mechanic where objects would switch between real and fake renderers. For example, the wall with a door would switch to a wall with no door. This is purely visual and no colliders are changed.

#

For this to work with Cull Factory, how should I setup my renderers? Am I allowed to add renderers to your system after the setup for example? I'm fine with a one-time cost when I need to call this

austere stirrup
#

well if the collider and the renderer bounds are the same, the absolute simplest way to do this is to swap the mesh out on the MeshFilter

#

that would work without CullFactory even knowing anything

#

actually collider isn't even relevant here

#

as long as both meshes are mostly the same shape as far as visibility goes

sturdy spear
#

I thought that initially, but the walls are either one mesh or three meshes

#

And ya I could probably fix that with some mesh merging, but let's say I can't fix that

austere stirrup
#

I had to refresh my memory, but I believe that the tile renderer collections should include inactive ones, so hopefully it should just work to toggle things at runtime without culling getting confused