- Home /
How to make a spread grid effect, like the unity-chan c86 demo ?
I want to make a spread grid just like the unity-chan c86 live demo. In my opinion, it's a big texture or a model like a spider web, and then you can change its transparency, but i dont know how to do this.
unity-chan c86: http://unity-chan.com/events/c86/WebPlayer/
Since the webplayer is no longer available, there's a recording of the webplayer on Youtube just for reference
Answer by Bunny83 · Oct 10, 2014 at 07:12 AM
This could be done with a a circular gradient and use this approach. You just need to write a shader that doesn't cut at one point but shows a section. It'S also possible to have a fading area. However using a gradient map for such a huge area would either doesn't look good or you would have to use a huge texture.
Another approach which is independent from the size is to use a custom mesh that has a single vertex in the center. Now you can provide a vertex attribute (vertex color for example) that is 1 in the center and 0 on the remaining corners. That way you get a perfect smooth gradient in the shader. Now you just need to select a range from that gradient based on a shader property.
I don't have the time to write that shader at the moment, maybe later ;)
edit
Had some time and have created a "small" example with a simple mask shader i've just written. Below the webplayer you'll find a download link for a unitypackage containing the whole example scene.
Thank you so much!! You are so nice! I still have a lot to learn.
Could I use your shader for my project?? what in "small" example package
Of course :) There's nothing special about that shader. Though note that the image i used i just downloaded from the net. I can't remember the license but i would generally assume it's not for commercial use. So use your own textures. You can do what you want with the shader or the script.
Your answer
![](https://koobas.hobune.stream/wayback/20220613164755im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to blur my background 2 Answers
Subnautica like underwater effect / rays 0 Answers
How to do a heat-haze effect in unity (FREE)? 1 Answer
Create wind over sand effect! 2 Answers
Help with my Light Flicker Script... 1 Answer