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
1
Question by DiGiaCom-Tech · Apr 05, 2014 at 07:26 PM · renderfogadvancedwater4

Water 4 (Advanced) - Fog Missing From Reflections

I am using Water 4 (Advanced) but the rendered reflection does not look like it is rendering fog (see attached screen grab). Is there something lacking in Water 4 (Advanced) or have I missed a setting somewhere?

As you can see in this screen grab the mountain peak in the center is barely visible due to the fog settings. But it is clearly visible in the reflection on the water's surface. The main fog render settings appear to be ignored by the reflection camera.

alt text

watre4nofog.jpg (104.8 kB)
Comment
Add comment · Show 2
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 Matou · Oct 28, 2014 at 04:04 PM 0
Share

I don't have any solution, but I just wanted to say that you are not alone... I have the exact same problem. I'll let you know if I find a work around.

avatar image Itaros · Oct 28, 2014 at 04:36 PM 0
Share

Is it hardware fog or post effect or special material?

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Matou · Mar 16, 2015 at 10:34 AM

Hi there,

Fog and water reflections seem to be a pretty tough problem. From my experience:

It used to work in Unity 4 Direct X9 with forward rendering path. With any other combination (Unity 5 OR Direct X 11 OR deferred rendering path), it doesn't.

I think an explanation for this is that, in any of the latest cases, fog seems to be performed in camera clipping space, which means, for the reflection effect, after having projected the vertices through an oblique projection matrix. This process totally distorts the depth-to-clipspace relationship by changing the far clipping plane, and thus fog computations are totally ruined. If you're into maths, see the magic details here: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf.

If you want to have correct fog in reflections, the solutions I can think of are sadly few, and not easy:

  • rewrite every shader with fog computation in world space, thus avoiding the oblique camera projection problem. This might be quite long, and it might slow down rendering performances. But maybe it can be achieved in Unity 5 by only rewriting all the FOG handling #define directives in the file UnityCG.cginc? I'm not sure however about how fog parameters are passed, and in which coordinate system they are (world space? clip space?).

  • use "hacks", like creating artificial fog zones that are only visible in reflections (using camera render layers) to compensate for the missing fog; for example a huge sphere which renders some kind of blended color depending on the real distance to the camera, maybe with soft edge attenuation, etc... This could get quite tricky and I'm not sure it would perfectly match the real fog behaviour, but it may do the trick if you don't aim for the perfect look.

I know this is quite disappointing, but I hope it shed some light on the problem. Maybe someone out there has other ideas/workarounds?

Peace.

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

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Fog rendered outside box collider 0 Answers

Implement fog settings independent of the Scene Render settings. 4 Answers

Water4 reveals all underwater objects when Global Fog is applied to the camera 0 Answers

Fog only acting on certain objects? 1 Answer

Is there a way to make lightning? 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