- Home /
Fading out the edges of a mesh without using a material
How can I mask out the edges of mesh so that the alpha fades to zero independently of the material? I am making spell effects and I am wanting move the materials offset values to animate it but I want the tops and bottoms of the mesh to fade out. The material I am working with has it's own alpha transparency values, so I would need the alpha of the edges I want to fade out to not be part of the material.
I have seen it done in a tutorial I watched, but they changed the alpha of the mesh in Maya (or something I don't have the money for atm) and I use blender. I have scoured blender tutorials for a way to do this with little luck. especially since I've read that Render Cycles do not operate well when imported into Unity.
Does anyone know of a way to do this in blender in a way that works when it is imported into Unity? If anyone has a different workaround and could point me in the right direction to a solution I would be very appreciative.
Well, if you have the tutorial you probably should show it. By your description it sounds kind of undoable, since the material is the one that decides what get's rendered and what doesn't. The only ohther thing I can think of is reversing the normals of the mesh and that way they won't render, perhaps you could reverse them depending on the normals but I wouldn't do that since it's easier to just change the shader and it will be calculated by the GPU as it should.
What I would do is add a secondary alpha mask to the shader and merge it with your oringinal one in there in the frag function. Even if you rotate the uvs or something to make some crazy animation for the alfa, it shouldn't affect the second alpha since it would depend on the position of the normals and the light alone.
Your answer
Follow this Question
Related Questions
How do I properly apply a transparent texture to a mesh? 2 Answers
Is there a working transparent reflective shader avaliable? 2 Answers
Box mesh exhibiting odd collision with 1st person controller - how to fix? 2 Answers
Missing meshes when importing fbx from Blender 5 Answers
Mesh breaks apart when using vertex displacement with shadergraph. 3 Answers