Hi I am working on an application with multiple render windows. Is it SAFE to use the same actor for each renderer/window, or should I create an actor per renderer? BTW. Currently it is OK if I have the same parameters (color, visibility, etc) in each renderer. Thanks for any suggestions Bryn _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Even if it did work, it'd be quite fragile. I can imagine timestamp checks going wrong (these are used in the mapper to rebuild the geometric primitives etc). I can see LODActors getting messed up, when computing last render time from a renderer, not realizing that its not the same renderer they rendered on previously.
Its best to create an actor per render window. -- karthik
On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> wrote:
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Hi Karthik Thanks! I will follow this advice. Bryn From: Karthik Krishnan [mailto:[hidden email]] Even if it did work, it'd be quite fragile. I can imagine timestamp checks going wrong (these are used in the mapper to rebuild the geometric primitives etc). I can see LODActors getting messed up, when computing last render time from a renderer, not realizing that its not the same renderer they rendered on previously. Its best to create an actor per render window. -- karthik On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> wrote: Hi I am working on an application with multiple render windows. Is it SAFE to use the same actor for each renderer/window, or should I create an actor per renderer? BTW. Currently it is OK if I have the same parameters (color, visibility, etc) in each renderer. Thanks for any suggestions Bryn
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
In reply to this post by Karthik Krishnan-3
Hi again, Actually, could I copy an actor using ShallowCopy in order to create separate actors for each renderer? Else, how can I transfer (or even synchronize) the actor parameters in a simple but complete way? I am thinking of general vtkProp(s), not just vtkActor. Thanks for any advice. -- Bryn From: Karthik Krishnan [mailto:[hidden email]] Even if it did work, it'd be quite fragile. I can imagine timestamp checks going wrong (these are used in the mapper to rebuild the geometric primitives etc). I can see LODActors getting messed up, when computing last render time from a renderer, not realizing that its not the same renderer they rendered on previously. Its best to create an actor per render window. -- karthik On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> wrote: Hi I am working on an application with multiple render windows. Is it SAFE to use the same actor for each renderer/window, or should I create an actor per renderer? BTW. Currently it is OK if I have the same parameters (color, visibility, etc) in each renderer. Thanks for any suggestions Bryn
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
No you can't shallow copy.. each actor would need its own mapper. Mappers can certainly not be shared. I don't think you can share the vtkProperty's either, if you are using Shaders since will then consume graphic resources.
On Tue, Nov 1, 2011 at 9:26 PM, Bryn Lloyd <[hidden email]> wrote:
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Humm,
in fact, you can have many actors for a single mapper and there is no reason why you can't put the same actor to several renderers. I've done it many time without any issue. Although I was not using LODActors... Seb On Tue, Nov 1, 2011 at 12:15 PM, Karthik Krishnan <[hidden email]> wrote: > No you can't shallow copy.. each actor would need its own mapper. Mappers > can certainly not be shared. I don't think you can share the vtkProperty's > either, if you are using Shaders since will then consume graphic resources. > > > On Tue, Nov 1, 2011 at 9:26 PM, Bryn Lloyd <[hidden email]> wrote: >> >> Hi again, >> >> >> >> Actually, could I copy an actor using ShallowCopy in order to create >> separate actors for each renderer? >> >> >> >> Else, how can I transfer (or even synchronize) the actor parameters in a >> simple but complete way? I am thinking of general vtkProp(s), not just >> vtkActor. >> >> >> >> Thanks for any advice. >> >> >> >> -- >> >> Bryn >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> From: Karthik Krishnan [mailto:[hidden email]] >> Sent: Tuesday, November 01, 2011 3:58 PM >> To: Bryn Lloyd >> Cc: vtk >> Subject: Re: [vtkusers] Should I use one actor per renderer/renderwindow >> or can they share the same actor? >> >> >> >> Even if it did work, it'd be quite fragile. I can imagine timestamp checks >> going wrong (these are used in the mapper to rebuild the geometric >> primitives etc). >> >> >> >> I can see LODActors getting messed up, when computing last render time >> from a renderer, not realizing that its not the same renderer they rendered >> on previously. >> >> >> >> Its best to create an actor per render window. >> >> >> >> -- >> >> karthik >> >> On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> wrote: >> >> Hi >> >> >> >> I am working on an application with multiple render windows. >> >> >> >> Is it SAFE to use the same actor for each renderer/window, or should I >> create an actor per renderer? >> >> >> >> BTW. Currently it is OK if I have the same parameters (color, visibility, >> etc) in each renderer. >> >> Thanks for any suggestions >> >> >> >> Bryn >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
On Tue, Nov 1, 2011 at 12:52 PM, Sebastien Jourdain
<[hidden email]> wrote: > Humm, > > in fact, you can have many actors for a single mapper and there is no > reason why you can't put the same actor to several renderers. > I've done it many time without any issue. Although I was not using LODActors... > > Seb David Gobbi commented on this in the last post here: http://vtk.1045678.n5.nabble.com/Adding-an-ImageSlice-to-one-renderer-causes-the-image-to-disappear-from-a-different-renderer-td4759415.html David _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
In reply to this post by Sebastien Jourdain-2
Hi Sebastien,
Karthik has already given a couple valid reasons, e.g. timestamp checks between the renderer and the mapper, and resources that a mapper or property might tie to a particular OpenGL context. There is a third reason I can give, and that is that there aren't regression tests (that I'm aware of, anyway) that verify that it works for the dozens of different mapper classes in VTK. And anything that ain't tested might as well be broken. A basic vtkActor/vtkPolyDataMapper with no texture and no shaders is the only prop that I would trust to add to more than one renderer. - David On Tue, Nov 1, 2011 at 10:52 AM, Sebastien Jourdain <[hidden email]> wrote: > Humm, > > in fact, you can have many actors for a single mapper and there is no > reason why you can't put the same actor to several renderers. > I've done it many time without any issue. Although I was not using LODActors... > > Seb > > On Tue, Nov 1, 2011 at 12:15 PM, Karthik Krishnan > <[hidden email]> wrote: >> No you can't shallow copy.. each actor would need its own mapper. Mappers >> can certainly not be shared. I don't think you can share the vtkProperty's >> either, if you are using Shaders since will then consume graphic resources. >> >> >> On Tue, Nov 1, 2011 at 9:26 PM, Bryn Lloyd <[hidden email]> wrote: >>> >>> Hi again, >>> >>> >>> >>> Actually, could I copy an actor using ShallowCopy in order to create >>> separate actors for each renderer? >>> >>> >>> >>> Else, how can I transfer (or even synchronize) the actor parameters in a >>> simple but complete way? I am thinking of general vtkProp(s), not just >>> vtkActor. >>> >>> >>> >>> Thanks for any advice. >>> >>> >>> >>> -- >>> >>> Bryn >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> From: Karthik Krishnan [mailto:[hidden email]] >>> Sent: Tuesday, November 01, 2011 3:58 PM >>> To: Bryn Lloyd >>> Cc: vtk >>> Subject: Re: [vtkusers] Should I use one actor per renderer/renderwindow >>> or can they share the same actor? >>> >>> >>> >>> Even if it did work, it'd be quite fragile. I can imagine timestamp checks >>> going wrong (these are used in the mapper to rebuild the geometric >>> primitives etc). >>> >>> >>> >>> I can see LODActors getting messed up, when computing last render time >>> from a renderer, not realizing that its not the same renderer they rendered >>> on previously. >>> >>> >>> >>> Its best to create an actor per render window. >>> >>> >>> >>> -- >>> >>> karthik >>> >>> On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> wrote: >>> >>> Hi >>> >>> >>> >>> I am working on an application with multiple render windows. >>> >>> >>> >>> Is it SAFE to use the same actor for each renderer/window, or should I >>> create an actor per renderer? >>> >>> >>> >>> BTW. Currently it is OK if I have the same parameters (color, visibility, >>> etc) in each renderer. >>> >>> Thanks for any suggestions >>> >>> >>> >>> Bryn >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Follow this link to subscribe/unsubscribe: >>> http://www.vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
As mentioned it seems to work for simple actor/polydata mapper combinations.
But if this is not tested I will design my application differently, to use individual mappers/actors for each window. Thanks all for the replies! > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of David Gobbi > Sent: Tuesday, November 01, 2011 6:30 PM > To: Sebastien Jourdain > Cc: vtk > Subject: Re: [vtkusers] Should I use one actor per > renderer/renderwindow or can they share the same actor? > > Hi Sebastien, > > Karthik has already given a couple valid reasons, e.g. timestamp > checks between the renderer and the mapper, and resources that a > mapper or property might tie to a particular OpenGL context. There is > a third reason I can give, and that is that there aren't regression > tests (that I'm aware of, anyway) that verify that it works for the > dozens of different mapper classes in VTK. And anything that ain't > tested might as well be broken. A basic vtkActor/vtkPolyDataMapper > with no texture and no shaders is the only prop that I would trust to > add to more than one renderer. > > - David > > > On Tue, Nov 1, 2011 at 10:52 AM, Sebastien Jourdain > <[hidden email]> wrote: > > Humm, > > > > in fact, you can have many actors for a single mapper and there is no > > reason why you can't put the same actor to several renderers. > > I've done it many time without any issue. Although I was not using > LODActors... > > > > Seb > > > > On Tue, Nov 1, 2011 at 12:15 PM, Karthik Krishnan > > <[hidden email]> wrote: > >> No you can't shallow copy.. each actor would need its own mapper. > Mappers > >> can certainly not be shared. I don't think you can share the > vtkProperty's > >> either, if you are using Shaders since will then consume graphic > resources. > >> > >> > >> On Tue, Nov 1, 2011 at 9:26 PM, Bryn Lloyd <[hidden email]> > wrote: > >>> > >>> Hi again, > >>> > >>> > >>> > >>> Actually, could I copy an actor using ShallowCopy in order to > create > >>> separate actors for each renderer? > >>> > >>> > >>> > >>> Else, how can I transfer (or even synchronize) the actor parameters > in a > >>> simple but complete way? I am thinking of general vtkProp(s), not > just > >>> vtkActor. > >>> > >>> > >>> > >>> Thanks for any advice. > >>> > >>> > >>> > >>> -- > >>> > >>> Bryn > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> From: Karthik Krishnan [mailto:[hidden email]] > >>> Sent: Tuesday, November 01, 2011 3:58 PM > >>> To: Bryn Lloyd > >>> Cc: vtk > >>> Subject: Re: [vtkusers] Should I use one actor per > renderer/renderwindow > >>> or can they share the same actor? > >>> > >>> > >>> > >>> Even if it did work, it'd be quite fragile. I can imagine timestamp > checks > >>> going wrong (these are used in the mapper to rebuild the geometric > >>> primitives etc). > >>> > >>> > >>> > >>> I can see LODActors getting messed up, when computing last render > time > >>> from a renderer, not realizing that its not the same renderer they > rendered > >>> on previously. > >>> > >>> > >>> > >>> Its best to create an actor per render window. > >>> > >>> > >>> > >>> -- > >>> > >>> karthik > >>> > >>> On Tue, Nov 1, 2011 at 4:24 PM, Bryn Lloyd <[hidden email]> > wrote: > >>> > >>> Hi > >>> > >>> > >>> > >>> I am working on an application with multiple render windows. > >>> > >>> > >>> > >>> Is it SAFE to use the same actor for each renderer/window, or > should I > >>> create an actor per renderer? > >>> > >>> > >>> > >>> BTW. Currently it is OK if I have the same parameters (color, > visibility, > >>> etc) in each renderer. > >>> > >>> Thanks for any suggestions > >>> > >>> > >>> > >>> Bryn > >>> > >>> > >>> > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://www.vtk.org/mailman/listinfo/vtkusers > >>> > >>> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Follow this link to subscribe/unsubscribe: > >> http://www.vtk.org/mailman/listinfo/vtkusers > >> > >> > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Free forum by Nabble | Edit this page |