PDA

View Full Version : How can I "mask" objects in scene


joe-c
10-12-2007, 12:28 PM
Hello!

I have a quick question.... how can I do to mask out some objects that are animated in stage and appear from a geometry that is smaller than this objects? I want them to appear with translation only, not scaling them out or modifing its shape, i've been looking around and i haven't found anything, only a tutorial with a broken link :sad:.

I want to do this in the program windows too, not only in render time with masking operators in the Fx tree... I really want to hide geometry in stage.

Thnx!

Sbowling
10-13-2007, 04:36 AM
Create a new layer. put the object in the layer. Turn off the visibility/rendering of the layer. Look up layer in the help for more info.

joe-c
10-13-2007, 09:56 AM
Hey man, I wish it was so easy, layers are not the problem, I already have layered things in my scene, and some o them are viewed that way.

What i want to achieve is the same usage that After Effects has (e.g), i mean, masking an object in space, so when it translates appears from any place "cutting out" the part unmasked.
I don't know how to explain it...

The only option that layers have is to check visibility on/off in viewport or render, but i wnat to move an object and i want it to "leave the stage within the stage" (i don't know if it is well said), like a complex growing branch "growing" from a little box (smaller than this branch) along a curve path, but when it offsets this brach transpasses the little box, I want to cut out that part so i can't see it, I don't know if i'm explaining... (i what to do this without scaling or modifying the shape of the branch, only its translation).

Thnx!

AgustinLV
10-13-2007, 04:32 PM
Well, nice to see another country man using XSI. Creo que entendí lo que querés. Básicamente estás animando un objeto que se deforma, pero querés que quede encuadrado detrás de algún tipo de máscara? Vas a tener que usar las herramientas de composición me parece, y renderizar tu escena usando distintos passes. Agregame al msn y lo hablamos más tranqui.

bravmm
10-13-2007, 10:53 PM
yes, that was very helpfull to everyone else.....:rolleyes:
Please keep it all in English next time.

rob

AgustinLV
10-13-2007, 11:39 PM
Shame on me, I'm sorry. Actually what I wrote is not very usefull to anyone. But I'm gonna expand my idea.
What I think joe needs is to mask out some parts of his render out of the scene, but he cannot cut it with the camera since there's other stuff going on.
So, what you can do is create different passes for the things you need to animate.

Go to Rendering mode hitting the 3 button, got to Pass and hit Edit, then New Pass -> Empty. That creates a new empty pass which is essentially the same as the other, call it tree_pass for instance. So now we have to create a partition for that pass with the objects we don't want to get rendered in that pass (partitions can have individual shaders, materials, etc. assigned without affecting the default pass).

To do that, select the new pass you just created from the dropdown menu and then hit Partion -> New Partition with the selected objects in your scene you don't want to be rendered (in this case all the objects but the tree). Now double click on the partition and set it not to be rendered under that pass.

Now go again to the default pass and select the tree to create a partition for it so the tree doesn't get rendered in the default pass.

So far we have two passes on which the objects get rendered in the sequence separatedly. Try a preview render of each pass to make sure everything is going ok so far. You should get on pass with all the foreground objects rendered except the tree, and the other pass with the tree but no foreground objects.

Render all passes, it should save each pass to a different sequence of images or diferent files.

Once that is done, is time to go the compositing layout. Get all passes (which should open two boxes containing one pass each). Now, create on photoshop (or whatever you use) and mask to filter out what you don't wanna see from the tree pass. Just make an all black map with a black square where you wanna see the tree. Go ahead and pick from the menu bar Ops -> Composite -> Math Composite. That opens a small island with three inputs and one output. Link the default pass to the first input port, the tree pass to the second input port and the mask map you create manually to the blue icon input port (which is the mask input for the second input you chose). To load an external file go to Ops -> Image -> File Input and load it.

Right now if you click on the small "v" under the Math Composite operation you should be able to see what I think you wanted to achieve.

bravmm
10-14-2007, 10:25 AM
No harm done, it's amazing how much Spanish will "expand" when translated into English :D

CoolCalb
10-14-2007, 11:39 AM
maybe this will help?:

http://www.ozadi.com/resources/tutorials/3Dmasking/3dmasking.htm

AgustinLV
10-14-2007, 01:07 PM
Amazingly that does the trick too, just tested it. Mental ray renders the "masked" object's secondary rays when the refract on the transparent surface. Just remember to keep the index of refraction at 1 on the masking object or the image behind it will get distorted.

joe-c
10-17-2007, 02:15 PM
Hey!
I'm back, i took mini-vacations here and went back to visit my folks... AgustinLV, thanx for the tip! Voy a estar experimentando un rato largo a ver que puedo lograr, ahi te agregué al msn...
CoolCalb thnx man! I was looking for that tutorial since is listed in EdHarris page, but the link is broken... and I also tried looking in other forums but nothing... so, very greatfull!

I have to say that 3d world, especially when you're migrating from Web, multimedia, video and motion graphics areas, see that it has so many different way to resolve things and possibilities that is overwhelming in most cases, but also (and I speak for myself here) I think that could be lots of ways to easily-resolve-things like in other programs, like in this case, masks... I work with Flash and After Effects a lot, and in motion graphics (of course is not the same thing as 3d... in part) is an EASY way to do animations, translations and even deformations... shaped-masks are the easiest way of separating and "clustering" animation in sort of way (of course always when it's needed) and I see that 3d apps (this case XSI) lacks of an easy-way of working with shaped-masks; I know I know that the logic involved when you work with 3d is different than MG, BUT!... there are some cases (like this one) when you'd (ME hehe) really like to have a tool like that! (Maybe some good-will script developer :D could do something about it! It would be a good idea, mixing separate workflows like Motion Graphic software and 3d in a richier end-user-result) It's a thought... too bad I'm not a developer... :sad:

Well, gotta go and give this tutorial a try! and then I'll post some progress work and the final result when it's done (hope not to late)...
Bye!

spikkel
10-18-2007, 11:45 AM
I'm not sure I get what your asking but what about the basic disabled Lambert? Is that what you what?

AgustinLV
10-18-2007, 02:21 PM
I think the problem is solved. I've been talking with Joe-c and what he really needed was a way to animate a growing tentacle made of several segments, but he wanted the segments to come one from inside the other. I proposed him to animate the translatation of the segments along a curve, and that seemed to work fine.
If someone comes up with a better idea, please post it so we can share different ways to achieve the same.

CGTalk Moderation
10-18-2007, 02:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.