SaneEngineer / No-Grass-In-Objects-NG

NGIO ported to AE
MIT License
32 stars 5 forks source link

Raycast related crash #37

Closed blink-blink closed 1 month ago

blink-blink commented 1 month ago

Describe the bug Whirlwind sprinted from the passage from Whiterun to Labyrithian to a grass field toward Lunar forge and CTD occurred upon the end of the sprint. I'm guessing it's something related to loading of cells where raycast are cast/queried. Here is the crash log, https://pastebin.com/uNNQ8WaZ

Screenshots (Did not manage to have a screenshot prior to the crash)

Caching (Not an issue about caching)

Config

GrassControl.ini
[Debug]

;Enable additional debug logging.
Debug-Log-Enable = false

[RayCastConfig]

;Use ray casting to detect where grass shouldn't grow (inside rocks or roads).
Ray-cast-enabled = true

;The distance above grass that must be free. 200 is slightly more than player height.
Ray-cast-height = 150.000000

;The distance below grass that must be free.
Ray-cast-depth = 5.000000

;Which collision layers to check when raycasting. Not recommended to change unless you know what you're doing. These are collision layer index from CK separated by space.
Ray-cast-collision-layers = 1 2 13 20 31

;Which objects will raycast ignore. This can be useful if you want grass to still grow from some objects (such as roads).The format is formid : formfile separated by; for example "1812A:Skyrim.esm;1812D:Skyrim.esm" would add RoadChunkL01 and RoadChunkL02 forms to ignore list. Base forms go here not object references !
Ray-cast-ignore-forms = 

[GrassConfig]

;Enable much more grass without having to change mod files.
Super-dense-grass = false

;How the super dense mode is achieved. Not recommended to change for normal play. This does nothing unless you enable SuperDenseGrass setting.7 is normal game(meaning nothing is actually changed), 6 or less would be much less grass, 8 is dense, 9 is ?, 10 + is probably crash city.
Super-dense-mode = 8

;Whether to track how much time is taken to generate grass. Whenever you open console the result is reported. Try disabling all settings except profiler, go to game and in main menu 'coc riverwood', after loading open console to see normal game time. Then enable settings and check again how it changed. Remember to coc from main menu instead of loading save because it might not be accurate otherwise.
Profiler-report = false

;This will generate cache files in /Data/Grass/ and use those when we have them. Any time you change anything with your mod setup you must delete the contents of that directory so new cache can be generated or you will have bugs like floating grass or still grass in objects(that were changed by mods).
Use-grass-cache = false

;Set true if you want to enable extended grass distance mode. This will allow grass to appear outside of loaded cells.Relevant ini settings : SkyrimPrefs.ini[Grass] fGrassStartFadeDistance
Extend-grass-distance = true

;Allow more grass to be made in total. This is needed if you use very dense grass or have large draw distance. Otherwise it will reach a limit and just stop making grass leaving weird empty squares.
Extend-grass-count = true

;Makes sure that the max grass types per texture setting is set to at least this much. Can be useful to make sure your INI isn't being overwritten by anything. Most grass replacer mods require this. Set 0 to disable any verification.
Ensure-max-grass-types-setting = 7

;Overwrite fGrassStartFadeDistance from any INI. If this is zero or higher then the grass distance will always be taken from this configuration instead of any INI.This can be useful if you have a million things overwriting your INI files and don't know what to edit, so you can just set it here. For example 7000 is vanilla highest in-game grass slider. If you want to set higher you need to enable ExtendGrassDistance setting as well or it will not look right in - game. What the setting actually means is that grass will start to fade out at this distance. Actual total grass distance is this value + fade range value.
Overwrite-grass-distance = 6000.000000

;Overwrite fGrassFadeRange from any INI. If this is zero or higher then the grass fade range will always be taken from this configuration instead of any INI. This determines the distance it takes for grass to completely fade out starting from OverwriteGrassDistance(or fGrassStartFadeDistance if you didn't use the overwrite). If you want the grass fade out to not be so sudden then increase this value.Probably recommended to keep this at least half of the other setting.
Overwrite-grass-fade-range = 3000.000000

;Overwrite iMinGrassSize from any INI. If this is zero or higher then the grass density setting (iMinGrassSize) will be taken from here instead of INI files. Lower values means more dense grass. 50 or 60 is normal mode with somewhat sparse grass(good performance).Lowering the value increases density !20 is very high density. You should probably not set lower than 20 if you decide to change it. The grass form density setting itself still mostly controls the actual density of grass, think of iMinGrassSize more of as a cap for that setting.
Overwrite-min-grass-size = -1

;Apply this scale to every piece of grass everywhere. For example 0.5 makes all grass pieces half the size it should be.
Global-grass-scale = 1.000000

;This will change how grass works. It means grass can only ever be loaded from files and not generated during play.
Only-load-from-cache = false

;When pre-generating grass then skip worldspaces with this editor IDs. This can greatly speed up generating if we know the worldspace will not need grass at all.
Skip-pregenerate-world-spaces = DLC2ApocryphaWorld;DLC01Boneyard;WindhelmPitWorldspace

;If this is not empty then skip every worldspace that isn't in this list.
Only-pregenerate-world-spaces = 

;Enable grass compatibility mode with DynDOLOD Grass LODs. Valid values: 0 = Disabled; 1 = Display grass only in active cells(without fade) and let DynDOLOD handle inactive cell Grass; 2 = Display grass only in active cells and large ref loaded cells(without fade) and let DynDOLOD handle grass outside of large ref cells 
DynDOLOD-Grass-Mode = 1

;Maximum number of attempts to generate a grass cache before skipping a cell.
Max-Failures = 2

Log crash-2024-06-13-12-43-19.log

Additional context Using NGIO v 1.0.16f on Skyrim AE 1.6.640

SaneEngineer commented 1 month ago

I appreciate the detailed description. I wasn't able to recreate this, but I came up with a fix that should prevent this crash. In the future, you really should be using a cache with the raycasting as I prevents issue like this.

blink-blink commented 1 month ago

Oh wow. Thanks for the quick response and I really appreciate what you modders do :)