Ah, then Xiaolong's suggestion is correct if there's no way to tell if there's
a geometry change between frames with your API.
Otherwise for best performance only change the hash if you know there's a
geometry change, and try to target the correct hash for the particular change.
For example if only point positions are changing between frames only affect the
Group_Points hash, then during create_geometry() test the rebuild flag for what
parts of the geometry you should rebuild.
Cheers,
-jonathan
On Apr 8, 2011, at 5:20 PM, Eric Larsen wrote:
> There is one file containing all the time samples so I need to be able to at
> least query our API to see if the geometry has changed on each frame.
>> Is this because the file is dynamically changing its contents without
>> changing its file name?
>>
>> Forcing it to re-read on a frame change is a pretty wasteful way to do it -
>> include the modification time of the file in the hash instead:
>>
>> struct stat st;
>> if (stat(filename(), &st)==0)
>> geo_hash[Group_Primitives].append(&st.st_mtime, sizeof(time_t));
>>
>>
>>
>>
>> On Apr 8, 2011, at 5:41 AM, Xiaolong Qian wrote:
>>
>> > hi,
>> >
>> > Try to override this function:
>> >
>> > void get_geometry_hash(){
>> > ReadGeo::get_geometry_hash();
>> > geo_hash[Group_Object].append(outputContext().frame());
>> > }
>> >
>> > 2011/4/7 Eric Larsen <Eric.Larsen at disneyanimation.com>
>> > Is there a way to force ReadGeo to update reading frames for a single file
>> > (no single file per frame)? I wrote a custom GeoReader node that is
>> > working but not updating. I creating a derived class from ReadGeo
>> > overriding the append function as suggested in a previous post and also
>> > tried animating parameters in the ReadGeo node. Is there another way to
>> > force ReadGeo to execute the GeoReader geometry_engine call?
>> >
>> > Thanks,
>> >
>> > Eric
>> >
>> >
>> >
>> > void append(Hash& hash)
>> > {
>> > hash.append(outputContext().frame());
>> > }
>> >
>> > _______________________________________________
>
> _______________________________________________
> Nuke-dev mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________
Nuke-dev mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev