Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
3
Question by jefequeso · May 31, 2015 at 12:22 PM · unity 5fogheight

Unity 5 Global Fog height?

I'm trying to have my level fade upwards into black. In 4.6, I used Global fog to do this, but when I'm try to do the same with Unity5, no matter what settings I change it always just acts like normal fog. Things fade to black (or whatever color I set the fog to in the lighting menu) based on their distance from the camera. It completely ignores the height setting.

Anyone know a solution to this problem?

Comment
Add comment · Show 4
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 JennyHide · Aug 20, 2015 at 08:29 PM 0
Share

Did you work out what was wrong?

avatar image jefequeso · Aug 20, 2015 at 10:31 PM 0
Share

Not yet I'm afraid.

avatar image JennyHide · Aug 21, 2015 at 12:35 PM 0
Share

I've decided to just use the old GlobalFog.js and GlobalFog shader files from Unity 4. You can download them here - http://unity3d.com/get-unity/download/archive

avatar image jefequeso · Aug 21, 2015 at 02:03 PM 0
Share

Ok, I may have to use that. Thanks.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by FortisVenaliter · Aug 20, 2015 at 09:23 PM

You need to use the new Fog post processing shader on the camera. It can be imported with the built-in "Effects" package. Not sure if that's in the non-pro version though.

Comment
Add comment · Show 4 · 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 jefequeso · Aug 20, 2015 at 10:31 PM 0
Share

Are you talking about global fog? Because that's what I've been using :(

avatar image JennyHide · Aug 21, 2015 at 12:36 PM 0
Share

The height option doesn't seem to do anything in the new (Unity 5) GlobalFog post processing script/shader.. Unless I'm missing something.

avatar image FortisVenaliter · Aug 21, 2015 at 01:59 PM 0
Share

It seems to work for me, but it's only when the height is below the specified value. I'm using deferred path, other regular settings. Should be pretty easy to modify the global fog shader from there to reverse the direction.

But also, keep in $$anonymous$$d the fog does not affect the skybox. Only level geometry.

avatar image JennyHide · Aug 21, 2015 at 06:38 PM 0
Share

You're right - it does work. I didn't play around with it enough. The problem was with the other options I had set. With "Distance Fog" also ticked, the fog was dense enough that I couldn't see the limited height part changing. When I reduced the density of the Fog under the Lighting window, Scene tab, I could see it. (Also, if Fog is ticked as well as using the GlobalFog script, it doubles the intensity of the distance style fog).

avatar image
1

Answer by alexandresk · Oct 31, 2016 at 02:58 PM

I was having the same problem and find the solution.

First have to call

 using UnityStandardAssets.ImageEffects;

I can access bloom with that but not Global Fog. It is just because global fog is not public, so open the script and change the

  class GlobalFog : PostEffectsBase

to

 public class GlobalFog : PostEffectsBase

and access with

 yourcamera.GetComponent<GlobalFog>().height = value



Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Global fog in Unity 5 ignoring height setting 0 Answers

PostprocessBuildPlayer wont start on Unity 5.1.1f1, Mac 1 Answer

Unity 5 Global fog with transparency issues 2 Answers

How to make only part of my scene foggy 2 Answers

How to change fog color based oh height? 1 Answer


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