Can I paint alpha?

I’d like to be able to paint alpha, so that the paintbrush makes things visible as it passes over. I can make the paint work, using an attribute node to feed the paintmap layer into a mix shader, but the alpha value doesn’t change. I’ve read the manuals and various tutorials, but I can’t seem to make it all come together. What am I missing?

Edit…Looking for link

I don’t think you can paint alpha directly using dyamic paint, but you can paint white and use that to mix transparent with something else. Explain exactly the effect you want. Also check out this link. There’s a few ideas tossed around, I make suzanne dissapear using a dynamic brush to mix transparent.

looking fro link…

Yes, I tried to paint white but I couldn’t work out what to do with it once I had it.

The effect I’m trying to achieve is like a stargate or a transporter, so that a transparent object becomes visible as it moves through a fixed, thin object. If you can make suzanne disappear that sounds like a good place to start.

I think you are trying to do something simimar to this rushed example. I can’t find the old thread but this is the jist. A sphere brush (pure white) paints a well subdivided cube. The cube has a vertex color group called ‘Col’. The canvas paintmaps/wetmaps are both set to Col. before the brush touches the canvas it is total transparent, after it is some material (glossy red) It doesn’t have to be transparent, but I think that’s what you asked for. This quick example shows the effect.

Make a plane that is used as an occlusion object and send its pass from a separate layer, then use it for alpha of emerging object in compositor.

Instead of dealing with insanely subdivided meshes and choppy results, it’s just better to bake an image sequence.

Tip: To re-use the image sequence in the node tree, select only the first image or it will fail… silently.

Or else, you can just forget about Dynamic Paint and animate a threshold in the node tree directly. The passage through the stargate happens along a single axis. All you need to do is to extract the appropriate coordinate and to compare it with a threshold. If it’s below, the material is solid, otherwise transparent (or the other way around). The hardest part is to synchronize the threshold with the event horizon… And that’s not really hard. :wink:

For example, I made this material:

It’s a bit more complicate than what you need because it can make objects disappear and appear as they go through the stargate.

The Color Mix node allows me to choose in between entering (0) or exiting (1) the event horizon. To make the object re-appear, I set the Color Mix to 1 and I animate the value of the “Less Than” node from 1 to 0, from the moment of contact with the event horizon to the moment when the object is totally through.

With this material, here is Suzanne coming out of the stargate, seen from both sides:

Easy as pie! :smiley:

Thanks for all those suggestions. blenderallday’s method is what I was trying to do, and I’ve got it working now. I was so close! I may try Kaluura’s threshold method too, because I do want it to work both ways.

Thanks again!

I didn’t want to totally highjack your thread so I created another one with more details, a video… and even the blend file:

Have a look! :wink: