IsAnimated, which is available at many levels, should be what you want.

but i see what the developers mean, on a frame change everything is dirty
when it comes to rendering. i use softimage to arnold plugin regularly and
a frame change requires the entire cache to be updated, but this isn't
necessary if objects are static. so i think you are on the right track...

if cache
   for object in scene
      if object not in cache
         translate object
      else if object is animated
         translate object
      render
else
   translate entire scene
   render

might i ask how you are doing the same in your max and maya plugins? i
think its a vaild request to support for parity of the sdk features.

s

On Wed, Apr 25, 2012 at 11:06 AM, Nicolas Burtnyk <nico...@redshift3d.com>wrote:

> Filtering by viewport/camera visibility is not really valid for us since
> objects outside the view frustum can still potentially be "seen" in the
> render (e.g. via reflections or contribution to GI).
>
> However, detecting the scene items (meshes, lights, shaders, etc...) which
> are influenced by animation could work - I could just assume those are
> dirty every frame during anims, then rely on the DirtyList or
> siOnValueChange event for "normal" (i.e. non animation) renders.  I'll see
> if that gets me somewhere...
>
> Thanks for the idea!!
>
>
> On Wed, Apr 25, 2012 at 10:55 AM, jo benayoun <jobenay...@gmail.com>wrote:
>
>> Hey,
>>
>> How about writing a that you run sparingly to know what objects are
>> actually seen in the viewport (from the cam xforms) and which objects could
>> influence the scene (shadows, lights) and then make a filter on this
>> objects to know which have animation sources (there is a builtin way to get
>> quickly those informations) ?
>> I have no clues about rendering dev, but filtering the scene to get what
>> you want shouldnt be that hard, na ??
>>
>> :)
>> jo
>>
>>
>>
>>
>>
>>
>>
>> 2012/4/25 Nicolas Burtnyk <nico...@redshift3d.com>
>>
>>> That's good to know.  Thanks!
>>>
>>> My case with ADN on this topic was closed by Autodesk - apparently the
>>> final word from the Soft devs is that the entire scene is assumed to be
>>> dirty between frames of an animation.
>>>
>>> I personally find it incredibly hard to believe that, at least
>>> internally, Soft does a full scene re-evaluation for every frame of
>>> animation.  Seems to me that would kill performance when playing back anims
>>> and certainly the other DCCs like Maya and Max are very careful about only
>>> re-evaluating what has changed during playback.
>>>
>>> At this point my only option seems to be to attempt to compute what has
>>> changed myself, by generating hashes based on the data I care about.  If
>>> the hash is different than it was the previous frame, I know to re-extract
>>> and re-generate our various acceleration structures as necessary.  That's
>>> unfortunately lots of inefficient hoops to jump through :(
>>>
>>>
>>> On Tue, Apr 24, 2012 at 11:03 AM, Luc-Eric Rousseau <luceri...@gmail.com
>>> > wrote:
>>>
>>>> Fyi guillaume laferriere is on paternity leave for two more weeks
>>>> On Apr 24, 2012 1:47 PM, "Steven Caron" <car...@gmail.com> wrote:
>>>>
>>>>> really no reply?
>>>>>
>>>>> well i think this should be sorted out by autodesk with an improvement
>>>>> to the SDK,
>>>>>
>>>>> On Tue, Apr 24, 2012 at 10:42 AM, Nicolas Burtnyk <
>>>>> nico...@redshift3d.com> wrote:
>>>>>
>>>>>> Unfortunately the siOnValueChanged callback doesn't get called at all
>>>>>> when something changes due to animation.
>>>>>>
>>>>>> I'm in communication with Autodesk ADN support, but so far haven't
>>>>>> had any luck :(
>>>>>>
>>>>>>
>>>>>> On Tue, Apr 24, 2012 at 9:17 AM, Steven Caron <car...@gmail.com>wrote:
>>>>>>
>>>>>>> ok, this might be something worth mentioning to autodesk maybe a bug
>>>>>>> or maybe just inconvenient.
>>>>>>>
>>>>>>> anyways, so you used the siOnValueChanged callback and what do you
>>>>>>> get for an animated parameter? did you check for siKinematicStateID and
>>>>>>> siParameterID?
>>>>>>>
>>>>>>> s
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Apr 24, 2012 at 8:58 AM, Nicolas Burtnyk <
>>>>>>> nico...@redshift3d.com> wrote:
>>>>>>>
>>>>>>>> Sorry I should have mentioned that I also tried using the
>>>>>>>> "DirtyList" from the RendererContext.
>>>>>>>> It works fine when modifying the scene "manually" (e.g. move an
>>>>>>>> object, deform a mesh, change a shader parameter), but does not pick up
>>>>>>>> changes that are the result of an animation.  For example, if you 
>>>>>>>> animate
>>>>>>>> an object's transform and render, then scrub time and render again, the
>>>>>>>> DirtyList is empty.
>>>>>>>>
>>>>>>>> Anyone know any other tricks that might work to pick up those
>>>>>>>> changes that are due to animated parameters?
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> -Nicolas
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Apr 23, 2012 at 6:47 PM, Steven Caron <car...@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> i am not sure that is the proper way to track changes with the
>>>>>>>>> custom renderer plugin.
>>>>>>>>>
>>>>>>>>> the RendererContext provides an attribute called 'DirtyList' which
>>>>>>>>> is available by default but one should also look at the Query 
>>>>>>>>> callback and
>>>>>>>>> read about 'siRenderQueryWantDirtyList'
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Apr 23, 2012 at 6:34 PM, Alok Gandhi <
>>>>>>>>> alok.gan...@modusfx.com> wrote:
>>>>>>>>>
>>>>>>>>>>  Application.GetValue('Project.dirtycount') can get the changes
>>>>>>>>>> in the scene graph, look into it.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 4/23/2012 9:16 PM, Nicolas Burtnyk wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Everyone,
>>>>>>>>>>
>>>>>>>>>> My company is developing a custom renderer and we are trying to
>>>>>>>>>> quickly identify which parts of the scene have changed between 
>>>>>>>>>> renders.
>>>>>>>>>> We'd like this info so that we can only reprocess things which
>>>>>>>>>> have changed. This includes situations where the user invokes 
>>>>>>>>>> render, makes
>>>>>>>>>> a change, then renders again, but also when rendering an animation.
>>>>>>>>>> In other words, our solution needs to be able to handle scene
>>>>>>>>>> changes that occur as a result of animation in addition to regular 
>>>>>>>>>> changes
>>>>>>>>>> like moving a mesh or modifying a parameter on a shader.
>>>>>>>>>>
>>>>>>>>>> We've had some success handling the siOnValueChange event,
>>>>>>>>>> however this event does not appear to be fired in the case of 
>>>>>>>>>> animation.
>>>>>>>>>> For example, if I simply set 2 keys on the translation of a mesh, no
>>>>>>>>>> siOnValueChange events are called when I scrub time, whereas I do 
>>>>>>>>>> get those
>>>>>>>>>> events if I move the object "manually".
>>>>>>>>>>
>>>>>>>>>> Can anyone recommend a good way for us to reliably tell when (and
>>>>>>>>>> which) parts of the scene have changed - including during animation?
>>>>>>>>>> Thanks!
>>>>>>>>>>
>>>>>>>>>> -Nicolas
>>>>>>>>>>
>>>>>>>>>> No virus found in this message.
>>>>>>>>>> Checked by AVG - www.avg.com
>>>>>>>>>> Version: 2012.0.1831 / Virus Database: 2090/4557 - Release Date:
>>>>>>>>>> 10/17/11
>>>>>>>>>> Internal Virus Database is out of date.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>
>>
>

Reply via email to