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
0
Question by GeorgeRigato · Nov 13, 2012 at 04:55 PM · shaderwaterreflectioneffect

Puddle reflection effect

Is it possible to have real-time reflection on something like a puddle all over a terrain?

the effect intended is this:

alt text

I've done some research and the possibilities are:

use some 3D application to create the effect and import the mesh and materials to unity.

or

use some texture and shader to create the puddle over the floor texture and generate the reflection.

thanks in advance.

puddles.png (449.5 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by mstevenson · Nov 17, 2012 at 08:33 AM

Your best bet is to render a cubemap in-engine and use a reflective shader to display it.

Comment
Add comment · Show 2 · 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 GeorgeRigato · Nov 17, 2012 at 01:38 PM 0
Share

Thanks for the answer. I have no experience on this, so I'll study and see what I can do. Any deeper explanations help a lot at this stage.

avatar image MarkD · Sep 28, 2013 at 11:57 PM 0
Share

I know responding to an old topic is useless, but none the less this might still be useful for people in need of that particular kind of question.

A cumbemap works but the parallax is not 1-1 and if you make it 1-1 then all objects are flat on all the edges.

A better implementation would be rendering a camera to a render texture and adjust its transform according to the position of the player.

Luckily that kind of script already exists in unity, it is the water pro script.

Here you can find a stripped down version without the unneeded water effects. http://wiki.unity3d.com/index.php/$$anonymous$$irrorReflection3 In there is also a basic shader that will implement the script below. This will give you your desired 'mirror' effect in the puddle shaped mesh.

You can always write an more advanced shader, which I am doing at the moment for making very realistic glass/mirror, only keep in $$anonymous$$d that the texture name in the shader has to be as told in the information from the link.

I did not make that script, but incase anybody reads this in search of an answer, they have it now. :)

avatar image
1

Answer by kebrus · Nov 17, 2012 at 03:25 PM

That particular image is probably achieved using different kinds of maps

  • A diffuse map that tells where the color is: in the puddle you can have the same color as the ground or any other color to get the water a tinting effect in cases the reflecting isn't 100%

  • A normal map or bump map that creates that 3d effect on the ground: in the puddle water the little rock in the middle as normals pointing in various directions but in the water parts the normal is always point up to make the water plain and the rock sticking out

  • A reflection map to tells where reflection exists and how strong: this is a black and white map where black means no reflection and white means full reflection and any gray color in between means it's translucent, in the image the puddle has full reflection, but along the edges it's starts to blurs out, notice though that the ground has some reflections here and there to make it look wet

  • A specular map for different reasons: this one is optional and i don't think that particular image has it because the reflection map usually replaces the specular map, but sometimes this map is used for additional effects like blurring out the reflection or make it shiny (think sweat on a body), i'm not entirely sure on those red and greens lights on the floor being specular maps or not

the reflection is either produced in-engine with a bunch of complicated tricks or you can use cubemaps that mimic and fake a reflection. I would go for the cubemaps

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

12 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

Related Questions

angrybot water shader lagging problem 0 Answers

Subnautica like underwater effect / rays 0 Answers

How can I Control the Strength of the Reflection in the Pro FX Water Shader 4 Answers

2D water shader effect 1 Answer

Unity Water Shadows? 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