Hi,
im trying to render an Object ID pass/plane in Houdini 12… but i does not seem to work.
The ‘Op_Id’ channel contains data, but the values are quite large: since i have only 3 objects in my scene, i was expecting values 1 - 3.
Am i missing something, or are the values correct?
Note that the attached scene contains custom Clay shader where ‘Op_Id’ param is add manually, and a Mantra render node where normally hidden ‘Generate object ids…’ option is made visible.
Rendering object mask (Op_Id) pass/plane in Houdini 12
11167 6 1- KiLa
- Member
- 109 posts
- Joined: June 2008
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- halfdan
- Member
- 599 posts
- Joined: May 2011
- Offline
circusmonkeyIt's not exactly random. It's the unique id of the OBJ that generated the geometry (see OP_Node::getUniqueId() in the HDK). However, it increases monotonically for each operator created while Houdini is running; so the longer your session lasts and more ops you create, even with New Scene in between, the higher this number will be.
if you use Op_id you will generate a random number , on the other hand you could make an attribute and call your own id in the render pass. I tend to havea preference for the latter as you can assign an id to the whole object and not get an id for every part.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
Senior Developer
Side Effects Software Inc
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
halfdancircusmonkeyIt's not exactly random. It's the unique id of the OBJ that generated the geometry (see OP_Node::getUniqueId() in the HDK). However, it increases monotonically for each operator created while Houdini is running; so the longer your session lasts and more ops you create, even with New Scene in between, the higher this number will be.
if you use Op_id you will generate a random number , on the other hand you could make an attribute and call your own id in the render pass. I tend to havea preference for the latter as you can assign an id to the whole object and not get an id for every part.
Its close enough ! LOL
Rob
Gone fishing
- KiLa
- Member
- 109 posts
- Joined: June 2008
- Offline
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
- KiLa
- Member
- 109 posts
- Joined: June 2008
- Offline
-
- Quick Links