I'm working on making a video that looks like anime. I'm trying to use openGL viewport render to do the bulk of the work and it's going good, animation, characters, background and sky is all done and viewable in the viewport.

How can I use the models that have already been animated and textured as a mask so that if I want to make a cool effect outside of the viewport render, I can overlay that effect onto the scene? What is the best way to accomplish this? For example, if I have a 3D man and like the way the viewport renders him but want an aura type effect around him, how would I do this?

My file is too big to share but let me know if you have any questions about it. Everything in the scene so far is a 3D model, no image sequences or videos at the moment, though I may use image or video sequences or for effects.


Most of the "real" solutions are designed to be used from the Blender Internal Renderer or Cycles, not from the OpenGL Preview. You can still do it with the OpenGL Preview, but I'd really recommend using BI to get the look you want. It's going to provide you A LOT more functionality for compositing, editing, and effects.

Your best solution is going to be a compositing approach. This is the way it's done ;-) What you need is an object-specific mask, which you can produce by rendering out an "Object Index" pass. You'll have to specify how you want to get this pass.

  1. You could render it out without any other passes selected, which would work a lot like a regular render. You'd get a psychedelic version of whatever frame you were rendering (more on that in a minute).
  2. You could render to OpenEXR, which will save each of the passes separately, but in one file per frame; then you'd bring the EXR into the compositor and the input node will have a spot for "Object Index" as well as any other passes you rendered.
  3. You could set up compositing nodes with separate "File Output" nodes for each pass that you want. This would give you individual files for whatever you wanted (like individual passes), and you can save them into their own directories, or whatever.

Once you have this Object Index pass, you can modify it (in Blender using compositing nodes or in another tool like AfterEffects) into a mask for whichever object you need. The Object Index pass looks like a psychedelic version of your scene. Each object is given its own unique color, and then rendered without any shading at all. You can modify that into a b/w image that masks out the one (or more) object you want. Then you use that mask to composite in whatever effect you're trying to produce. You can even use the same image to produce several masks for different objects.

The other approach is to use Render Layers. Move an object that you want masked out to another layer from everything else. Then select that layer in the "Mask Layers" section of the Scene settings, and you'll get a render with a "hole" where that one object is. You can then pretty easily convert that image into b/w which you can use as a mask to do your effects in Blender, AE, or whatever compositor you're using.

Do some research on Render Layers, Mask Layers, and Object Index, and I think you'll find what you need.

|improve this answer|||||

What I would do is to add an object to your scene (which I will refer to in this answer as a "screen object") parented to the camera in such a way that the object to which you want to apply the special effect is always between the camera and the screen object. While plane is an obvious choice for a object, it is not the only one. Some effects might be better applied to a hemisphere screen object, and others might do better on a portion of an elliptical cylinder. The choice of object, and the size would depend upon the specific effect desired, and it's possible there could be more than one screen object in order to realize the desired effect.

The screen object is assigned a transparent material, to which is applied your effect as an image or movie texture. One approach might be to hide the screen object in the scene until just before you wanted to create the effect in the final animation, then unhide the screen object with the material and texture assigned. When the effect has played out, then rehide the screen object. There could be more than one screen object at the same time, hidden or unhidden as needed, and other techniques, like texture swapping could be applied, too. And I'm not sure there's any reason that multiple screen objects could not be applied at the same time, if needed.

Unless I've missed something (and that's possible, since animation is not yet a very significant portion of my personal skill set), using this technique would allow the character to be its own mask in "real time".

|improve this answer|||||
  • $\begingroup$ I think this is what I need, So you are saying essentially sandwich my character between two transparent plans and or 1 transparent cylinder (situation pending) then play the rendering of the effect onto the plane or cylinder, or whatever i want. $\endgroup$ – Steven Aug 2 '15 at 23:55
  • $\begingroup$ @Steven, some situations may need your character between the camera and one screen object; some may need two or more screen objects, with the location of the character relative to the various screen objects being whatever works best for the particular effect you want in a given scene. $\endgroup$ – brasshat Aug 3 '15 at 1:04
  • $\begingroup$ I think this should get the job done, I was looking for something a little different but i recently learned somethings that might make this question irrelevant lol Thank you! Ill let you know $\endgroup$ – Steven Aug 3 '15 at 1:08

Your Answer

