Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Fog Affecting Skies #2696

Open
MajorCooke opened this issue Sep 3, 2024 · 10 comments
Open

[Feature] Fog Affecting Skies #2696

MajorCooke opened this issue Sep 3, 2024 · 10 comments

Comments

@MajorCooke
Copy link
Contributor

MajorCooke commented Sep 3, 2024

Seeing this PR has me thinking of fog affecting skies, such as bright fog often occludes the skies, while a clear dark night with moonlight still has silhouettes.

This could also benefit from being toggleable in both cvar and MAPINFO, with the cvar allowing overriding for the sake of testing.

If possible, it would be nice if the fog could be cylindrical similar to how Unreal used to have their fog replicated via a simple gradient texture in their skyboxes.

@dileepvr
Copy link
Contributor

dileepvr commented Sep 4, 2024

The fact the skyfog exists as a parameter (the amount of fog density to apply to skies, with the color taken from the sector's fog) tells me that attempts at making an automatic solution work for all skies were given up on, and control was handed over to the map maker.
I am also reading that skyfog does not affect six-sided skyboxes. Only wrap-around single-texture skies.

@MajorCooke
Copy link
Contributor Author

I think skyfog is something to do with looking straight up and down? I'm not sure.

Do you think this could be possible akin to the Unreal way or no? Basically akin to it being a cylinder. Without it, the pop-ins for BSP, while understandable, may be really jarring. And again, I'm not worried about it until after your PR is merged.

@dileepvr
Copy link
Contributor

dileepvr commented Sep 4, 2024

Since adding new vertices, etc. to the levelmesh after the BSP nodes have been generated is a no no, the cylinder will likely have to be a parallel levelmesh (is that the right term?) or a giant, inside-out 3D model that surrounds and moves with the viewpoint. The latter might be testable right now. I might do it and report back here.

@MajorCooke
Copy link
Contributor Author

Fantastic, looking forward to it.

@dileepvr
Copy link
Contributor

Having looked at how skyviewpoint actor functions in, say, here: https://www.realm667.com/repository/sfx-shoppe/other/2397-parallaxing-sky-viewpoint#preview

It seems to me that a gradient texture may be erected on linedefs just as the tree-line or mountains were in the skyviewpoint area.

@MajorCooke
Copy link
Contributor Author

MajorCooke commented Sep 15, 2024

I know. But it'd still be nice to be able to do this through other means for dynamic fog.

Also that doesn't solve the problem of having it not being able to affect skies without skyboxes.

@inkoalawetrust
Copy link
Contributor

Yeah I agree, this should definitely be a feature, having fog blend into the sky. Not sure what my (Well actually kinda DrPyspy's, he wrote the actual code for moving around the camera by some division factor back in 2019 when I could code anything, but I was the one that expanded it to be more useful afterwards) moving sky camera is supposed to prove.
What do you mean by gradient texture? Like a fog gradient in the background of a skybox? That's still not really a solution. Even in skybox sectors.

@MajorCooke
Copy link
Contributor Author

MajorCooke commented Sep 18, 2024

WITH the option that it can be toggled as well. Since, you know, dark skies can be seen through the dark.

@MajorCooke
Copy link
Contributor Author

What do you mean by gradient texture? Like a fog gradient in the background of a skybox?

Look at the second link in the OP.

@inkoalawetrust
Copy link
Contributor

Yeah, that's what I thought too. But as I said I think it's a band aid solution, on top of of course being only really usable in skybox sectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants