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 sundayCoder · May 10, 2012 at 01:52 PM · clippingdistortionrefraction

distortion/refraction

Im trying to get an heat distortion effect into my game, I tryed different tecniques, for example using the the material: Fx/glass/stainedBumpDistort and putting it on particles, this works perfectly, but Objects beeing in front of the particles also become distorted. Looking at the pro-water, it seems to have the same effect, but the waterscript fixes this using "clip-plane offset", setting the nearplane of the camera to the refractionplane, so objects in front dont get distorted. Someone has an idea how to transfer this clip-plane-thing to other objects/shaders?

Thanks for looking into this...

edit: screenshot of the effect: character standing in front off a cube with Fx/glass/stainedBumpDistort(no diffuse, just normalmap) material: alt text

distortion.jpg (76.8 kB)
Comment
Add comment · Show 3
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 syclamoth · May 10, 2012 at 01:55 PM 1
Share

Sounds like a z-sorting issue. $$anonymous$$ake sure your particles are sorted properly- there are some settings in the renderer for tweaking this kind of thing.

avatar image sundayCoder · May 10, 2012 at 02:24 PM 0
Share

thanks for ur reply, i tryed tweaking the sorting modes, but this has no impact. This also happens when i use no particles but a plane or another solid object. Also i should have mentioned: the objects in front of my particle/plane/whatever dont get distorted completly like objects beeing behind. It looks like the object in front is drawn twice, one time distorted and onother time on top of that without distortion, but the distortion is still visible outside the silhuette of my object (hard 2 explain ^^).

avatar image syclamoth · May 10, 2012 at 02:35 PM 0
Share

I think I've experienced a similar problem, but I'm not sure how I fixed it. In any case, it's a subtle bug with the shader. I can't really help you that much there- my experience with shaders amounts to basically hacking together mods of existing shaders, and very basic surface shaders from scratch.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ScroodgeM · Jul 20, 2012 at 12:10 PM

solution depends on technique you use for this effect:

  • if this is a shader only effect, then you need to render distortion AFTER all that should be distorted, but BEFORE everything that should not. this can be achieved by setting shader queue in shader declaration

  • if this is a render texture with posteffect effect, then solution is layers-separation. e.g. you should use layer for distortion object and turn on render of that objects only to this camera

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

6 People are following this question.

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

Related Questions

LWRP - particle shader - Distortion for Heat 2 Answers

Shader Forge : trying to get refractive particles 1 Answer

Glass Refraction Shader 2 Answers

How do I make refraction visible in 2d mode? 1 Answer

Texture distorted locally 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