Property to Disable Fog Tweening

Hey

So I am using a custom water system for my current project. Part of the system is that it adds a GUI overlay when the camera goes underwater to make it seem like you are actually underwater. I then realized I could do the same thing with fog (since I am using FE) and it looks great. The only problem is that when you change the fog’s distance properties, it does not update immediately, but instead tweens in slowly. My solution to this problem was to add fog to the whole level which was relatively close to start with. Even with this though, the fog still took a while and it just didn’t look great. On top of that, I really do not want fog in the whole level, but only underwater.

My proposition is that a property be added to the Lighting object called “FogTweeningEnabled” which is by default set to true. This way, any old places which relied on this property will not be affected and it would be a very easy change for users like me who need this functionality.

This will greatly improve the appearance of my game and of many other games, I am sure, so please consider this!

Thanks,
Blake

I assume it’s more efficient to set fog on the C++ side, than to set it every frame through lua, and tweening is a generally useful behavior.
I think setting fog should always be instantaneous, and there should be a method for tweening fog

Fog is actually not a complex operation, it’s just a z depth test filter while rendering, the higher the z factor, the more ‘fog’ you blend in, changing one variable from lua won’t matter at all

As a workaround, have you tried setting the fog variable twice quickly? the second set might stop the tweening, and start a new tweening path, which if you wanted to set fogend to say 12, you set it first to 12.01 then to 12, ofc, it all depends on how roblox does their tweening

[quote] I assume it’s more efficient to set fog on the C++ side, than to set it every frame through lua, and tweening is a generally useful behavior.
I think setting fog should always be instantaneous, and there should be a method for tweening fog [/quote]

I agree this would be better and definitely offers more options with the tweening such as duration and even styles, but I am not sure that ROBLOX would go for it because it is less backwards compatible.

They could add an Enum to Lighting called “FogInterpolation” or something, which has the values “Direct” and “Tween” and defaults to “Tween”, that would be backwards compatible.

[quote] I assume it’s more efficient to set fog on the C++ side, than to set it every frame through lua, and tweening is a generally useful behavior.
I think setting fog should always be instantaneous, and there should be a method for tweening fog [/quote]

I agree this would be better and definitely offers more options with the tweening such as duration and even styles, but I am not sure that ROBLOX would go for it because it is less backwards compatible.[/quote]

We don’t want the API to get too bloated with enums and stuff. If we want 100% works-as-expected backwards compatible behavior, a bool property would probably have the smallest footprint.
A method would be very useful if setting via script isn’t technically practical, I’m pretty sure the auto tweening is one-way so it already has odd behavior

It doesn’t really make sense to have everything in Lighting change instantaneously, but then have the fog tween slowly.

INCONSISTENCIES, INCONSISTENCIES, INCONSISTENCIES, INCONSISTENCIES

[quote] Hey

So I am using a custom water system for my current project. Part of the system is that it adds a GUI overlay when the camera goes underwater to make it seem like you are actually underwater. I then realized I could do the same thing with fog (since I am using FE) and it looks great. The only problem is that when you change the fog’s distance properties, it does not update immediately, but instead tweens in slowly. My solution to this problem was to add fog to the whole level which was relatively close to start with. Even with this though, the fog still took a while and it just didn’t look great. On top of that, I really do not want fog in the whole level, but only underwater.

My proposition is that a property be added to the Lighting object called “FogTweeningEnabled” which is by default set to true. This way, any old places which relied on this property will not be affected and it would be a very easy change for users like me who need this functionality.

This will greatly improve the appearance of my game and of many other games, I am sure, so please consider this!

Thanks,
Blake [/quote]

I was actually doing the exact same thing the other day but I made a temporary workaround.
Here’s what mine looks like:

A property to determine if another property gets tweened? I’m thinking more of no tweening at all and having a built in method of Lighting to tween the fog if you wanted to.

No enums. No booleans. No. No. No.

We need fog tweening because we change it automatically with quality level so that fog is not further than the clipping distance.
The fact that setting fog property manually is subject to same tweening is a bug.

[quote] No enums. No booleans. No. No. No.

We need fog tweening because we change it automatically with quality level so that fog is not further than the clipping distance.
The fact that setting fog property manually is subject to same tweening is a bug. [/quote]

That explanation makes sense but can you say anything about if we can expect a fix for this? It doesn’t hurt too many games, but for a specific project I’m working on, it makes a huge difference!

I agree, we don’t need tweening properties when these can be so easily accomplished ourselves.

[quote] No enums. No booleans. No. No. No.

We need fog tweening because we change it automatically with quality level so that fog is not further than the clipping distance.
The fact that setting fog property manually is subject to same tweening is a bug. [/quote]

Ok, thank you very much for clarifying, this is great to hear! As Rukiryo asked, is there any sort of ETA on this getting fixed? For my project, this is actually a very big deal and I do not want to have to make a ‘fake fog’ using parts.

[quote] No enums. No booleans. No. No. No.

We need fog tweening because we change it automatically with quality level so that fog is not further than the clipping distance.
The fact that setting fog property manually is subject to same tweening is a bug. [/quote]

wow, this explains a lot of the frustrations with my game

What if I don’t want fog to adjust with quality level? Closer fog in my game looks way worse than stuff popping in/ out in the distance. It’s inconsistent and doesn’t behave the way I’d like it to.

Could we have an option to disable this, or at least edit this in PlayerScripts?

I’d really love to be able to disable the mandatory shorter fog.

We’ll definitely fix the tweening problem. We can evaluate separately whether reducing fog was even a good idea in the first place.

I like the fact that it tweens, but an option would be nice. Just saying that I’d like the tweening to stay :slight_smile:

Scriptable

It simply doesn’t work for all games, and as someone who works on one I’d love if I had the say so in regards to how foggy my game looks.

Any updates on this? I’d love to be able to do something like this (a really cool place by Nightframe that he linked on this thread), but I can’t because when I transitioned from land to underwater or underwater to land the fog tweening is atrocious.

Bump.