Op_Id - extract image plane

   27279   31   5
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Ok, stupid question …

I've naturally assumed Houdini could do this since it does deep rasters, but I can't find a good / direct way to say .. for the red channel in the pixel op ..

If ( plane Op_Id array 1 == 3, $R, 0)

Basically, I want to isolate an object by obj id, and I can't find a good way to access or manipulate stuff once it's in a deep raster layer. Is there an equivalent to a point expression for cops. Ideally it would look something like this ..

imgsample(“../node”,$X,$Y,“Op_Id”,0)

How do you read and set values from one image plane into another?? Right now I'm using the channelcopy COP, but looks like all it can do is, well, copy channels :roll:

I think I'm looking at this the wrong way …

Attachments:
obj_id_channel_manip.jpg (63.6 KB)

User Avatar
Member
1390 posts
Joined: July 2005
Offline
Just use Luma key on Op_Id plate with “Discard Keyed Region” toggle off.

Attachments:
Screenshot- Houdini Master Non-Commercial.jpg (57.0 KB)

User Avatar
Member
1145 posts
Joined: July 2005
Offline
Incredible, just what I was looking for SYmek!!
Thanks for the explanation. Now I can fool with comp'd re-lighting in a much more
controlled fashion.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
Thats great with the procedure, it's definatly the best way to go about re-lighting etc.

But what if I just want to manipulate the deep-layer with the pixel op? Or read parts of a deep layer into another deep layer etc. How does one access this with expressions?
User Avatar
Member
1390 posts
Joined: July 2005
Offline
Hmm, as to expressions I think they don't support deepraster plates, but I could be wrong.

The point is that Expression COP is pretty slow compared to Vex which additionally gives you access to any plate you want. So I would rather try to avoid expressions and use Vex or Vops.

As to using Op_Id as mattes, you're probably concious of that, but let me just note here that these mattes suffer from artefacts related to pixel filtering similar to issues with Z-depth plates. This method is quite limited in practical usage of selecting pixels on screen.

As far as I know, splitting a scene into layers is much more applicable and error free solution commonly used out there.
User Avatar
Member
7714 posts
Joined: July 2005
Offline
As to using Op_Id as mattes, you're probably concious of that, but let me just note here that these mattes suffer from artefacts related to pixel filtering similar to issues with Z-depth plates. This method is quite limited in practical usage of selecting pixels on screen.

Doesn't turning off filtering for these planes work?
User Avatar
Member
401 posts
Joined:
Offline
I guess this is due to the filtering of the color plane
I tried to solve this by filtering the prim_id with the same filter as the color plane.
but still there is this “edge”.

Attachments:
artefact.png (3.9 KB)

this is not a science fair.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
edward
Doesn't turning off filtering for these planes work?
As rdg mentioned the trouble maker is main plate filtering.
I wrote it more like a general note. Sure there are some workaround. Object's Id are around in any application for a 10 years at least since RPF introduction, but I've never heard it's used extensively (not that I refuse their usage at all).

Whatever you do, they won't fit exactly, edges issues. That's why layers are still most popular way of working I think.

What I used to do was to export two ID mattes with minmax min and minmax max filters applied. Then the difference can be used as a mask to tweak edges… But is it really worth of efforts? these ID plates?

It's like a UV mapping in Cops, makes impression, but still makes no sense .

cheers,
sy.
User Avatar
Member
33 posts
Joined: Nov. 2012
Offline
Anything similar on a per material basis? Shop_Id?
Artur Mandas

Artist & Developer
http://arturmandas.com [arturmandas.com]
User Avatar
Member
636 posts
Joined: June 2006
Offline
arturmandas
Anything similar on a per material basis? Shop_Id?

you can do it manually.

add to the shop networks (each shader must be modified) a bind export give it a name this case: Shop_Id set a value or export the parameter.

make in mantra a new image plane with the Shop_Id and hit render.
User Avatar
Member
33 posts
Joined: Nov. 2012
Offline
mandrake0
arturmandas
Anything similar on a per material basis? Shop_Id?

you can do it manually.

add to the shop networks (each shader must be modified) a bind export give it a name this case: Shop_Id set a value or export the parameter.

make in mantra a new image plane with the Shop_Id and hit render.

Thank you, yes I know how to do this manually, the reason I wrote is that I am looking for a way to do this automatically…
Artur Mandas

Artist & Developer
http://arturmandas.com [arturmandas.com]
User Avatar
Member
8 posts
Joined: May 2014
Offline
How would I use prim_id in a raster image to delete faces out of my geometry? Seems like it could be really useful for getting rid of occluded geometry.
Edited by Patrick Loughman - May 5, 2017 17:56:38
  • Quick Links