adamSpline Posted December 17, 2011 Posted December 17, 2011 Hi all, I am creating a scene in which I need an object clips out the rendering of other objects. So if the clipping object is in the foreground, it will alpha out anything behind it. I imagine there is a way to do this using compositing layers and other software. But it there way to simply designate an object so that it can do this? Thanks, -Adam Quote
Hash Fellow robcat2075 Posted December 17, 2011 Hash Fellow Posted December 17, 2011 So the object itself is basically a silhouette moving across the scene and inside it shows only... the background color? Quote
adamSpline Posted December 17, 2011 Author Posted December 17, 2011 So the object itself is basically a silhouette moving across the scene and inside it shows only... the background color? Yes, that is basically it. The scene is rendered as normal, except that where ever the "clipping object" is rendered , it renders the background color. But I am not just talking about a 2D layer, it is a real 3D object that might be partially in front of some object and partially behind other objects... except that when it is rendered, it's visible pixels simply show the background. Quote
NancyGormezano Posted December 17, 2011 Posted December 17, 2011 If you have decaled your "clipping model" already, then make the "clipping model" front projected (in model options) - and use a camera rotoscope that is all one color, ie the clipping color, or your background color. It will render the model in the background color. EDIT: also make it flat shaded = ON, and recieve shadows = OFF If you haven't decaled, materialed your clipping object, make it the clipping color, and make it flat shaded (in model options) Quote
Hash Fellow robcat2075 Posted December 17, 2011 Hash Fellow Posted December 17, 2011 An object set to be the same as the background color and set to 100% ambiance would appear the same as an object that showed the background color through it. No? Quote
NancyGormezano Posted December 17, 2011 Posted December 17, 2011 An object set to be the same as the background color and set to 100% ambiance would appear the same as an object that showed the background color through it. No? For me it's always easier, my preference to set something to flatshaded, can do it in the chor, least amount of twiddling on model. The results would be the same only if one turns off all the lights in the chor. If you want to render with lighting then the results are different. It was not apparent that he wanted to render without lights. Quote
Hash Fellow robcat2075 Posted December 17, 2011 Hash Fellow Posted December 17, 2011 Yup, "Flatshaded" was what I should have said. Quote
NancyGormezano Posted December 17, 2011 Posted December 17, 2011 If you have decaled your "clipping model" already, then make the "clipping model" front projected (in chor model options) - and use a camera rotoscope that is all one color, ie the clipping color, or your background color. It will render the model in the background color. EDIT: also make it flat shaded = ON, and receive shadows = OFF If you haven't decaled, materialed your clipping object, make it the clipping color, and make it flat shaded (in model options) I forgot to add if you make your clipping object flat shaded, also make receive shadows = OFF (if it's been textured already, and front projected in chor) Quote
Hash Fellow robcat2075 Posted December 17, 2011 Hash Fellow Posted December 17, 2011 If you need this object to literally create an alpha channel hole like the camera background is... no, A:M doesn't have an object setting like that. A second pass to create an image that could be used and composited with another alpha channel would be a likely solution. Quote
adamSpline Posted December 17, 2011 Author Posted December 17, 2011 Thanks everyone for the suggestions. I have had some success using the methods you suggested, but still some problems. Let me explain a bit more.... When I try the above technique, I am not able to perfectly key out the color because of anti-aliasing around the edges of the "clipping object". When I key it out, there are some of the clipping object's color is still visible. So, to be more exact, I really do not want the "background color", but I want no color when the clipped object is rendered. For example, in AM when you render as a png, it gives the background color an alpha value so that it is really invisible. So, if you have an object in the middle of the scene and render it as a png, the resulting image is simply an that object, with no color in the background... this object can be easily composited in an editor because the background has an alapha that makes it invisible. I want to do something similar with this clipping object... whenever pixels are to be drawn from this object, it simply renders them to an image alpha that makes a hole in the image in the shape of that object... the same thing that is done with the background for png, but do it with an object.... is that possible? -Adam Quote
Hash Fellow robcat2075 Posted December 18, 2011 Hash Fellow Posted December 18, 2011 I think what you want is called a "Matte Object" in some circles. In my notes and annotations on Jeremy Birn's "Digital Lighting and Rendering" I give a work-around in A:M for such an effect: http://www.hash.com/forums/index.php?s=&am...st&p=323268 This will need two passes and a compositing program that will allow you to work with alpha channels. Rendering to PNG may be usable but I prefer Targas since their alpha channel is more standard. Quote
NancyGormezano Posted December 18, 2011 Posted December 18, 2011 When I try the above technique, I am not able to perfectly key out the color because of anti-aliasing around the edges of the "clipping object". When I key it out, there are some of the clipping object's color is still visible. So, to be more exact, I really do not want the "background color", but I want no color when the clipped object is rendered. For example, in AM when you render as a png, it gives the background color an alpha value so that it is really invisible. So, if you have an object in the middle of the scene and render it as a png, the resulting image is simply an that object, with no color in the background... this object can be easily composited in an editor because the background has an alapha that makes it invisible. ... whenever pixels are to be drawn from this object, it simply renders them to an image alpha that makes a hole in the image in the shape of that object... the same thing that is done with the background for png, but do it with an object.... is that possible? If you render your image with 1 pass you will not get any antialiasing. But you will get the "jaggies". See up loaded pngs. I took the orange colored one into PS, and "selected" with 0 tolerance to get the 2nd png. My guess however is that you will probably have to render normally, and then at least do another render to isolate your "hole" object mask/matte. I did something similar (but not the same) just recently. I wanted to isolate some models from their background in an animation that had already been rendered, because I wanted to manipulate the background and ground plane, separate from the characters. I didn't want to rerender just the characters (would take too long). So I rendered the characters as all black 1 pass, and the background and everything else white. I used that as a tracking matte in AfterEffects as a LumaReverse plus the original render, and then composited that result again with the original render. I was then able to insert things in another layer behind them, but in front of the background. Quote
Admin Rodney Posted December 18, 2011 Admin Posted December 18, 2011 It sure sounds like this situation may warrant the use of Boolean cutters. Specified Boolean cutters in A:M can also 'disappear' parts of a model based on the heirarchy of bones in the model while leaving others intact. It can also be used to texture objects that interact. For instance, applying all the areas of a model to a bone outside the heirarchy would leave that part visible while everything else is removed from view when the objects interact. The trick in most complicated scenes might be to make each object that will interact (clipping each other) part of the same model. I'd guess we can have separate models cut through each other but if possible I've forgotten how to do that. Quote
NancyGormezano Posted December 18, 2011 Posted December 18, 2011 I'm not getting that boolean cutters would be a solution in this particular case. From what I'm gathering Adam wants to isolate just one model as it moves thru the scene. I believe this model cuts into multiple models? But not in a "boolean way". I was under the impression that this model is occulting other models - not necessarily intersecting them. Quote
mouseman Posted December 18, 2011 Posted December 18, 2011 I was trying to do a similar thing in this thread for an effect like the "Take On Me" music video by the group A-Ha. Quote
mtpeak2 Posted December 18, 2011 Posted December 18, 2011 Won't the "Null Shader" do what he wants? Quote
Hash Fellow robcat2075 Posted December 18, 2011 Hash Fellow Posted December 18, 2011 The Null Shader removes all lighting from an object but won't put a hole in the alpha behind it. Quote
mtpeak2 Posted December 18, 2011 Posted December 18, 2011 I wonder if that could be a feature request to add an option for it to render to alpha. Quote
Admin Rodney Posted December 18, 2011 Admin Posted December 18, 2011 It could be a feature request but keep in mind that the Null Shader was programmed by Marcel Bricman. There is a topic where he shares it with the community and we (or perhaps it was more me...) leap on him to push it one step further toward knocking out/setting up the Alpha channel. Edit: Whup! Found it: Null Shader Topic by Marcel Bricman In a way this Alpha Shader may not be necessary because the same thing can be accomplished simply by making the Object 100% transparent. Adjusting the On/Off setting does something similar but the transparency gives us a little more flexibility. There are several other ways to disappear objects as well. Material Effectors is one. This works especially well if there is an area or zone that something will pass through as it will disappear when entering and reappear when exiting. Dynamic interactions can be used to force objects to react in various ways upon getting closer to or farther away from another object. There is a Tech Talk that demos a basic setup for creating switches that drive actions/reactions. Expressions could be set up so that if a certain value is exceeded the object will become fully transparent or inactive. Steffen also programmed his Render Passes plugin for v11. We yammered on about A:M having this feature so much back in the v12 timeframe that we really should be exploring and documenting the heck out of that. I confess I don't know enough about it. If the plugin does in fact render everything separately then no clipping would be necessary, we'd just have to tell A:M what to render out of all the variously rendered passes. The images below show the options available in the plugin/wizard Render Passes: Edit: I tested the Render Passes Plugin and it does work in current versions. I'm not sure the extent to which everything works however. The main deficit with the plugin appears to be the ability to adjust the surface transparency although this could probably be controlled through a decal. Info on the plugin can be found here: http://www.sgross.com/plugins/old/plugin3/index.html (Apologies if this is straying too far off topic but as you can see when it comes to 'clipping' objects there are many approaches and attacks) Quote
NancyGormezano Posted December 18, 2011 Posted December 18, 2011 I am creating a scene in which I need an object clips out the rendering of other objects. So if the clipping object is in the foreground, it will alpha out anything behind it. I imagine there is a way to do this using compositing layers and other software. But it there way to simply designate an object so that it can do this? To get back to the original question: In case it isn't clear, currently, the answer is NO. You will have to do some extra steps and use that info in a compositing program. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.