Layering 2D objects

   1952   3   0
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Hello,

I was wondering if anyone knew a simple way to layer 2D objects that lie on the same plane such that the order in which they are in a ‘list’ determines which object covers the other, ie. the object at the top of the list gets displayed fully while the object at the bottom only gets the portion of its shape shown that is not covered by all objects above it.

Something like how you might have a list of layers in photoshop where the object on each layer is opaque but the remaining area ( of that layer ) is transparent.

Also, like a 2d cartoon where an object passes in front of another object and the option to easily change those layer priorities as the animation progresses.

So far what I have been doing is setting slight plane offset values. Like if the object lie on the x/y plane the offset are made in increments of .01 of the z plane.

But in my project I have 2 walls and a floor and each plane is like a cartoon projected on those surfaces. By using plane offsets to determine which objects cover the other I might be getting some undesirable results because I am not looking at all the planes orthographically.

I've gone through the compositing tutorials, it hasn't kicked in my mind of how I might be able to set up something to do this in a COP net ( I'm assuming this is where I would have to do it ).

Maybe all I need to do is revisit those compositing tutorials because thats really the only place to do the alternative method of what I am already doing?

Feedback is appreciated - Thanks
User Avatar
Member
2539 posts
Joined: June 2008
Offline
You can do that in COPs but you just end up with a series of images into Over nodes. Then you can animate the transforms as needed. Foreground on the LEFT input and background on the RIGHT input.
Edited by Enivob - Sept. 24, 2016 22:35:35

Attachments:
Untitled-1.jpg (114.8 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Thanks Enivob….when I was looking at some of the docs descriptions I thought it might end up something like this. ( along with some switch nodes ).

Because my objects are digital assets and are creating the geometry dynamically, I tried using the geometry import node in the COP but it doesn't seem to work or do anything. ( can't get an overlap ).

Tomorrow I will try simplifying what I have to get it to work and build up to what I am working with.

Thanks again for the feedback.
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
I've tried a more simple set up but still can't get the desired result.

I bet it's just a matter of my inexperience and just need to work with COPs more.

In the file I set up the two shapes on the same plane; One red and one blue.

By default without a COP network the red ( because it was created first I suppose ) overlaps the blue with a render.

So in the COP to try to set up the blue shape to overlap the red explicitly. But it doesn't seem to produce any result in the render.
Edited by BabaJ - Sept. 25, 2016 10:21:33

Attachments:
order shape layers.hiplc (810.0 KB)
order-shape-layer.jpg (191.4 KB)

  • Quick Links