Hello,
I'm trying find out a way to detect if the geometry inside OBJ_Geometry network has changed in some way.
I've tried adding callback on the object node and checking for these events:
OP_CHILD_SWITCHED
OP_COOKING_CHANGED
But none of them gives me what I want… Is it possible to detect geometry changes regardless of what is the current/render/display SOP ?
Thanks, Mila.
How to detect geometry changes in OBJ_Geometry?
3408 6 1-
- millag
- Member
- 14 posts
- Joined: Jan. 2014
- Offline
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
Change compared to what? The last frame, first frame, a rest state, a reference object?
There are so many ways geometry can change, scale, translation, location, faces begin deleted, points being added, does it have velocity, clip nodes etc…
If it needs cooking then it might be changed, right?
What specific goal are you trying to achieve with this detection approach? Maybe there is another way to achieve it?
There are so many ways geometry can change, scale, translation, location, faces begin deleted, points being added, does it have velocity, clip nodes etc…
If it needs cooking then it might be changed, right?
What specific goal are you trying to achieve with this detection approach? Maybe there is another way to achieve it?
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
-
- millag
- Member
- 14 posts
- Joined: Jan. 2014
- Offline
Enivob
What specific goal are you trying to achieve with this detection approach? Maybe there is another way to achieve it?
I'm working on integration of a third party renderer with Houdini. I need to re-export geometry when data in the GU_Detail changes. Similar to what is happening in RenderView when using Mantra…
Is there a way to do that?
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
I think callbacks would be the way to go, have you tried some of the other types, such as AppearanceChanged?
http://sidefx.jp/doc/hom/hou/nodeEventType.html [sidefx.jp]
http://sidefx.jp/doc/hom/hou/nodeEventType.html [sidefx.jp]
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
-
- millag
- Member
- 14 posts
- Joined: Jan. 2014
- Offline
-
- malexander
- Staff
- 5293 posts
- Joined: July 2005
- Offline
You can:
- get a handle to the render geometry via OBJ_Node::getRenderGeometryHandle()
- grab the GU_Detail from the GU_DetailHandle (GU_DetailHandleAutoReadLock)
- if valid, check the ID and version of the GU_Detail with GU_Detail::getUniqueId() and GU_Detail::getMetaCacheCount() and cache it
Fetching the detail will cause a cook of the geometry however, so if this isn't desirable you can look at the SOP itself instead: - get a pointer to the SOP via OBJ_Node::getRenderSopPtr()
- Check the SOP node id via OP_Node::getUniqueId() and check its version via OP_Node::getVersionParms(), and cache those.
If either the id or version/cachecount changes, you'll know the SOP has changed. You can also do the same thing with the display SOP (getDisplayGeometryHandle, getDisplaySopPtr).
-
- millag
- Member
- 14 posts
- Joined: Jan. 2014
- Offline
-
- Quick Links

