Giter Site home page Giter Site logo

siimer / unity-volumetric-fog Goto Github PK

View Code? Open in Web Editor NEW
269.0 11.0 39.0 233.83 MB

A volumetric fog implementation in Unity.

License: MIT License

C# 64.20% HLSL 7.19% ShaderLab 28.40% Smalltalk 0.21%
volumetric-fog raymarching fog volumetric volumetric-lighting unity

unity-volumetric-fog's Introduction

Fog result 2019 dec.

Volumetric Fog

Volumetric fog implementation in Unity. Made originally as a part of my Bachelors thesis (which you can read from here). Now I am just improving it in my free time. Does not currently support the new HD render pipeline that came in Unity 2018.

How to run:

  1. Clone this repository (git clone https://github.com/SiiMeR/unity-volumetric-fog.git)
  2. Download Unity (version 2018.3 and later supported. To use on earlier Unity versions, please clone an older commit, for example 3314461facc824a171fd859fdd95bab180fd8c48 supports 2018.1)
  3. Open the project in Unity
  4. Open the scene Forest (under the Scenes folder) and press play
  5. Fog settings can be changed by selecting the CameraAndFog gameobject, which is a child of the Player gameobject in the scene hierarchy.

Enabling benchmark mode

To enable benchmark mode, enable the Animator and Benchmark components under the 'Player' gameobject and disable the Player script. Additionally, enable the 'Text' gameobject under the 'Canvas' gameobject. Benchmark results are saved to AppData/LocalLow/DefaultCompany/unity-volumetric-fog on Windows.

Default controls

W,S,A,D - Fly around
Mouse look - Look around
Shift - Fly faster

More screenshots

Fog result image 5 Fog result image 1 Fog result 2019 jan.
Fog result image 2 Fog result image 3

unity-volumetric-fog's People

Contributors

siimer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unity-volumetric-fog's Issues

New Scene Setup

Hey, so first of all, not sure if there was an update but it works perfectly in the demo scene for me on Unity 2021.3.

I've tried porting this over to another project to experiment with it but I can't get it to work.

What I did:

  • Added the VolumetricFog script to my Camera.
  • Added the MoveSun script to my Directionnal Light.
  • Added all the required assets in side the inspector to the VolumetricFog component.
  • Added an EventSystem.
  • Created a FogOptions scriptable object and set it up (also tested this in the demo scene where it worked, to make sure my settings were ok).

Am I missing something?
The images noise1 and BlurNoiseTiled64 seem applied to the camera (or at least the scene gets darkened) but nothing else happens, and no errors also, so I feel like I must be missing something that's not documented?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.