Author Topic: Refraction Shader Problem  (Read 2830 times)

dkirchhof

  • Newbie
  • *
  • Posts: 3
    • View Profile
Refraction Shader Problem
« on: August 07, 2014, 04:51:05 AM »
Hey,
I'm using SUIMONO version 1.48.
In my current project, i just want to have this nice underwater refraction effect. so i put a plane (saved as a prefab in my assets) into my scene (directly underneath my camera). the shader i'm using for the plane is the "effect_refractionViewDepth" one.
Now i would expect to see the refration effect, but i don't.

After selecting the prefab (plane with refraction shader) in the project view (not scene view!), the effect will appear?!
I don't change any settings. I just select the prefab.

After building the scene, i can't click on the prefab, accordingly i only see a transparent plane.

I hope someone can help me to fix this problem.

Daniel

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
    • Tanuki Digital
Re: Refraction Shader Problem
« Reply #1 on: August 07, 2014, 07:20:00 AM »
Hi Daniel,

If all you need is the refraction effect then try the following....

1) drag a WATER_Module prefab into your scene.
2) open it up and select the "effect_refract_plane" object.
3) rename this to something else, like just "effect".
4) drag this object onto your main camera.
5) re-orient the plane so it's upright directly in front of the camera.
6) delete the WATER_Module object from your scene.

This should make the refraction effect always enabled... though I'm not sure why your initial setup wasn't working.  Let me know if you still have any problems.

-Justin

dkirchhof

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Refraction Shader Problem
« Reply #2 on: August 08, 2014, 01:27:26 AM »
Hey,
thanks for your reply.
Your steps are exactly the same i did. At first it worked, but after closing and reopening unity, it didn't worked anymore..

The effect looks close to the glass refraction. Maybe i will use another shader and animate the heightmap by changing the texture.. or i will use all the stuff and live with the overhead.
Regrettable, cause you made a very good job with your package.

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
    • Tanuki Digital
Re: Refraction Shader Problem
« Reply #3 on: August 08, 2014, 06:45:03 AM »
Hmmm... yeah that's really strange.  It SHOULD just work, and having it work at first and then not work later just seems weird. :D

You could sign up for the 2.0 beta and use the shader from there which has been updated quite a bit, but there's no guarantee it will work either, since it ought to already be working the way you describe it.
http://www.tanukidigital.com/suimono/beta/

Or if you want to send me your scene I can look and see if I can figure out what's going on.  Also please let me know more about your setup... Unity Version, Platform/Operating System etc.  You can email me directly at konnichiwa [at] tanukidigital.com

dkirchhof

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Refraction Shader Problem
« Reply #4 on: August 14, 2014, 03:18:14 AM »
Well, i've just imported the beta of Suimono 2. Et voilĂ  it works  :)
In the editor and in the build as well.

Many thanks for your support.
Daniel

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
    • Tanuki Digital
Re: Refraction Shader Problem
« Reply #5 on: August 14, 2014, 09:52:39 PM »
OK That's great to hear! :D