I created three different OTLs that are all functionally clones of each other, except one is a LOP, another a SOP, and another an OBJ node.
For all three, I have a view state that has a TextDrawable and a GeometryDrawable (all exactly the same).
In all three cases, the TextDrawable will show up as expected - but in /obj specifically, the GeometryDrawable doesn't get drawn.
The code is the same for all three, so I'm not sure what's happening here - is there something different I have to do for /obj?
hou.GeometryDrawable not displaying in /obj
2108 6 2- chendryx
- Member
- 86 posts
- Joined: 1月 2015
- Offline
- lfranceschini
- Member
- 72 posts
- Joined: 4月 2016
- Offline
- chendryx
- Member
- 86 posts
- Joined: 1月 2015
- Offline
The geometry is defined within the sopnet of the /obj node. I sent this directly to support and it was filed as a bug - #105955
If you want to see for yourself, I've attached two example hda's to this post - one is in SOPs and the other in OBJ - they both define their own view state that do exactly the same thing, but the /obj one is clearly incorrect in terms of what's being drawn in the viewport.
If you want to see for yourself, I've attached two example hda's to this post - one is in SOPs and the other in OBJ - they both define their own view state that do exactly the same thing, but the /obj one is clearly incorrect in terms of what's being drawn in the viewport.
- lfranceschini
- Member
- 72 posts
- Joined: 4月 2016
- Offline
- chendryx
- Member
- 86 posts
- Joined: 1月 2015
- Offline
hm, SimpleDrawable is a reasonable workaround for the time being (thanks for the suggestion), but there are some issues that would still require using GeometryDrawable ultimately, specifically the ability to set the drawMode to Face (ie Simple's options of Wireframe or Current do not suffice), and having the ability to control when the object re-draws.
- lfranceschini
- Member
- 72 posts
- Joined: 4月 2016
- Offline
Okay, does setting the when the drawable is shown give you enough control over when the object is drawn, or is there a case where that doesn't suffice?
https://www.sidefx.com/docs/houdini/hom/hou/SimpleDrawable.html#show [www.sidefx.com]
https://www.sidefx.com/docs/houdini/hom/hou/SimpleDrawable.html#show [www.sidefx.com]
- chendryx
- Member
- 86 posts
- Joined: 1月 2015
- Offline
I need to update the drawable in response to a couple of different events, in particular when the user changes frames when the user clicks with the mouse. For tracking frame changes, I have to store the current frame in onEnter(), and then check in onDraw() if the frame has changed. For mouse events I can just use onMouseEvent(), but for either case, I have to keep a pointer to my SOP node and invoke cook(force=True) in order to get the drawable to update.
With GeometryDrawable I can just invoke draw(), and it handles all that neatly. I don't have to track if the frame has changed, nor do i have to keep a pointer to my sop node in order to force cook it.
With GeometryDrawable I can just invoke draw(), and it handles all that neatly. I don't have to track if the frame has changed, nor do i have to keep a pointer to my sop node in order to force cook it.
-
- Quick Links