• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by wlad_s · Feb 18, 2011 at 12:11 PM · fogheightaltitude

how to change ( decrease ) fog ( fogginess ) with altitude ( height )?

Hi,

Fog is a nice feature but, I've noticed that it is dependent only on distance. I'd like to make it dependent on altitude also.

Please take a look at these images: {

var image1: image

var image2: image

}

:)

Now, if you look closely, you'll see that things are foggier as they are closer to the ground. Areas that are at higher altitudes are less foggy and that's why sometimes, in nature, we can see the sky even when it's foggy. Because there are less water particles above us than in front of us. So they block visibility less vertically and more horizontally.

I wanted to look at the ways I could make a script for a fog that would do this. basically, there would be three additional parameters: lowerLimit, upperLimit and verticalFalloff.

But first I wanted to check with experienced programmers as would this even be possible? I've only started scripting a few weeks ago and although I'm learning pretty fast, I'm still bad at doing scripts from ground-up without some examples that are at least similar.

I've also found this: http://forum.unity3d.com/threads/76113-Volume-Fog-shader but as far as I understand, it's applied to individual objects. Also I don't yet understand where to put that code :) and if I could use it with any kind of material.

That's it, thanx.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by wlad_s · Sep 13, 2012 at 05:35 PM

As I have found the answer to this question, I will answer it myself so that anyone wondering the same thing can quickly get the answer.

There is now an image effect in Unity which does vertical fog.

:)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dradb · Nov 11, 2015 at 01:12 AM 0
Share

Where is it please?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Global fog in Unity 5 ignoring height setting 0 Answers

Unity 5 Global Fog height? 2 Answers

How to change fog color based oh height? 1 Answer

Height fog (GlobalFog) not supported on android? 0 Answers

How to get a y value from terrain at a specific x,z coordinate? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges