- Home /
Blending in an object partially
Hey there,
I'm about to despair of my idea. I just want to blend an object in. Like a growing path, I would like to display the object part by part. You can imagine the effect like an object growing out a plane, but the plane would be invisible. I experimented a lot with shaders, but the closest I came is fading out an object which is near the camera, but I want it to fade in/out near another object. Maybe you have some idea how to fade / reverse grow one object when it is near another. Thanks a lot!
Answer by Peter G · Jun 03, 2010 at 12:14 AM
One idea would be to have your objects alpha channel gradually change from white to black. Then use a transparency shader and use a script to change the cutoff value over time. This method is probably easier in most circumstances unless, you have very complicated UVs or overlapping UVs and it is difficult to get a seamless gradient alpha. Or if you need the alpha channel for another part of the shader such as specular.
Another idea would be to experiment with using a procedural mesh modifier that changes the alpha of the vertex over a period of time and then use vertex colored script to show the transparency. Also, with the shader, you could use a non-vertex colored shader and have a CG program that reads the color and applies the fade.
Here's some links.
Thank you so much! I figured it out using the $$anonymous$$esh and checking the vertices vs. a local coordinate. $$anonymous$$ight not be the best solution, but it's working! :-)