#Cull Factory: Stops rendering faraway rooms
1 messages Β· Page 7 of 1
i first thought its related to the custom models because they are holding items in a realy janky way but on my other test profile i tried this and it wasnt it
also its weird how its only indoors
and not outside
yeah, I suppose that could have been related, but it does seem a bit more unlikely
oh, didn't you show a video of it happening when you went outside before?
no
the other way around
xd
the thing realy is that cullfactory alone doesnt cause this
and as mentioned yesterday i tried for over an hour combining cullfactory with some of my mods and never got to figuring out what exactly it is
no wait it does happen now on my test profile
my mods are trolling me again
i think its LethalFixes
LethalFixes + Cullfactory
but only these 2 mods doesnt cause it again
but it caused it when i added LethalFixes into my other mods
i just found the most insane cash regi ive ever seen on experimentation
if you have a more limited list of mods that could be helpful
Omg that key is so expensive, why is ur cash register priced at 0 though
yes i do gimme a sec
im just double checking to make sure im not going crazy
now it doesnt do it anymore
if you use a set seed it might be more consistent
CullFactory lets you set it
I get it 100% with that first seed you got in your video
0192578b-5422-52a5-3f94-223e4be67730
it feels so random now tho, on my main profile it happens every day literally but here it seems more random
62347331
i tried using just 1 as seed but it didnt wanna do it there
also it does work with 2 pro flashlights
well its only getting more confusing
it only seems to work with scrap that actualy spawns on that day
ok so
it only happens to things that spawn during that day, if i use a flashlight from the day befor it doesnt do it, if i order new flashlights again it does it again
if i bring in scrap from the day befor it doesnt do it
if i get scrap from that day it does it again
ill give up for today
it was fun playing a little solo without godmode tho lol, usualy i just fly around with hamunii's devtools and godmode when im testing stuff
I have a little bit of a lead on the issue now, it seems as though there's some frame rendering going on before I expect it to
actually, might've been a red herring
I think this may have been right
Would it?
Your video shows the item disappearing while you're holding it
U turn around and it goes invisible while holding it
oh? wait, which timestamp?
the issue I observed was with switching items while wearing a model replacement
I've confirmed that that one is caused by the model replacement just now
17 minutes ish
I think
They were carrying some items in big lootroom
I would try yo find it exactly but I'm in class rn with data
hm, I think I found where you were talking about and it seems to be also the item swapping, from what I could tell anyway
but yeah no worries
Ah okay I must've missed it then
I figured out a fix (that I had hoped I wouldn't have to bring back lol), so I should be able to get an update out in a moment
Looool
Had a thing where I just fell through the map
but the rest of the runs were fine before and past that
if you saw errors from CullFactory, that's the only way it could be caused by this mod
and if that's the case, please provide logs
The whole log? Im not sure where to look out for
I was playing with friends, since cullfactory is client sided, and I went through the fire exit on Offense and after I entered I just started falling
My friends weren't experincing it seems
they were walking around an entirely different factory interior
And host was Vanilla
yeah, it's likely there's an error in there if it's CullFactory
CullFactory shouldn't really cause interior desync, though, so you'll probably have to find the culprit elsewhere unfortunately
were you using loadstone?
Yes
That wouldn't be a loadstone issue, I have a pretty large pack with it and have no issues
It bugs me when I see people still jump to the conclusion of "It must be loadstone!!!"
Ive had a positive experience with loadstone
it doenst break my discord everytime moon loads
and i can get tot titan without crashing
Yeah some people just still seem to assume that loadstone causes this issue, when usually it's moon or interior related I remember when Tolian's moons used to cause this
well the host is vanilla im using some client sided stuff
That could be why
since me and my friends might play soon i will send the log
One of your mods may not be properly client sided
Also the host should also be using Loadstone
bound to be issues if you have it and noone else does
it might tho
there used to be a bug where if the host wasn't using loadstone
your seed would eventually desync from theirs
Ye I had just said this
Lol
.
sorry, i didn't see it before
The mod page even says everyone should be using it
It warns about it
So in this case it's purely user error
it's only tagged as "client-side" on thunderstore tho
it is but this is why you also read the description, I think it only desyncs if you use AsyncDungeon if noone else has it
Here is funny log
when are you gonna update cullfactory for the invisible items btw
huh.. I actually tried to upload it and thought it would be up by now
I'll upload again later today
After playing on 1.4.1 for a few hours with my group I don't seem to be getting invisible items at all, other than piggy's revolver, so that's an improvement
i dont think 1.4.1 even was the fix
it wasn't the fix for the model replacements, no
@jovial hearth the update should be available soon if it worked properly this time, let me know if you don't see it after a couple hours
it's appearing on the versions page on the store at least
@austere stirrup Now there seems to be a new issue lol. Its easilly fixable in game. When going outside all items you are holding will be visable in your hands. By scrolling through all items it seems to fix it. Lot better than the invisible issue at least lol.
i havent payed any attention to that today but i havent noticed this atleast
ill check in a moment if i have it too
I think it happened more on Seichi after the Cullfactory update.
mh i dont even have that moon
on vanilla moons i dont have the issue atleast
interesting, that doesn't sound like a CullFactory issue unless you've got errors in your logs at the moment you leave the interior
CullFactory controls item visibility independently of how they are hidden when they are in the player inventory
its on custom moons I believe.
It started happening after cull factory updated.
the invisible item bug stops but now that happens. I'll try to look for errors.
and it was only CullFactory that updated?
if it happens consistently when you leave the interior on any particular moons, I can try a repro on your code
01926464-e071-8336-aa02-d09cf45f8015
Yeah I believe it was just cull factory update.
Ah, also had this happen a few times
Is CullFactory even really necessary anymore? After all the bugs and issues as of late I'm tempted to remove it π¦ mods constantly being broken gives me some burn out
it's only necessary if you have issues with performance, I'm not going to tell you that you have to keep it
by saying this, are you also saying that you're encountering the same issue they mention above?
From time to time yeah
It happens with ShipInventory sometimes, I notice items that pop out of it are invisible
I've also seen the Maneater be invisible if it escapes with EnemyEscape
I thought that might have been an EnemyEscape issue but doesn't it register as scrap while a baby?
So could be CullFactory
I'm just a lil frustrated cus I actually really love this mod, just hate seeing it so buggy as of late lol
yeah, that's understandable
if this isn't a simple fix I'll start that experimental version on Thunderstore, otherwise I'll do it next thing
I've been quite distracted from my mods lately working on Black Mesa
Zaggy were you able to reproduce that issue?
Is it related to just seichi? I wasn't able to on Wesley's moons
haven't had a chance to look due to a bug in another mod, I'm about to look now
got repro with your pack, it doesn't happen with my testing profile
0192655c-6201-16e6-d8c9-4e0263bba96e As a test does it repro with mine? I haven't been to Seichi to test I just know I've seen scraps pop out of the ShipInventory chute as invisible sometimes
oh, I haven't looked at ShipInventory, hopefully they're not doing something weird with items...
I'm gonna stick with the profile with repro for now, but I was able to repro just going to Ass and grabbing 4 scrap
I don't think it's dependent on moon or anything
my guess would be someone is calling EnableItemMeshes() when the player leaves the interior
Probably cus I've not had issues on Assurance with my pack
(as I mentioned before, CullFactory does not use this method, so it doesn't affect whether the meshes are enabled through that)
So it's a different mod interference with cull factory?
@austere stirrup
Or is it just something else entirely?
I believe it's unrelated
I'll investigate further in a bit, but I don't see anything in the log that indicates that this hsould be happening
at MonoMod.Utils.DynamicMethodDefinition.NativeDetour_Wrapper<UnityEngine.Renderer::set_enabled>?9 (UnityEngine.Renderer , System.Boolean ) [0x00000] in <6733e342b5b549bba815373898724469>:IL_0000
at MysteryDice.Patches.EntranceTeleportPatch.FixRenderer () [0x00000] in <67407ba05a354e039a426673291587ef>:IL_0000
perhaps it is this
Ah so it's from Emergency Dice
@sharp surge which version of Emergency Dice are you using?
og or Updated?
Son of a.....I thought he fixed that. I use the updated version and have thought he got that fixed.
See if the og one works fine
I'll test with it disabled.
@quaint raven
Your dice be breaking again.
Goodness xD
Oh well now that cull factory is fixed I probably don't need the method in mine, it was just a workaround I had done until things were patched
I will push an update and see if that fixes it
π perfect!!!! Sorry Zaggy for blaming Cull Factory π
oh god
that was a workaround for CullFactory?? it wouldn't have even done anything lol
and.... it looks like the offending function was in your mod before anything broke in CullFactory?
I added it a week or so ago to fix some weird rendering issue with the dice, I am not 100% sure what caused it tbh
interesting 
github doesn't seem to be up to date so I had to go into decomp to find the function, but it looks like it goes back all the way to the 2nd at the latest
CullFactory updated on the 3rd
I keep forgetting to push my changes to github lol
It feels so bad to poke zaggy like every 2 days for some cull factory issue lol
Especially because it works so well in vanilla and it's just other mods that cause issues
Zaggy is really good about doing things the right way so I'm not surprised it's never his fault lol
oh it definitely is sometimes lol
but this time the description of the issue made it fairly clear to me that it wouldn't be
I feel like cull factory is just a very fragile mod that gets broken easily and very noticable
when it comes to the item stuff, yeah
mostly because items aren't designed to be tracked like CullFactory does
there's way too many variables with all the mods out there
it's reliable when mods work as expected though, which I wasn't entirely sure could be the case, so I'm not too bothered
once I set up the experimental, hopefully pre-testing releases will prevent me from breaking things so often
just today, i started noticing sunlight pouring in through the ceilings of dungeon interiors, but sometimes only partway through a day and not consistently. could cullfactory be doing that, or do you think its something else?
Have you tried playing with cull factory disabled?
cull factory should be preventing that from happening
usually that would be an issue with the moon or interior, since if their entrance teleports are misconfigured the game stops knowing whether the player is inside
no, this was just an observation from a long session yesterday, and i havent had time yet to run any solo missions without it to test
ok, i'll try to test later to see if it was just specific moons, or if it was everywhere, and also if i still see it with cf disabled
CullFactory has now become an approved mod for competitive high quota runs. 
Found an issue with @eager stag's Shopping Cart.
If you have items with the Shopping cart (and I assume the other scrap storage mods) and you leave the facility, all the items that are inside the shopping cart will disappear until the items inside are dropped
oh? is that something like a speedrunning community with rules and a leaderboard? π sounds cool
Ah, not surprising. They should be able to call GrabbableObject.EnableItemMeshes(true) to get CullFactory to refresh their locations, then it will work fine
(note that calling the vanilla method itself does nothing to CullFactory's item culling, but it activates a hook in CullFactory to update its information)
It's basically a competitive high score community, trying to reach the highest quota in various settings. For speedruns, this mod has been allowed for a while already.
https://highquotahq.com/leaderboards-hq/ high quota leaderboards for more context
that's really cool! I'll have to check out some information about these, it's pretty intriguing
So dropping/switching it and/or drop all its items inside at once.
What do I need to do to include through the entrance that isn't Update()?
not sure what you mean, but what I'm suggesting is just that you loop over every item in the shopping cart when it teleports in/out of the interior and call EnableItemMeshes on them
without that, CullFactory (probably) doesn't really have any way to know that you've teleported them
So patching EntranceTeleport.TeleportPlayerClientRpc, check if container and do that.
While also fixing the problem with items depositted not being considered inside/outside correclty.
yeah, that would probably do it
Cool.
if you want to have a look at the hooks CullFactory uses for items, since they may be relevant to keeping your items' flags up to date too, here they are:
https://github.com/2394425147/LC_CullFactory/blob/master/CullFactory/Extenders/GrabbableObjectExtender.cs
https://github.com/2394425147/LC_CullFactory/blob/master/CullFactory/Extenders/TeleportExtender.cs
It's done then.
if enemies can carry the item, then you may want to also hook SetEnemyOutside and check if the enemy is holding your item via parentObject.GetComponentInParent<EnemyAI>()
great to know both mods are getting a compat :]
I really stopped caring about enemies when baboons don't really care whether its grababble or not.
huh, I didn't realize that was the case, that sucks
Hmm, still makes them invisible.
Oh no, hold on.
There was a typo.
It has been a while since I transpiled arrays in.
Yeah, it works now.
nice, glad to hear it!
They don't care about grabbableToEnemies?
Back when I was testing cull factory compat for the exact same problem, I accidently tested the profile without cullfactory 3 times in a row
oh even better, I missed that flag so I thought you were only referring to grabbable
Fun
that's ridiculous lmao
I was setting the container back on instead of whats inside
Lool
Plus there's two teleport methods.
while I have two developers here, I'd be interested to hear if the Developer Information section I added to the readme here is comprehensible enough
I added some info about the item culling there
although come to think of it, I didn't really make it clear what the paragraphs are trying to address lol
at least not when you're glancing at the first sentence
When you mean teleporting.
You mean both teleporter and entrance or just teleporter?
It seems only teleporter.
I mean the entrance teleporter mainly, but my hooks catch the ship's teleporter as well
I'll add that to the bullet point
Well
I guess it doesn't specify it includes having items carry other items.
But I assume it works with the belt.
it does, because the belt disables/enables item physics when moving items in and out
(covered by the "Dropped" bullet point)
Yeah, I can't do that if I want people be able to remove stuff from it.
I didn't think disabling item physics prevented the items from being picked up, does it?
Last I checked, it did.
I could be wrong.
I do remember some mesh shenanigans
Not sure if it toggled off colliders.
it does toggle colliders, but it's not supposed to do so for the interact trigger
what I meant is that it only disables them if they're not tagged as interact triggers
but it doesn't solve the teleporting problem anyway, so no big deal
physics regions or whatever else you may be using is also totally fine I'm sure
Parenting works, yeah
Very minor update going out to prevent culling issues on UT99 CIDOM Metro
(CullFactory will now default to using tile-sized portals on that interior to prevent tile visibility issues)

@north kraken @sharp surge I was being nosy searching to see if anyone was posting recently about CullFactory issues and noticed you two discussed some item culling issues, would either of you be able to provide clips of those if they continue to happen?
I wasn't aware that there were still issues, especially if they occur when moving in/out of the interior through normal means
It was with items in the shopping cart. I had to remove the cart though due to an odd bug with it.
ahh, I see, then that should be resolved soon hopefully
thankfully someone notified me of that yesterday
or I guess it may have been as a result of observing the issue in your pack, come to think of it, they were in your conversation lol
but I hope that I haven't put anyone off of reporting such issues, I want to make sure that using CullFactory is indistinguishable from vanilla wherever possible
@austere stirrup you said when you use your light check you check for if they're inside tiles or under a certain y value?
because i have a hazard that, while very rarely is outside the interior's bounds (cuz i reposition it to be somewhat central in a room), has a small chance of doing that and it contains lights and a lot of visual effect stuff
it doesn't care about y value
if the light doesn't cast shadows, it should be made visible any frame that it influences a visible tile
if it does cast shadows and it doesn't pass through occluders, it will be considered to be within the tile that it is within the exact bounds of, otherwise it will fall back to checking against the bounds that encompass all the renderers within each tile with an arbitrary range limit (to allow the mineshaft entrance to work). when it determines the tile to start from, the light will be visible if that light has line of sight from that tile to a visible tile.
hopefully that answers whether you're good with your effects, but lemme know if you foresee issues
Figured I should let you know that earlier a landmine was exploded but not for the client, I would assume this is a bug with the CullFactory update? I also saw no errors in either logs
nah, mines aren't affected by CullFactory at all
if you use UnityExplorer freecam with culling enabled, you'll see mines blinking in empty space
What would cause them to desync like that then?
not sure, that seems very odd
I assume you mean that the host (you?) set it off, and a client could still see the mine in the world?
did they try stepping on it? lol
oh, you mean fair hazards mod or whatever it is?
Don't have that
how it blow up to locker then
I think the Locker can just set them off when it triggers an explosion near them
It did explode a doorway
ohh
sure
that does change things
yeah
explosions triggering mines is completely client-sided, so it's likely that Locker isn't triggering that explosion on all clients
or else it's triggering it at the position of the entity which may be in a different position on different clients
I would tend to say it's a good idea to transmit the coordinates of the spawned explosion to avoid this
im not 100% sure, can i dm you an image of whats happening lol
it doesnt cast shadows, im not 100% sure if its considered a light since its vfx and im not sure how this is gonna be with cullfactory
sure!
if it doesn't cast shadows, it definitely seems like it should be fine, but I'll take a look
@north kraken this issue with LobbyImprovements, is it causing any errors during startup that you can see?
hum
not sure how it could break it, any idea if I can repro this fairly easily in a smaller profile?
if you use UnityExplorer freecam you can see whether the culling is working pretty easily
I'll look in a bit but if you're able to confirm that would be helpful
currently going through like 40 commits in OpenBodyCams for the changelog lol
I would test trying Slaughterhouse with it's dependencies and CullFactory, adding Flicker and putting it gauranteed on there, then adding LobbyImprovements, I got really bad lag before
that went away when I disabled LobbyImprovements
It's a moon by DemonMae yeah
gotcha
Was really good for testing the interior on
well, it'll be a bit until I can test that, so if you're able to confirm those steps work that would be awesome
but I'll check it when I can
Cus Nikki thought the issue may have been light source related
oh? does the moon have a lot of lights or something?
It has some lights outside yeah
But yeah I can no longer repro the issues with performance
run order issue sounds likely though
cus I remember testing disabling CullFactory and the lag was just as bad
uh oh
did you have a seed set? it may be seed-dependent then
gotta remove variables to make sure you're not just getting unlucky when you switch your mods
but if you suspect that CullFactory isn't culling, I would suggest testing with UnityExplorer installed so you can use its freecam
Nah I reprod the lag with LI present every time
I can't repro it anymore after removing it
oh, I see
I had disabled CullFactory while LobbyImprovements was still present and reprod the same lag, which led me to suspect something was causing problems
right, then the easiest way to confirm if it's just CullFactory not working is to use the freecam with LobbyImprovements installed
if it's working, you should only see rooms visible to your player
Can do that with Imperium no?
I think Imperium works for it
Hmmmm, this was with LI
Without
I need the same seed lol
it works for imperium as long as your camera doesn't get too close to a room
does look like culling is working there
it's really hard to tell with the fog though lol
I see some floating doors in the top right, though, I think
discord really compressed it to hell
Yeah it's working, I dunno why it's so laggy if LobbyImprovements is present
so is this reproducible with just the mods you mentioned? I can try to profile it
It should be yes, you'd likely need to make sure MoreCompany is present as well though most likely
I went through disabling so many mods and reenabling them in my pack before I finally isolated LobbyImprovements lol
I'm not asking if it should be, it isn't that hard to test with a fresh profile
I don't want to create a profile, install all those mods, do like 5 runs looking for this lag only to find out that it doesn't occur with that set of mods
it's a waste of my time, when I already have lots of things I have planned already
if you have mods you suspect, and it reproduces 100% of the time, it's pretty easy to determine if a theoretical minimal test case works
for example, I've had a prototype of the HL2 barnacle sitting around in a project just waiting for me to do something with it since I've been working on RuntimeIcons and OpenBodyCams π
I'd really like to get that finished up instead of spending more time going on bug chases
Well I can't really repro this on a small profile so there's definitely something it isn't playing nicely with, I still wonder if it could be one of DiFFoZ's mods potentially
Actually I am stupid
I forgot to put the interior on Flicker
lol
time to test this again
Yeah it won't repro, so some there is some interesting incompat somewhere
fun
Either that, or the issue only compounds in a larger pack
might be good to see if you can profile with dotTrace if pinning down the cause proves difficult still
#1284254300570390570 message
here's where Xu explained it, you will have to download dotTrace and activate a free trial though
I mean the issue is definitely LobbyImprovements from all my tests, I think it's just the issue compounds in a larger pack, and in a smaller pack the performance issues aren't as noticeable
hmm, that definitely could be
still, if it's only occurring when you include that one mod in particular, the profile would tell us where to look for the issue
and not only that, but you can more easily provide information about other performance issues
although obviously for a limited time when it comes to dotTrace, unfortunately
@austere stirrup it is definitely a compounding issue
As downgrading the mod fixes the problem
down to 1.0.4?
oh, 1.0.6 isn't in the changelog
I think he posted the change for that in the mod thread
It fixes an index out of bounds error
gotcha, then it's likely 1.0.5
can't see any version numbers in the git log though so idk where to start
probably gotta take it to him (if you haven't already)
Yeah I told him
I'm just confused tbh
Cuz all I really did in that change was adding support for session tickets (which wouldn't even be used in Lunxara's case noting they tested in singleplayer). Nothing in LI even does anything mid-game (except from stuff on the pause menu but that's not new)
And the rest of the changes were either for the lobby hosting menu or the lobby list so it makes no sense at all π€·ββοΈ
hmm, were you able to repro on your machine at least?
Haven't tried yet, fell asleep and only just woke up lol
mood lol
hopefully you're able to repro, without that it will be incredibly difficult to solve I imagine
Yeah it's a really weird one tbh
are your commits granular and able to build? if you can repro and bisect hopefully that'll make it easier to find the culprit
good luck, perhaps if it comes to it I can help lend an eye later
I can't even reproduce it so now im even more confused π€£
I get a bunch of lag whilst loading into the moon but performance seems normal after it's loaded, just checking with an FPS counter rn
uh oh
well i did a test and i think i worked out the cause
but im actually just confused still
when I disable my MenuManager.Awake postfix (https://github.com/1A3Dev/LC-LobbyImprovements/blob/0a07dae3f5daff35f4fdc5b737b958fdece3452a/source/HostingUI.cs#L19-L341) it seems to fix it... but MenuManager is the main menu so I'm confused
Various improvements to Lethal Company lobbies. Contribute to 1A3Dev/LC-LobbyImprovements development by creating an account on GitHub.
is anything you instantiate there living past the main menu somehow?
that's a lot of code, hard to say what could be causing it π
I wonder if profiling points out exactly which part of something newly instantiated is a problem 
I know it could go into specifics with functions but I havent seen whether it can look into stuff instantiated in said methods
well everything thats instantiated is parented to the existing UI
so logically it shouldn't be living past the main menu
it should see all managed calls afaik
so hopefully that would do it
the fps didn't seem different with/without LI in the lobby and with other interiors so I don't know why it's an issue with that one interior
I think it's a utilization issue, when LI is present it's preventing some things from utilizing the cpu and gpu properly
All I can guess
but that doesnt make sense
cuz of this
I mean from what you've said the issue as a whole doesn't make sense
all that's in the Awake is the UI creation for the main menu
So maybe there's a bug where the main menu stuff is somehow always being rendered?
i already checked if the object existed in-game and it didnt
plus if it did then it'd be an issue for the entire time in the lobby
@austere stirrup So a client had an issue with items they dropped on the Elevator inside of Grand Armory turning invisible for them
Unreproduceable by the host, but I'd assume a CullFactory bug
interesting
that's easy enough to check, but seems likely there's some other factor
Well we had a Bracken that apparently threw a fit and error spammed around the same time so it could have been related, I think Diversity's Bracken AI stuff wasn't happy
if it doesn't cause errors specifically on the methods called when dropping items, I wouldn't have expected that to be a problem, but who knows
can't reproduce the issue in a minimal profile, so perhaps there's other mods factoring in
lemme know if you find anything else out
I assume that the person that dropped it there wasn't using any unusual method of carrying the item?
Nope they shouldn't have been, unless you consider LGU's upgrade for carrying extra 2 handed items to cause it possibly?
I wouldn't think that would be relevant, unless LGU has some real spaghetti code going on
can't say I've ever looked, but I would imagine it just expands the inventory slots
yeah if it uses transpilers it seems likely that it would use a normal method of expanding it
LGU doesn't mess with inventory slots.
ohhh I might've misinterpreted what Lunxara said then
reading it again, I'm guessing that was supposed to mean being able to pocket two-handed items?
I highly doubt that patching the game to allow that would cause any issues in CullFactory
Yeah, it just adds a counter of two-handed to handle wether or not to toggle the two-handed thing on.
While i was trying to fix the Lily-Utilities (one of my mod) incompatibility issues i noticed that regardless if you hold the item and you TP out of the dungeon bounds the item rendering is disabled. could you fix this by adding a check to tell it that, if the item is in a player's inventory, it should still be rendered?
that's not a CullFactory issue really, that probably means you're not teleporting the player the correct way
do you have that code on GitHub?
if you call TeleportPlayer (or something that calls it), CullFactory will know that the player has teleported, otherwise it has no clue and can do nothing to keep track of the items you're teleporting by proxy
making items visible in the hand isn't really a very good solution, as then I have to expand my code to keep track of the player's inventory as well
whether you use that feature or not it doesn't change. It's explained in the screenshot (I fixed the problem myself but I think it would be nice if the fix was implemented by default in CullFactory)
I understand if you only teleport the item, but when you have it in your inventory it seems strange to me that I have to GrabbableObject.EnableItemMeshes(True) in my mod to make it reappear
?? you don't have to call that if you are teleporting the player properly, that's what I was trying to say!
if you show me the code, I can point you in the right direction, but without that, I can only say... that is not something I am interested in implementing
I tried to do it with and without that function, but this didn't change anything
TeleportPlayer() of PlayerControllerB
sorry i replied to the wrong message
it definitely should detect the items' new locations if you use that method, so if you have a build that uses that so that I can test it, I can find out why that would not be working
(without calling EnableItemMeshes() or anything similar)
I don't have it anymore, but I can rewrite the function so that it calls TeleportPlayer() again
this version should be fine
just go in the facility and use the item
seems to work fine for me
every teleport to or from the cloned dungeon refreshes the item and it remains visible
I do have local changes to CullFactory, so I'll have to check the live version, but I don't think they should affect this
ok, regardless if the problem was Culling or mine it doesn't matter too much since I managed to get the same result
yeah fair enough
anywho it's working in the live version too
so either it was a conflict or your code changed from the one you tested that in
just wanted to make sure it wasn't a bug on my side
I should note though, the cloned interior won't be culled, and I'm not sure if there's a way for me to cull it even if I work out multi-dungeon stuff since cloning it doesn't really run any event that I can rely on afaik
In general, the performance impact of cloning the interior shouldn't be too bad unless some mod makes the render distance long enough to actually render it, but for some interiors that have lots of animators (i.e. on lights), it might cause a little bit of extra overhead that would probably be best avoided
I actually had to remove the CullFactory components from the copied dungeon because otherwise it would give a rendering error (the rendering would freeze forever) when you quit and return the main menu or when you left the planet
but as I said before it doesn't make a difference to me because I have already solved all the problems I was having
however I think that the cloned dungeon, being that it is at -5000 -5000 -5000, is not even rendered by default
indeed, it shouldn't be, as I mentioned wrt the render distance/far plane
however, a lot of moon mods like to increase the far plane over what it is in vanilla, in which case it may render
having issues with the CullFactory components makes sense, one way to avoid that would be to clone the interior sooner, since CullFactory waits until all spawning finishes, including items and SpawnSyncedObjects, which I didn't see getting cloned in your mod
I clone the objects when the dungeon is already fully generated, I patched IEnumerator openingDoorsSequence which is the last function that is executed (it is literally the one that starts the doors animation)
indeed, that's probably after CullFactory has initialized
for shure, since the cloned dungeon had the CullFactory components
So noticed that when items spawned with emergency dice Cull Factory makes them invisible until picked up. Ran into it while testing Black Mesa. Would this be Dice problem or Cull problem?
most likely a dice problem, but I would have to check what's going on there
do you have a code and seed convenient? I could see if I can repro
indeed, I know
as I understand it, it only has a chance of spawning an item, so hopefully with a seed it will spawn that item and let me reproduce the problem
makes sense
There is a debug menu that let's you chooses which event to trigger.
It's easy to reproduce
@glass juniper Ive got an compatibility issue for invisible items and CullFactory
Basically i have an item and i want it to be temporary invisible to players when spawning inside the facility with EnableItemMeshes(false). But when i want it to be visible again, doing EnableItemMeshes(true) while CullFactory is installed will not work
Do you have an idea on that? And if something can be fixed?
or maybe i should ping @austere stirrup ? im not sure
hmm, it definitely should work if you are calling that method while the item is in the position it should be visible in
could you DM me a build and instructions to repro?
Ok
(finally) pushing out a fix for the above issue with ChillaxScraps in CullFactory 1.6.0
as usual, item culling fixes may be volatile, so lemme know if you have any issues
I gave it a pretty good test so hopefully all is well π€
I've also changed the names of some properties in CameraCullingOptions, in case anyone is using those (not sure if even Imperium does yet, though it seems like it would be good for it to)
@sharp surge
Oh nice!
Thanks for the fix!
@austere stirrup im sorry i think i found another issue π
small issue
when playing the ocarina and if the ocarina effect is valid it's supposed to play small particles around the instrument to show the player that the effect is going to work (because all effects have different use conditions). These particles have small light sources attached to them but when playing the ocarina inside the dungeon with CullFactory installed the lights are not showing (its particle but without lights)
this is with a regular ParticleSystem? did you assign a real light or a prefab to its light system?
let me check
i assigned a normal light to the system
this light is a child of the ocarina and its disabled by default because it's supposed to only be used by the particles
hmm, how do I get the particles to appear? I'm playing the ocarina but it only plays a sound and I don't seem to see any particles
ah never mind, I just switched the song
any idea if this is a regression or if it's been like this before my latest change?
im pretty sure it was already there since the last update since i saw this in glitch's stream
last update as in the one before 1.6.0 I assume
yeah as i said each song has different use and time conditions, for testing you can try elegy of emptiness since this one can be use anywhere and anytime
yeah before
hmm, this seems like it's gonna be trickier to solve than I initially thought
there is a possible workaround though
I think it should work if you leave the light enabled but set the range to 0, then turn on "scale affects range"
hmhmm
what is scale affects range?
an option on the particle system's light component
it means that larger particles have a larger range
gotcha
looks like I can't set range to 0 though actually, hold on
I swear I have a light that's set up kinda like that
a
okay never mind, I misremembered
this is tricky, I'll have to do some investigating to see if I can find these particle lights
oh ok
worst case maybe I just ignore lights that are emitted from particle systems, but that's not ideal
why is cull factory touching particle system is the first place btw?
if anyone creates dynamic particle lights with shadows it would be beneficial to cull those, but unfortunately the lights that particle systems create live in some kind of weird limbo
it's not touching the particle system, it's touching the light that your particle system is instantiating
ah i see
it's not considered visible when it is inactive/disabled
it's much easier to just cull all lights including disabled ones, rather than hooking into Light.OnEnable() to detect when they become enabled
I suppose I could add it to the visible set if it's disabled though..
but then if the light-emitting particles pass through a wall or portal it will probably not display the lights
hmm idk what to tell you lol
just thinking out loud
I'm checking if there's API to access the current lights in the world
@austere stirrup whats the issue here out of curiousity?
particle systems have a module that attaches lights to particles, but they don't really actually exist in the scene as far as I can tell (although this doesn't matter so much)
CullFactory gets all the dynamic lights it can in the scene, including ones that are children of items, so that it can cull ones that are emitting light that cannot be seen. This includes ones that are disabled (currently), which particle emitter lights are intended to be so that they only become visible when they are instantiated by the particle system. Therefore, CullFactory makes the "prefab" light (which does exist as a child of the item) invisible via cullingMask, and when it is instantiated the particle system doesn't revert that, so it remains invisible.
it doesn't appear there's an API to get the lights instantiated by the particle system, so I may have to make a new component that I attach to the light prefabs of particle systems' light modules, so that I can be aware when one is instantiated (this should work, since HDAdditionalLightData also has to exist on the instantiated lights)
the alternative is that I consider all disabled lights to be visible in my culler, which would work but would mean that when particles' visibility according to CullFactory changes, the lights won't be made visible as they aren't considered by the culler at all
HDAdditionalData does exist yeah
how are you usually getting ur lights
for items, GetComponentsInChildren<Light>()
i think this is similar to how terrain does it's trees (i'm overlapping in some of your general usecases here in doscompany aha)
i think they might be hideanddon'tsave flagged or something?
I would believe that
I've inspected them before but I forget what flags they had
I know for the trees on terrain i cannot find them via searching in scene, and i can't find them by resources.loadalloftype before the scene exists but i can find them via resources.loadalloftype after the scene exists
gotcha
I'm not sure if that helps me, since filtering a FindObjectsOfTypeAll<Light>() would take a long time
also making a generic system that handles meshrenderers, particle renderers and terrains is fucking annoying
but it is interesting at least
I believe it
the easiest solution by far is for me to just consider disabled lights to be visible, so I might just do that for now
it matches how the tile lights are handled anyway
since culling is done per-frame, there shouldn't be any perf penalty
i forget can u patch properties
the native call on lightsmodule is middlemanned by a property
oh I see
I suppose I probably would need to consider if it changes, fun
yeah I'm not getting into that rn if I can avoid it lmao
oh actually theres a couple more
couple more relevant properties?
idk ES3 supports a lot of stuff that seems unnecessary
I found out not too long ago about how the save files are encrypted as well as compressed
the only reason I can think that would be relevant to a game like this is to protect cloud saves, but I would imagine Steam has its own protections for that
@austere stirrup apparently you might be able to be super sneaky and grab GameObject.scene off a dontdestroyonload object you have access to and get root objects from it
https://discussions.unity.com/t/editor-script-how-to-access-objects-under-dontdestroyonload-while-in-play-mode/646469/10
thread says it shouldn't work but maybe does
oh that's funny
I wonder if that's useful
possibly for your use case I suppose, but I'm unsure about mine
def interesting for me.
for you means you can possibly iterate through objects abit faster?
ah right, true
I think I still kinda need to associate the particle lights back to their item for them to be properly culled though, so probably a component is the best answer I have
kinda frustrating that ParticleSystem doesn't have any way to get the lights
not too surprising though
@hardy stratus pushing out the quick fix for this in 1.6.1
Nice thxπ
just tested 1.6.1 and yep it works fine
glad to hear
finally no more invisibility things π
pushed out an update that should hopefully disable culling on Hadal, since that interior breaks every assumption that CullFactory makes
it can always be forced on again, but I wouldn't recommend it as you'll probably see some tiles popping in and out
I may at some point try to add support for a visibility radius for certain interiors, but it would be a bit of a pain
Jumping for joy
Had this happen lmao
that one is a bit odd
unless there were tiles colliding
were you in an end cap there?
This is main
at the top?
(I think Tolian put in a very tall elevator iirc, but I haven't been able to check out the released version yet)
Yuh
ah, then that is probably Tolian's goof tbh
but either way, you won't see that anymore π
Voices of the Void ahh glitch
I just discovered that a large cost of having a bunch of manticoils (and/or probably tulip snakes) running around is that their animators are not frustum-culled
now I am in a debate with myself about whether to change their culling mode in CullFactory or in PathfindingLagFix
thus far, CullFactory hasn't touched enemies at all, but obviously it's in the name so maybe that makes the most sense
plus in CullFactory, I can perhaps be smarter about which animators can be culled (i.e. making all surface enemies not animate when in the interior)
it could also probably get away with culling their renderers, though that would probably not be useful for performance in vanilla
but on the other hand, I'm lazy, and making CullFactory do all that is a lot of work
I guess I'm inclined to say that it should be CullFactory due to the extra knowledge it has
why isn't the setting on the animator not working right?
is there a notable con in just setting it in both
well.. not really I suppose, unless there is a bug caused by it that means people have to find the setting in both
I would tend to say it's nicer to only do in one place but it wouldn't really cause issues in theory
especially for manticoils since they are purely cosmetic
tricky part is if enemies use their animators to move their colliders, then I don't want to cull them if they are within a certain distance of the local player
that's why I tend to think it would be nice to implement a proper custom culling system into CullFactory instead of just enabling CullCompletely
although I can probably do that for tulip snakes and manticoils to start
is that a thing thats happening
maybe later
well for now you can just check if they apply root motion
oh I think they might
nvm they don't 
the manticoils do fly up in their animations but I'm not sure if it affects the line of sight checks
ah damn, it probably does
wait..... manticoil has two animators.....
no wonder they show up in the profile for animation processing
Added Zeranos to the internal culling blacklist, as CullFactory has no easy way to support it at the moment.
@fleet cosmos there is a moon blacklist, it was added on Zeranos
idk if it's the Zeranos interior
nice
thx for the info
Hello!
It seems that there are some issues with the Moon Prominence from HarvestMoons when using this mod.
I don't know if it's possible to add a blacklist into that moon
@fleet cosmos can you send the video here?
ah right
yeah there isn't a moon blacklist yet, I need to work on that
for both zeranos and that moon
unfortunately there isn't really a way to fix that currently except toggling it when you land on that moon
yeah the generation root is rotated
that's pretty funny
risky business imo but I guess DunGen seems fine with it
i suppose that goofs up the AABB stuff
yeah
I don't currently rotate them, I would have to convert the portals to cubes and then back
having a look at the culling issues on Prominence and I forgot the biggest issue with this thing, it makes it a bit more difficult and therefore slower to figure out which tile you're within
portals work largely fine, but without using oriented bounding boxes to find where the camera is, it's never gonna be correct
and making oriented bounding boxes means I have to rewrite how I generate the tile bounds, and also do more complex calculations every frame
I will be adding it to a blacklist shortly though
i wonder if instead of tilting the interior if there'd be an easy way to apply a tilt to the camera
on prominence's side, i mean
if the entire interior was within a player physics region maybe
except you still get world gravity so it would only tilt the player's perspective and not their gravity
(I think)
certainly would be preferable to do it that way though imo
possibly more invasive, not sure what else it might break
I guess it's a choice between breaking assumptions in DunGen and breaking assumptions in other mods
just pushed 1.7.0, adding a moon blacklist that blocks culling on Zeranos and Prominence using the built-in list
hopefully it will fully prevent culling from activating on Zeranos even if a custom interior spawns, so that there are no culling bugs due to the interior being connected to the exterior
i can already sort of guess what the answer might be
but is there a way cullfactory can fix cave tile LODs in the vanilla mineshafts without drastically impacting performance
it's not that uncommon to get cave generation where you can see out of the map because a tile gets culled super far away (but still in your sightline)
seed 29636975 demonstrates this pretty clearly on dine (you might need to force mineshaft, but I believe I have no other mods affecting generation)
there is a massive straight cavern that basically spans the entire length of the interior
super immersion breaking :p
hum, that's what the disable lod culling option is supposed to do
I assume you haven't disabled that, maybe I need to revisit it if that's not working for you
lod culling is pretty pointless when CullFactory is there to properly determine visibility
correct, i havent disabled it
could be wrong but i wanna say i've recently seen the stairs culling issue it mentions in the description as well
but that's just anecdotal and probably shouldn't be trusted unless you find evidence to support that'd be the case
it's definitely not working for cave tiles, though - as of right now
very curious, good to know
looks like it's working properly in my profile
I'm assuming what you were seeing was a sizeable hole, the LODs do show small gaps sometimes but that doesn't sound like what you were describing
perhaps there's some sort of conflict going on
maybe
give me just a moment
ok this seed is a mineshaft even without adjusting interior rates, so that is good
hmm yeah. it doesn't replicate for me on a "bare minimum profile" (i added bettersaves and imperium and dependencies, nothing else except cullfactory)
weird
no idea what it could be then but i suppose it's not in your wheelhouse to fix, at least
yea, I'd be curious what is screwing with that though and how
oh wait
I wonder if I need to do something with loadstone 
I wouldn't think so, since it is at least aware of the rooms, but I haven't ever looked closely at any possible issues there
possibly?
i've been using loadstone for a looong time
i disabled it for about a week and don't remember if that helped with the issue in caverns
and at this point im back to using it again
anyone know what settings in cullfactory to use to reduce pop in
primarily for stuff like foliage
CullFactory doesn't affect outdoor geometry
except items
nothing in the config should affect foliage LOD pop
dammit, was hoping to reduce it hehe, vanilla LODs aint great
will it ever?
like it unrenders the entire outside when indoors
id imagine a big performance boost but what do i know
I would have to test if that's worthwhile first, I have a feeling it won't be particularly useful unless Unity's frustum culling is especially inefficient
well you neva know
i mean all the volumetric fog at surface right? that can be culled?
Currently it just culls the scrap items in the ship if they are out of line of sight? That's already a big benefit?
hmm, interesting thought, that could possibly be helpful
yee, the scrap hiding is the main thing I added item culling for, since those really can add up
glad i could help π
Yeah I was wondering if there is anything to fix this because it can be pretty jarring
Sometimes itβs like when theyβre 5 feet away
my main issue is with trees
and on some modded moons bushes and grass
Yeah exactly. Iβve never been able to find anything to fix this/edit it
HD comp did but that has its own barrel of issues
Damn
Actually it looks like they released a patch for it in a separate mod today. Iβm gonna check it out
@austere stirrup hello! π just a smallllllll request, so as of my interiors new update, it gets obliterated by cull factory! i think i know why, but the way i set up my interior theres not a lot i can do off the top of my head to fix it, so if possible it would be awesome to have it tagged as disabled by default with CullFactory
the interior name is Tartarus, the problem is uh.. well, upon entering a moon with cullfactory and my interior being generated, it culls the entire maps light sources
which is uh, an interesting incompatibility
weve also noticed just blacklisting the interior in the config doesnt do it though, which is uh even more interesting
it only works with the mod entirely removed
disabling culling for the moon it spawns on doesn't help either
hmm, if blacklisting the dungeon flow name via config doesn't work, then neither would disabling by default
what is the cause of the issue? are you generating the interior outside?
so uh one of the tiles spawns half of it alongside the rest of the interior, then the other half like 3000m above the map
the reason for this is the other half i want far away is teleported to, has a massive component i dont want to overlap with anything, and is meant to be isolated audio-wise so you cant hear anything from the map/interior
||is this the velvet room||
||yes||
im like atleast 99% sure this is the cause
Is there a reason why it goes up instead of down
initially i had it be below instead but the player immediately dies because theres a big ole death trigger below the interior spawn area
Is the death trigger just everything at that level and below, or is it flat
and it's not possible for that part that is 3000m away to be within the tile bounds?
lemme check rn actually since the project is open
3000m vertical sounds like you're asking for the interior to extend up through the exterior though..
it be real big
any chance you can make it horizontal instead?
the other half is far above the exterior
ohhh wait, the issue is that the exterior lights are culled, isn't it?
correct
Ye
I see
Ship lights, sun, floodlights
which i bet is because part of the interior extends above the exterior
is there a reason it has to be above instead of below? sounds like asking for trouble imo, since some mods like to increase view distance to ridiculous numbers
^
hmm I see
i can take a look at how far below it is though
what about horizontal?
maybe i just need to uh.... not make it that far down?
If the death trigger is just a flat plane then it shouldn't be an issue
that may work but itd restrict the generation a lot if im understanding tile bounds right as itd block off the whole area between each half
because uhh if a coordinate is above about -100 units, lethal company considers it to be outside
and you are going to have some issues with AI if you don't follow that requirement
assuming AI can existin that top portion anyway
it cant
the intention is that 2nd half is blocked off from the rest of the game in every way
I could probably see the trigger in imperium freecam now that I think about it
maybe you should make your own separate generator then
π€
true, but you could potentially use nodes to put two tiles in series, place one that moves it up a bit and then one that shoots it off the side of the map
there's a few ways to go about this, but moving that part above the interior seems a little iffy
thats an interesting idea
or maybe have it be 2 tiles connected by a doorway, the door on the 2nd half is just very offset
idk if thatd work tho
or maybe the tile just has code that moves the 2nd half post generation
it doesnt need navmesh of any kind, or antyhign like that
it just needs to be a room far from the interior/exterior that is accessable from a door in the interior
on experimentation at least the kill trigger is a flat plane, idk if it affects anything below it
i guess the room could be below it?
the room was definitely below it when i initially tried
i think it considered the teleport as passing through it somehow?
the game sets your server position as a lerp iirc
maybe, but it also doesn't reach all the way on all sides
so maybe a horizontal offset?
hm thats true i could try horizontal and vertical
im just worried about the tile bounds but ill mess around sometime and see if it actually treats the space between as used space
If I understand dungen correctly then it should just recognize the gap as 1 huge room right?
thats what im thinking yea
so anything that tries to generate that direction will just be cut off
which isnt really the end of the world but would be awkward
better than being broken with cullfactory tho
Realistically how far away does the room need to be to be completely isolated from the rest of the interior? Like is 3000m necessary?
it doesnt need to be that far at all, but just making it slightly above the exterior wont work as the issue will still persist, my main worry is there isnt that much space for some reason between the generation root and the death trigger below the interior spawn
and theres not a ton of space above either, atleast on experimentation. there may be even less on modded moons depending on how theyre structured
if i put the 2nd half right on the root, it expands out into the exterior
infact
even if i put it onto the deatht rigger below, it STILL expands out into the exterior
So why does the effect have to be so big
I mightve not been looking hard enough but I didn't see much of anything past the roof of that room
its a scrolling mesh you can see behind the gate, though i guess maybe i can modify it and if i align it just right i can cut some of it out
The whole thing moves?
||the velvet room in P3 is an elevator shaft, so everything through the gate (the wall behind, and the light are moving as if the room itself is constnatly moving)||
i could definitely cut it down with some visual tricks but itd still take up a lot of space
I could swear I've seen something in unity before that generates small moving tiles in a specific pattern
killing should be client-side, so as long as you teleport I think in theory it shouldn't trigger, but idk for sure
if it did kill, it would probably be due to some physics engine shenanigans, not the network
the out of bounds trigger killing the player is client side yes
only your own local position matters, which shouldn't be lerped
Oh hm, maybe I just did something else silly then, I'll try making it just go down again when I get home from work
hopefully that will work out, that's definitely the simplest solution
going down is ideal in every way except that you miss the kill trigger if someone manages to clip out
Can just add my own below just incase
it worked! i dont know why last time i tried it it killed me but it seems to work great now, just one last very very minor issue/question, what could cause tiles to be culled specifically when sitting in exactly the middle between two tiles
i noticed when i walk between tiles i see a flicker in the distance, turns out thats because when i stand on the seam between tiles it culls the tile forward
is this normal behaviour?
i think i noticed this in the older version too
im pretty sure i did as well
i thought it was something to do with the "doors" at first but it does it on tiles that don't have any
actuallly its not just on the seams
it seems to just be confused in general when to cull
ill get some footage
its playable atleast, but its uh... funky
are you doorway sockets the right size?
these?
oh wait
are they supposed to cover the entire area that may or may not be covered depending on the generation
actually no i dont think vanilla does that but maybe im forgetting
but the blocker is that whole cube
and the door is that small green thing
oh nvm i think they do actually
π
ive just been setting doors up wrong this whole time
luckily its a very quick and easy change
already done
gonna test now
OHHH wait i think i get it now
it gets so confused because it probably tries to detect when im "looking through the door"
but the door is a tiny piece inbetween tiles, so looking down the hallway isnt actually what its supposed to be
so cullfactory is like "well, clearly he isnt looking down the hallway" even if i am, because i set up the door that cullfactory is looking at wrong
YUP
perfect now
tysm! β€οΈ gonna push the changes now
vanilla does do that fairly consistently
yeah i was just completely wrong there
consistently enough for me to rely on it anyway
i checked and they all "match" the empty space between tiles
some are uh
maybe off slightly
but generally hes got the idea
lmao
mine were nowhere near lined up so it broke shit
yeah if you turn on portal visualization it'll show you where it thinks you can see through to the other tile
I do wanna make a better visualization mode so you can see the frustums it generates
it's just tricky since it takes a bit of math to figure out where to place vertices at intersections of the planes
I think dark mist and cull factory dont get along too well 
what's dat
an enemy that was last updated in january last year
hmm, what's the issue with it?
Im not sure if they are the cause of it but when i have both of the mods and i start to wander deep in the interior it starts to lag
But if you go back to main it start working good again
But yeah dark mist hasn't been updated in a loong long time and it is so simple that i just uninstalled it
The only thing dark mist does is close doors behind you to confuse you
seems doubtful that that could be related to CullFactory, the only thing that could possibly cause lag when venturing deeper with CullFactory is the search for the tile a camera resides in, which in my testing took a few microseconds
gonna try with only the two of them to see if they really are the problem
you should test your pack without CullFactory, I'm pretty sure the problem will not go away
i tried it without darkmist and it never happened again
ok so i want to make a public apology
cullfactory is in fact NOT the cause of the lag
i will try to check with other performance mods coz it started to happen just when i put like 4 performance mods
im so sorry 
no worries, at least you got only a few mods to check
assuming it's those and not some update
welp so i havent been able to replicate it idk what is causing this extreme lag, i just know that removing darkmist seems to fix the issue
i supposed it was something with cull factory cause it makes things far away not render and maybe bc the doors aren't rendering the darkmist thing wasn't working properly but im no expert not anything close to that so idk
nah it doesn't affect gameplay at all
also doors aren't touched by the culling currently, though that's not really relevant here either
if this is intermittent though, you're gonna need to test more to ensure that removing the mist actually stops the issue
yeah will gonna do that now
but it wouldn't surprise me if it does, it seems very likely that it could just be an issue with that mod alone
or an interaction with some custom moon/interior
yeah it just that i had darkmist installed with like 100 other mods and never had that problem but when i started trying performance mods that started happening, i even tried it with a testing pack i have and the same happened
my guts told me that maybe darkmist was doing something and when i disabled it it start working again
so weird
the same happened as in it worsened performance with the performance mods added to the test profile?
tried it in 2 different pc too
yes
well smth like that
i put the performance mods in my testing pack and everything was working ok, then i added darkmist and all exploded
i use custom interiors too
maybe that has something to do too
is there a known interior incompatible with cullfactory?
not any that I know of if you haven't whitelisted anything
is this performance issue like a big stutter on a half second interval? or does your fps run low constantly and consistently?
the second one, everytime i get farther from main it starts to go pretty bad and in some parts it really goes extremely bad, but when i retrace my steps back it stabilizes
but now that you mention it there is also like a tiny stutter everytime im inside the interior
i was able to recreate it in my testing pack now and it happened
i will try disabling cullfactory to see if it is correlated
if I had to guess, it's probably because they are using FindObjectsOfType to get the players in the game instead of using the allPlayerScripts array
there is a limit on the distance from main at which the code activates, so if you adjust the min distance in the mod's config then it will change the distance from main at which you start to experience this performance loss
I find it somewhat surprising if this is affected by performance mods, the only one that I would expect to be relevant is LethalPerformance, since it patches such calls to use cached results instead
I don't know why that would cause performance loss instead of improvement, but it may well affect it one way or another, so it's worth testing with only that and the mist, then testing without LethalPerformance to see if it affects it
ok so i tried with cullfactory disable and it still happens so i can confirm it isnt cull factory im sorryy
also, the distance you travel from main isn't relevant here, it's the length of the shortest path
will try that right now!
if you find a seed on which this repros, you should use CullFactory config to lock it to that seed so you can test different combinations
yeah i had to go pretty far now to start having lag, but before i had to go like 3 tiles
ok veredict
i just tried without any performance mods and it is still happening so the only other thing that could be is an update that broke darkmist
yeah definetily something broke darkmist
welp im sorry for all this nonsense, guess im not using darkmist anymore
thanks so much for the informative description of how the game works

npnp!
what interiors are reccomended to blacklist
the ones that are built into the blacklist already
if you have any issues with new interiors then let me know so I can investigate
with the v70 update, if you aren't doing it already, you should be able to just toggle off the renderers for the interior even when the radar is being watched
which should be a big performance boost
all of the radar stuff is managed through spriterenderers on exclusively the mapradar layer
at some point I could look into whether that's a performance benefit, but I think that frustum culling plus the culling mask of the radar map should result in those not rendering when looking at the map in the ship most of the time anyway
should maybe be possible to check with a fairly simple UnityExplorer script though
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
at CullFactory.Data.DynamicObjects.PlayerIsInInterior (GameNetcodeStuff.PlayerControllerB player) [0x00000] in E:\Development\Lethal Company\Projects\LC_CullFactory\CullFactory\Data\DynamicObjects.cs:54
at CullFactory.Data.DynamicObjects.OnPlayerTeleported (GameNetcodeStuff.PlayerControllerB player) [0x00023] in E:\Development\Lethal Company\Projects\LC_CullFactory\CullFactory\Data\DynamicObjects.cs:163
at CullFactory.Data.DynamicObjects.CollectAllTrackedObjects () [0x00058] in E:\Development\Lethal Company\Projects\LC_CullFactory\CullFactory\Data\DynamicObjects.cs:261
at CullFactory.Extenders.LevelGenerationExtender.OnRoundEnded () [0x00005] in E:\Development\Lethal Company\Projects\LC_CullFactory\CullFactory\Extenders\LevelGenerationExtender.cs:27
at (wrapper dynamic-method) StartOfRound.DMD<StartOfRound::PassTimeToNextDay>(StartOfRound,int)
at (wrapper dynamic-method) StartOfRound+<EndOfGame>d__285.DMD<StartOfRound+<EndOfGame>d__285::MoveNext>(StartOfRound/<EndOfGame>d__285)
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <e27997765c1848b09d8073e5d642717a>:0
(Filename: E:/Development/Lethal Company/Projects/LC_CullFactory/CullFactory/Data/DynamicObjects.cs Line: 54)
this happened when going back into orbit at the end of a round and softlocked all of us
(hud never faded back in, game didn't autosave, so we went back a day on rehost)
im not 100% sure what the cause was here but only 2 things happened that i would guess could be relevant:
- one of our players disconnected mid-round
- two of our players died in the caves ("no signal" screen) and their bodies were teleported back out to the ship
i believe we have done #2 without it throwing errors before, but im not 100% sure
i had a similar issue but for me it was that host softlocked, and every client crashed
i do have this mod installed but i don't know if the crash is related to this
that's..........um.........interesting.......... that indicates that someone destroyed a player object
surely that's not a thing??
it never has been before
lol yeah i took a peek and it looked like that would be the only cause
and that sounded completely insane
the only thing I can think is that maybe MoreCompany destroys player objects until they're needed or something
im like... pretty sure morecompany doesnt do that? I think it just adds a bunch of player objects at scene start and they are "reserved" like the 4 vanilla players when people leave
but that also has never been a thing before
but it's the only possibility that crossed my mind
yea
i do play with a limit of 6 (default is 12 i think?) so maybe that has something to do with it
maybe it doesnt work entirely right if you decrease the max limit
i can take a peek into it a bit later and see if anything sticks out to me
it should trigger that code at the start of every round too though I think
so unless it happens mid round it doesn't make a whole lot of sense
appears that it is the first exception in the log (except some lethalperformance navmesh exception that happened upon initial host)
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_gameObject(UnityEngine.Component)
at (wrapper dynamic-method) ManualCameraRenderer+<updateMapTarget>d__71.DMD<ManualCameraRenderer+<updateMapTarget>d__71::MoveNext>(ManualCameraRenderer/<updateMapTarget>d__71)
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <e27997765c1848b09d8073e5d642717a>:0
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_gameObject(UnityEngine.Component)
at (wrapper dynamic-method) ManualCameraRenderer+<updateMapTarget>d__71.DMD<ManualCameraRenderer+<updateMapTarget>d__71::MoveNext>(ManualCameraRenderer/<updateMapTarget>d__71)
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <e27997765c1848b09d8073e5d642717a>:0
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
at PlayerPhysicsRegion.OnDestroy () [0x00033] in <31f0351006d541aeb5ae92a12fc7161b>:0
but some vanilla scripts bug out too
though im pretty sure it's just because of the same deal
oh there's also this before it, but i've seen this a million times before and i just ignored it
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Component.get_transform(UnityEngine.Component)
at PlayerPhysicsRegion.OnDestroy () [0x00033] in <31f0351006d541aeb5ae92a12fc7161b>:0
Some metrics in the collection went over the configured values limit. Some values were ignored.
Unable to add the requested character to font asset [b]'s atlas texture. Please make the texture [b Atlas] readable.
Unable to add the requested character to font asset [b]'s atlas texture. Please make the texture [b Atlas] readable.
Unable to connect player to voice B #0; False; True
Unable to connect player to voice B #1; False; True
Unable to connect player to voice B #2; False; True
Unable to connect player to voice B #3; False; True
Unable to connect player to voice B #4; False; True
[Netcode-Server Sender=4] Destroy a spawned NetworkObject on a non-host client is not valid. Call Destroy or Despawn on the server/host instead.
[Netcode-Server Sender=4] Destroy a spawned NetworkObject on a non-host client is not valid. Call Destroy or Despawn on the server/host instead.
// cullfactory nre happens
yeah the only case in which I've seen things like that print is when exiting to the menu
maybe PlayerPhysicsRegion contained a player, it crashed before freeing them, and then it was destroyed which also destroyed the player?
come to think of it, i think the person that DC'd did so while inside the cruiser
ohhh hmm maybe..
that might make this really replicable
I hope it's an easy fix at least, what an interesting edge case discovery
the only thing that doesnt make sense in my head is why the cruiser's physics region would've been destroyed
im nearly certain we had it attached to our ship when we took off
i'll probably need to toss around with this and see if i can get a repro under some conditions
this error was thrown as soon as we went to orbit, so it wasn't from quitting the game
and also meant i couldnt land the ship to check if car was still there (if i had even thought to do so, at the time)
Maybe one of these 2 settings somehow? I remember having some weird issues at one point til I turned these off
in Cruiser Improved
Dunno how those would affect the Physics Region though
@austere stirrup The new update for Wesley's Interiors doesn't play too well with CullFactory, at least Citadel doesn't lol
Looking at some walls just causes the void if CullFactory is present
hmm, any idea if Wesley's seen this yet? he's been pretty quick to fix things like this in the past, so I don't necessarily want to change the internal lists if I don't need to
I did send it to him lol
No idea if he is working on it or not he doesn't seem to know why it breaks
citadel is an interior I assume?
I can have a look
oh wait citadel is one I've played on before, is this issue new??
if this doesn't happen everywhere then I'm gonna need a seed and clip probably
Yeah it's with the new update
not seeing anything yet, so yeah, I'm gonna need a specific spot to look
that's curious
could I get a profile code for what you were running here too? forgot to mention
lunxara's vod has the seed at least
unless wesley made it worse with the update lol
but if you get one first you get a pretty star emoji
0197fb05-55e7-17e7-7b06-d654e169351d
tyty
huh
looks like the issue is that the wall you're facing there isn't part of the tile you're in
@lucid trout
I'm assuming this pair of tiles are always connected like this? moving the walls from the start tile into the big chamber should fix it
it is a little odd that my checks for renderers extending into other tiles aren't catching this instance, though
I guess it probably doesn't extend into the other tile as much as it needs to, they have to intrude into the tile by 0.01
@austere stirrup This threw on round end after a day on Zeranos
no idea why
But it soft locked the game
is this new after an update or somethin?
well that's certainly uhhh interesting...
someone destroyed a player object
a player object that is in StartOfRound.Instance.allPlayerScripts
I have a feeling you would be seeing a whole lot more errors than that
I wish you luck in figuring that one out
I have a feeling it's cus someone dced right after we loading onto a floor
and it broke after round end
Yeah but I know Zeranos handles a lot of things in interesting ways
CullFactory 2.0.0 Beta 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)
- Disabled culling on Outfall to prevent culling issues when landing
Changed
- Optimized culling algorithms slightly
This update implements support for multiple dungeons in order to enable culling in the extra dungeons on @azure ledge's Conflux moon
It has fairly significant refactors for the culling setup and more, so let me know if you see anything that is distinguishable from having culling disabled
Especially now that it's accounting for lights outside tile bounds, since that is one case I had missed previously
just curious, do you know if the "light bleeding" fix conflicts with lethalsponge's fade distance patches?
i've been noticing a bunch of light bleeding in the manor ever since v70 and i wasnt sure if it's just a problem with the new manor tiles or if it was this
hmm, I mean, the only case in which I can see that causing extra light bleed is if multiplier > 1, since that'll cause the light to fade at a further distance than the shadow fade distance
and that would also cause CullFactory's shadow-based light culling to be disabled, if it caused my heuristic for disabling shadow fading to reject them
otherwise, that patch wouldn't cause any conflicts as far as I'm aware
it looks like that patch runs before CullFactory bakes its culling data, thankfully
if the light bleeding you're referring to is affecting more lights than just the window light, and especially if CullFactory is causing the lights to appear differently to vanilla, then seeds+coordinates+profile codes would be helpful
