How do I avoid rebuilding viewport geometry per-frame?

   1286   1   1
User Avatar
Member
18 posts
Joined: Jan. 2009
Offline
I have a custom HDK SOP which implements a skinning algorithm. It cooks on every frame, updating point positions and a fixed-size block of rigging data stored as a detail attribute. The output topology is always the same as the input mesh. Cook times are in the sub-30ms range.

With this SOP, animation plays very slowly, about one frame per second. Using performance profiling, I see that it's the viewport that's taking up >95% of the processing time.

HDK gurus, two questions:
1) What state info is the viewport code looking at to decide if the viewport geometry needs to be rebuilt, as opposed to just the point positions updated?
2) What are the programming tricks I can use to avoid the unnecessary viewport update activity?

H14.0.291, observed with both Linux and OSX.
User Avatar
Staff
733 posts
Joined: Oct. 2012
Offline
I think http://www.sidefx.com/docs/hdk14.0/_h_d_k__geometry__intro.html#HDK_Geometry_Intro_Data_IDs [sidefx.com] should cover what you're looking for.
  • Quick Links