LGhassen / Scatterer

Atmospheric scattering mod for KSP
Other
195 stars 51 forks source link

NaNs on the water surface #216

Open LGhassen opened 4 months ago

LGhassen commented 4 months ago

DrPebber commented Jul 5, 2024

I made a new craft in a new save, launched it, opened a parachute at ~2000m, at around ~1000m or below some growing black patches appeared. When camera is moved to a place where patches weren't seen, they begin to appear and grow. When my craft landed camera went underwater for a sec and all the patches were gone for a minute, but then appeared and grew again.

I recently installed EVE, Scatterer, Spectra and Parallax, later TUFX. When I was installing TUFX in CKAN, Scatterer mod as well as configs were missing, I installed them back thinking that it was a reason of the issue, but it wasnt.

Here's a link for a log file since I cant load it here directly. Deleted the screenshots, but i can record a video if needed, thanks for amazing mods!

https://www.transfernow.net/dl/20240704xsuBk3Zm

My nickname on the KSP forum is Fanta_Racer is you need another point of contact.

TrisThe commented 2 months ago

I've experienced the same issue it seems to be a correlation between TUFX HDR and the Ocean Transparency and Refractions Shader turning either off seems to fix it but its a hard choose for me at least which one. I notice it appear at vanishing points or corners like a mis render growing exponentially sometimes its at the edge of where the fog in the water cuts off vision of the bottom. Using Deferred seems to stop it as well but I get a Light Blue Highlight on KSC models.

LGhassen commented 2 months ago

This issue is unreproducible on my computers unfortunately so I cannot debug it (sometimes GPUs/drivers will do some math operations differently not resulting in NaNs). If you can take a renderdoc capture when you get the issue and send it that'd help, otherwise I don't really have any means of testing it besides guessing or getting lucky.

TrisThe commented 2 months ago

Ill see what I can do ive gotten close to making it repeatable but it has to do with transparency. Just an idea are there rendered borders made underwater to reduce transparency bleeding through to unrendered regions?

gotta add I downloaded renderdoc and it doesn't work i input the game into the target and ksp just crashes is there something I need to do if I use CKAN I tried removing the CKAN files and no luck. and after pondering the settings I don't see how I'm supposed to time a semi random bud occurrence with something that captures one frame but crashes the game on launch is there a mod extension for the program.

after an hour or two now I have successfully started the game with the mods and renderdoc. and it crashed on load

TrisThe commented 2 months ago

There are holes in the terrain, Parallax is causing there to be NULL render points at the edges of terrain LODs and if used in conjunction with Astronomers Visual Pack using TUFX HDR Pipeline it turns into "bright" black spots. I found this originally making a modpack to play around with and it looks like some sort of buffer crash happens and the color cascades through the underwater refractions. I cant test Via renderdoc, it crashes with Parallax and it almost just crashed my computer seems to not be entirely caused by parallax, from my observations Scatterer does not have HDR compatibility or it doesn't check for terrain holes when calculating water refractions. I've got some images that show where the Error originates if the render breaks, the dark color from the terrain artifact will saturate the ocean color.

I forgot to mark the dots on the first image they are rather small when not breaking also no PlanetShine was not contributing Screenshot 2024-09-29 172334 Screenshot 2024-09-29 173308 Screenshot 2024-09-29 175752

This is a result of a failure in multiple mods that claim to operate together. Its easy to recreate at least on a RTX 3060TI just cram some parts packs packs Netrea, Jade, intersteller into the game to stress it out. install Astronomers with TUFX and Parallax. then there they are over at those islands in flight they appear on the KSC screen on high demand and the ocean will sometimes begin to Darken like dye in milk always scanning and waving down like monitor refresh.

if you ask me its most likely an HDR issue Amplifying a missing error check for reflections and refractions.

TrisThe commented 2 months ago

After Further Review I discovered Parallax is not necessary for my purposes I was sure it was a dependency of something and I may be wrong in assuming this is a problem with your mod it could be a hardcode issue with rendering if a gap is formed in terrain I will post my findings to the dev for that.