Fog Volume 3

Fog Volume 3.2 is out on the asset store.


3.2.1 DOCUMENTATION
Version highlights:

To be aware of the progress, follow me on twitter

7 Likes

Hi I just purchased this as I assumed it worked on mobile as you mentioned in the description it works for ios. It appears to work for me on pc but when I change to any mobile platform ie android or ios the fog disappears. Am I doing anything wrong or is there a bug ? Also as a suggestion for extra features is there any reason you couldnā€™t make any mesh shape volumetric not just cubes ?

1 Like

As you can see here, its working on an iphone

It may disappear in editor viewport, it also happens on PC sometimes. I still donā€™t know why. But its always shown in game.

About shapes, as described in the documentation, it only models box shapes, since the fog is not based on any geometry, but on an algorithm.

Itā€™s time now for debug and improvement, so any comments are welcome. Another update with some more options is waiting for approval.

Hi, I am interested.
It is heavy in terms of performance?
How would be the best way to implement over a large terrain area? I guess doing that follow the player and only having a small portion of fog around him.

Sorry for my english, thanks

It is a transparent shader, so it adds overdraw. Nothing different than any other effect such as fake light shafts, particlesā€¦
As reference, I show you two comparison images.

Hi I found out what the problem was. For some reason when switching from desktop to mobile platform on PC it changes the near clip plane for the camera to a very small value. I got this working on Android by simply increasing this value. You might want to look into this or perhaps at least ensure that the near clip plane camera in your example isnā€™t too small so will show up on most mobile devices as default.

Humm, dunno. I have tested switching from one platform to another and works fine all the time.

I have made my first android build ever, and yes, it works almost fine. Iā€™ll keep testing.

I purchased the asset. So far everything works fine, and attaching the fog to player, it gives the effect of fog stretching away
It would be very nice and usseful if the fog gradually begins or ends, and not ending in a wall of a rectangle.
Is this possible?

thanks!

Great asset, works well in editor/play. Iā€™m getting a errors when building my win exe thoughā€¦ any ideas? thanks

Assets/FogVolume/FogVolume.cs(47,17): error CS0103: The name `FogVolumeCreatorā€™ does not exist in the current context

sometimes this oneā€¦

Maximum number (64) of shader keywords exceeded, keyword FOG_VOLUME_INSCATTERING_OFF will be ignored
UnityEngine.Shader:EnableKeyword(String)
FogVolume:ToggleKeyword(Boolean, String, String) (at Assets/FogVolume/FogVolume.cs:78)
FogVolume:Update() (at Assets/FogVolume/FogVolume.cs:46)

Yes, I noticed that error last night when I tried to build for android. And update is waiting for approval. If you donā€™t want to wait, this is the correction:

#if UNITY_EDITOR
FogVolumeCreator.Wireframe (VolumeObj, HideWireframe);
#endif

About the other error. Sounds like unity has a keyword limit. I didnā€™t know that. Could you ask support about that?

I think we should use things according to its original purpose. This is an existing method and it works as expected. If you want to compare, UDK has this feature. The idea is to place it in the world, without moving it. Also, its a box/rectangle and it has an ending, what you call wall. Thatā€™s how it works.

1503640--84795--$AutomaticConstDensityFogVolume.jpg

ā€¦
Hi David !

Im very glad to See ā€œFinalyā€ some more works yours Published.
Been Following you since Your very first Udk Works days ā€¦


Thank you also to make this Asset Affordable.


I think this project yours is amazing / as we still donā€™t have true volumetric Light scattering fog methods in unity ā€¦


Still i miss some very important features in this asset that are basically a Most important ā€œBuy nowā€ Game Changer .
That is :

  1. Having Projected Textures Controlling the fog Density
    1.1) This could be done in 2 Ways
    1.1.1) Low Resources Method / opengl dx9 :
    1.1.1.1) Planar projected / Project in Either X,y,z a Texture that controls the density
    1.1.1.2) Triplanar Projected / Project in Both Xyz Planes at same time .
    1.1.2) High Resource Method / Dx11 :
    1.1.2.1) True Volume 3D textures That Control the Fog Volume .
  2. As well Allow animation of Projection / or Volume Textures
  3. The volumetric or projected Densities should also inherit colors from textures.

This is quite like a Very Most important features Set Out of this project.
Do you think you can make it for the next Major Revision on this ?

You can Also Double or even make a new Asset version Whenever you are able to do that
And Sell a New product like 5x Times more expensive : Like at 50$
Right After you are able to implement All those ā€œmost neededā€ features i mention above.
As its a Major Game-changer Feature Set ā€¦


ReCalling And Supporting for What User @Antigono is asking :

  • Having For Volumes to Work not just in cubes but also in Spheres / allowing Volume Fallof Booleans ā€œas udkā€ but not just also on custom geometry / As well Having Planar or even triplanar Falloffs That we can Overlay and adjust for the fog effect not ending in a Rectangle as user mentions is also something very needed ā€¦

I know this things got Alot of time and involvement needed, and maybe you just want to release your oldest research Because many people Asked you and thats it, No more improvements ā€¦

But game Development is as much Demanding as you know more than ever is this days ā€¦
ā€¦ And you can actually win more money if you Top up / On those More Professional Needed Features.

IM Especially looking forward the possible evolution in all those in this Unique like no other unity extension.


As well we are all looking forward to have more of your Development Like The Skin Shaders / And Full Atmospheric Environmental Lightning Scattering plugins You got in the oven There : David Miranda: Atmospheric Rendering for Dynamic Light Transitions


Thanks for being here and making the Difference in Professional Quality Achievements out of unity, therefore pushing unity to another bounds. Your Research is always extremely welcome.


With my Very Best Regards

Trish Dian.
TRIAX GAME STUDIOS / Technical Production Admin

Wow! Awesome feedback, thanks!

Custom shapes:
That requires a completely different method. Im using a ray/cube intersection algorithm for this. And thatā€™s what it does, it models a cube.

Falloffs/noise:
Well, I have never worked with 3D textures, so Iā€™ll have to learn about that. Really interesting indeed.

Other tech:
I canā€™t release my Skin or atmospheric system, since it was done for ā€˜The Forestā€™ game and I got paid for that. We also used Sunshine volumetric shadows, soā€¦
But well, Iā€™ll listen the peopleā€™s request to bring them what they need. Thanks to Robert Briscoe and others, I decided to do this plugin :slight_smile:
Im not even a programmer, but Im doing my best. Indeed, Im working as FX artist for the game Rime, soā€¦ hehe, nothing to do with unity or graphics programming :stuck_out_tongue:

Thank you!

The latest version fixed it, thanks!

awesome

Really nice fog! Iā€™ve been playing with this for a little while now and have begun testing on iPhone.

I have noticed a drop of about 10FPS on my iPhone 5. So from about 30FPS to 20FPS on a dense jungle scene. Iā€™m assuming this is solely down to overdraw.

I was wondering if there is the possibility of any further shader optimisations as I really like the effect.

Hi,
great Asset!
But I had some problems with your shader when scaling the volume to very high dimensions. On the screenshot you can see the artifacts that are visible . The volume scale is 9000x9000x9000. Are you aware of this problem with high scales? Is there are a solution? (I played with a terrain from Worldcomposer that has very high dimensions and want to give the scene some fog atmosphere. With your shader it looks really cool, but I had problems with these artefacts. When I fly over my terrain I get weired flickering from the fog shader)
1508115--85291--$fogVolume.jpg

I had those issues too. Switch your Camera Render Path to Deferred Rendering. Should do the trick

Also make sure your Camera far clip is set to something big so the fog renders properly

Thanks for the info! Switching to Deferred Rendering didnā€™t work but I realized that when I increase the Near Clipping Plane of my Camera the problem is almost gone.