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 Scribble · Sep 27, 2012 at 07:36 PM · waterfog2.5dsidescroller

Water volume for Sidescroller

Hi all, I'm currently building a 2.5d sidescroller and my project has hit a slight snag, although its mainly a visual problem i've been trying to find out how the water in the example below has been made.

I can deduct from the image and the game in motion that water volume is contained in a sqaure (because of the sharp contrast between the color of the water, and above it), possibly vertex animated (suggested on Polycount.com) - the animated motion isn't the problem. The problem is how that contained fog is done? Though if its a seperate entity, then how is the water surface preventing any fog from "bleeding" through?

I have a feeling its all mainly shader related, but i'd love to hear if anyone has cracked this!

Any help at all is appreciated, even if its just pointing to similar solutions, i'm really stuck!

alt text

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
1
Best Answer

Answer by robert · Sep 28, 2012 at 04:05 PM

To know exactly what is it doing, you could try running it through Intel GPA or similar.

But I guess there are two ways to go about it, in both cases it's a plane with the islands cut out, maybe some vertex animation along the top edge, i.e. the surface of the water.

  1. Just a simple transparent shader with a blend mode that looks best, not necessarily SrcAlpha OneMinusSrcAlpha. You can experiment with different options to see what effects you can achieve.

  2. A shader with a grab pass, that allows you to read the framebuffer behind whatever you have drawn and do anything with it. This approach will not only allow you to do any processing on the color, but also do any wavy distortions you like.

I hope I understood your question correctly :)

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 Scribble · Sep 28, 2012 at 10:45 PM 0
Share

Excellent Robert! Thanks a ton - i'll get right on it :D

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

10 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

Related Questions

Foggy Water? 1 Answer

Is it possible to use layers with fog? 0 Answers

Trying to change fog when entering a collider trigger! 0 Answers

Input.GetAxis to act like button 1 Answer

Water Shader Reflection & Transparency Distance 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