- Home /
2D Water in Unity
Hi im looking to create a water effect in unity like this http://www.patrickmatte.com/?p=29
I haven't used custom shaders in unity that much and don't know how I would go about getting an image of just the physics circles and bluring then rendering that. Any help would be greatly appreciated!
Despite its appearance, this is actually quite an advanced rendering technique. In order to do this, you would need a moderately sophisticated knowledge of shader program$$anonymous$$g, regular program$$anonymous$$g and Unity itself. I think the main reason this would be difficult, is that this section of Unity (rendering) goes pretty much undocumented. The documentation is there, but you won't understand it unless you already know what it does. I'm assu$$anonymous$$g for the circles, you could simply use a circle sprite with a 2D Rigidbody/collider combo, but the actual process of rendering the image and blurring it is moderately complex. It would require a camera setup for this specific purpose, relative rendertextures, multi-tap blit functions, etc.
I would suggest just trying to learn normal shaders, then co$$anonymous$$g back to this in the future. A good place to start is the Unity manual, either go through the tutorials, or learn shaders the way I did; experimentation with their shader examples.
https://docs.unity3d.com/$$anonymous$$anual/SL-SurfaceShaderExamples.html
Fluid simulation is, generally speaking, hard. However the source for that example is linked right there on the page, meaning you just have to translate from Flash to Unity. Have you tried that?
Your answer
Follow this Question
Related Questions
How to create 2D pixel water shader ? 0 Answers
Is there a way to lock velocity? 3 Answers
Get information on ignored collision 1 Answer