> I have another example that does update but it's implemented as a SourceGeo
> node. Do developers usually implement readers as SourceGeo nodes instead of
> GeoReader?
At the moment if you need to modify the knob interface in the node or you want
to do something that GeoReader don't handle right now like generate inter-frame
geometry interpolations you'll need to implement a full SourceGeo with all your
custom knobs.
If you don't need any extra knobs then you can stick with GeoReader.
> One thing that does seem to work is creating the node and hitting the
> "reload" button in the file knob. After that the file reads on every frame
> (but won't batch render). Anyone know how what functions the reload button
> triggers?
It increments the version knob which forces the Op hash to change - exactly
what adding the frame to the hash in Op::append() will do.
-jonathan
> Thanks,
>
> Eric
>
>
> > 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