keying transparency question

keying transparency question

i'm currently trying to have an object fade out over a few seconds. I first thought this would be something fairly simple but it's proving to be quite a challenge.

I've keyframed the material and it does become transparent, however the object is still creating full shadows even though it is now transparent. I've added a render tag to remove the cast and receive shadows option. The problem is that I can't spline the keyframe to make the removal of shadow a curve, one frame it's on, the next it's off. The result is an abrupt "lights on" effect on the object.

Is there a simpler way to have an object fade out over time?
 

Attachments

  • anim-shadow.gif
    anim-shadow.gif
    118.9 KB · Views: 1,360
  • anim-gui.gif
    anim-gui.gif
    139.9 KB · Views: 1,390
The quick, dirty, and 100% effective solution is to render two passes (with and without the thing) and then do the transition in post.

Haven't we been through this before?
 
The quick, dirty, and 100% effective solution is to render two passes (with and without the thing) and then do the transition in post.

Haven't we been through this before?


Yes we have! I guess i'm clinging to that hope that I can achieve this in C3D within a single pass. I just don't like the idea of 2 passes since it usually means double the render time.
 
Edit: I figured it out.

Make a texture that's completely transparent at one edge and completely opaque at the other (see first attachment for the alpha channel) and then animate the UV offsets.

Here's the complete project: http://loewald.com/loewald_public_webdav/boojum.zip

Here's a sample video showing it working:http://loewald.com/loewald_public_webdav/boojum.mp4

Note that I didn't finess the UV animation perfectly, so the box doesn't quite completely disappear. Also note that because of the way this works, the disappearance is actually more elegant...

Also Note: this technique wouldn't work for an object with a non-uniformly colored material.
 

Attachments

  • alpha.png
    alpha.png
    1.4 KB · Views: 1,287
  • boojum.jpg
    boojum.jpg
    16.4 KB · Views: 1,261
Last edited:
  • Like
Reactions: DEO
Edit: I figured it out.

Make a texture that's completely transparent at one edge and completely opaque at the other (see first attachment for the alpha channel) and then animate the UV offsets.

Here's the complete project: http://loewald.com/loewald_public_webdav/boojum.zip

Here's a sample video showing it working:http://loewald.com/loewald_public_webdav/boojum.mp4

Note that I didn't finess the UV animation perfectly, so the box doesn't quite completely disappear. Also note that because of the way this works, the disappearance is actually more elegant...

Also Note: this technique wouldn't work for an object with a non-uniformly colored material.


This looks very promising, however I *always* struggle with the UV mapper/unwrap UV functions. I've tried to reproduce your boojum file, I loaded the alpha into transparency, then animated the UV offsets. It didn't work probably because i'm not doing what is needed on the UV front. Can you explain a bit more in details the steps to fitting the alpha to the cube with the UV editor?

many thanks
 
I started trying to make a video tutorial, but there's too much baby-related background noise, so I'll have to go Old School :)

1) It helps to load the alpha channel bitmap into the color channel so you can see what you're doing.

2) Assign the material to your object.

3) Use the UV Mapping tool (in planar mode) to move and scale your UVs so that the object is entirely opaque (it will look black if you've done step 1). Don't forget to Write UV Coordinates.

See the first screenshot.

4) Now, click on the texture assigned to the object which will allow you to adjust UV offsets for that material.

See the second screenshot.

5) Go to where you want to start the object's disappearance. Right click on the keyframe record button and Record UV Offset. (Note, you MUST have the material next to the object selected to do this.)

6) Go to where you want the disappearance to end.

7) Now click on the UV Offset Y value adjustments and you will see the gradient moving through the object. Adjust it so the object is completely white (transparent).

8) Record UV Offset.

9) Now watch the animation -- the material should "slide through" your object. If it looks good, Remove the gradient from the color channel (it should still be in the transparency channel).

Done.
 

Attachments

  • Picture 1.png
    Picture 1.png
    102.2 KB · Views: 1,275
  • Picture 2.png
    Picture 2.png
    37.1 KB · Views: 1,265
Last edited:
Easy Fade

I think the following is a much easier method of fading objects in and out without the need for an extra alpha image or fiddling with UV coordinates. At least when you do not need the reflection, emission, and alpha controls of a regular material node.

Simply load your texture into a Membrane node and animate the Power and Threshold values.
 

Attachments

  • Full_Opacity.gif
    Full_Opacity.gif
    22.2 KB · Views: 788
  • Transparent.gif
    Transparent.gif
    8.2 KB · Views: 791
I'm not sure if the ability to key material properties existed when I wrote my original response or not, but if so then my original response was garbage, and it's MUCH easier to simply animate the material shader's "transparency" property (easier than messing with membranes which look different from regular materials on top of anything else).

In order to key a material's properties, click on the material and then right-click on the record button to pick which property to key (e.g. Transparency). Make sure the refractive index of the tooth (or whatever) is 1. If you're using reflection or specular you'll want to key them too, or the faded out object will still have visible reflections/highlights.

Note that animated textures do not get redrawn correctly as you move the timeline around.
 

Attachments

  • Screen Shot 2012-02-21 at 5.12.49 PM.PNG
    Screen Shot 2012-02-21 at 5.12.49 PM.PNG
    58.7 KB · Views: 779
Last edited:
Yes - keying transparency works and is even easier and more flexible!

I too suspect when this post was originally made we might not have been able to key transparency. Probably why I didn't even think to try the obvious and just jumped right into something more complex :(
 
You can't key something that isn't there. The only reason to use a metal shader is anisotropic blur, aside from that if you need to fade a metal, use the material shader.

Or ask Martin to add anisotropic to the material shader.
 
Back
Top