That doesn’t tell me what has changed or why my operator is being called.

If my operator has 7 inputs of various data types, I would like to know that 
input 4 was changed so I can skip any work not related to input 4.  If I have 
to dig through all the input data and compare it to my cached userdata, then it 
kind of defeats the purpose, no?

Example:  my operator takes several inputs:


-          1 Polygon mesh

-          2 NURBS Surfaces

-          4 Weight maps

My operator has 1 output:

-          Clone of input polygon mesh


This operator is a deformer which does closest location searches between the 
polygon mesh’s vertices and the 2 nurbs surfaces.  For each closest location 
operation, I must perform additional math to convert between Non-Uniform and 
Uniform parameterized space.  Overall, It’s very expensive.  If Softimage can 
tell my operator that only vertices 4, 5, and 23 were changed on the input 
polygon mesh, that means I only have to do 3 closest location searches, not N 
(where N=number of points on mesh).  That’s huge savings and a major boon to 
performance.  Likewise, if Softimage tells me only one of the NURBS Surfaces 
was modified, then I only need to perform the tail-end of the calculations to 
deform the output polygon mesh.  Also huge savings.

Some of the overhead of the operator is pulling information from the scene to 
be processed, such as point positions array, getting the NURBS samples arrays, 
or the 4 weight maps.  Even if I compare that data to my cache and discover 
almost nothing changes but a few items, that’s still significant amount of work 
the operator must perform that could otherwise be skipped with proper 
notification.  Besides ways to skip unnecessary work, I’m looking for ways to 
avoid storing mass amounts of redundant data in an operator cache.

Matt





From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Jon Swindells
Sent: Tuesday, April 15, 2014 7:56 PM
To: softimage@listproc.autodesk.com
Subject: Re: SDK: detecting changes in Custom Operator (C++)

probably stating the obvious here but, wouldn't you just cache the deltas 
(blob, userdata etc) and use that for your
sparse/dirty call on the next eval cycle ?

--
Jon Swindells
jon_swinde...@fastmail.fm<mailto:jon_swinde...@fastmail.fm>



On Wed, Apr 16, 2014, at 05:15 AM, Matt Lind wrote:

Is there any way to detect what exactly has changed between calls to a C++ 
custom operator? (eg; which inputs were dirtied?)



I have a custom operator (deformer) which has several inputs.  Each time an 
input is dirtied, the custom operator must iterate through all the point 
positions, samples (UV), and weight maps from the polygon mesh during each 
update, and modify that data using information obtained from the other inputs.  
While my operator computes the correct result, it comes with significant 
overhead.   95% of the time, less than 5% of polygon mesh’s points are 
modified.  It seems like a waste to iterate through all those points when only 
a tiny bit actually changes requiring processing.



I would like to only process points where the positions, samples, and/or weight 
maps have changed between updates and skip the rest.  Is that information 
available to a custom operator?  If so, how do I access it?



To pre-emptively answer the obvious question that will be asked – No, I cannot 
do this in ICE because my custom operator must work with NURBS in a particular 
fashion that is not supported by ICE.





Matt








Reply via email to