Re: [osg-users] Fine-grained render ordering
Hi, is the render order index another option? This is the index that Camera::SetRenderOrder() takes as the second parameter. For instance if you place camera C in PreRender with index -1 and sibling A and B in PreRender with a greater index, I think you should get what you're after. Ricky On Sat, May 7, 2011 at 13:40, Sergey Polischuk pol...@yandex.ru wrote: Hi, Craig Will C be rendered twice? - yes Would it work to make C a child of A only, with A PRE_RENDER and B POST_RENDER? - yes You could also use linear structure like A - B - C Cheers, Sergey. 06.05.2011, 17:55, Craig S. Bosma craig.bo...@gmail.com: Sergey, Thanks, that's been very helpful. I have some other questions though: suppose you have a graph with camera C, a child of sibling cameras A B, e.g. A - C B - C Will C be rendered twice? If so, how would one make C render first, then render each of A, B with the output textures of C? Would it work to make C a child of A only, with A PRE_RENDER and B POST_RENDER? Thanks, Craig On Tuesday, May 3, 2011 at 2:30 AM, Sergey Polischuk wrote: Sent incomplete message by accident :) Example : camera1 - camera2(prerender) - camera4(prerender) - camera3(postrender) render order will be camera4 (rendered first), camera2, camera3, camera1(rendered last) Cheers, Sergey. 03.05.2011, 11:28, Sergey Polischuk pol...@yandex.ru: Hi, Craig When you have nested cameras they work like nested render stages. All cameras under another camera node will render just before or just after (depending on render order set on camera) rendering parent camera. With that in mind you can build hierarchy that suits your purposes. Example : camera1 - camera2 02.05.2011, 16:17, Craig S. Bosma craig.bo...@gmail.com;: Will the same technique work with a third camera C? Sent from my iPhone On Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote: Hi, Craig In your example, put camera A as child of B with render order on camera A set to prerender. Cheers, Sergey. 27.04.2011, 18:38, Craig S. Bosma craig.bo...@gmail.com: Robert, Thanks for pointing out the TraversalOrderBin, I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the TraversalOrderBin, would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B? Thanks, Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig, The best way to manage render bin is vis State::setRenderBinDetails(), and in the 2.9.x dev series you can now select a render bin that sorts on traversal order of a subgrpah which makes some techniques easier - use the RenderBin string TraversalOrderBin to select this bin. If you want to create and chain RenderStages then using an osg::Camera in the scene graph is often one of the best ways to do this, and use the Camera::setRenderOrder(..) to control the order. You can also use a custom cull traversal callback to create RenderStage/RenderBin and assign these to the rendering backend, but this does require a greater knowledge of the internals of the rendering backend. Robert. On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com craig.bo...@gmail.com wrote: Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread ( http://forum.openscenegraph.org/viewtopic.php?t=2374 http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.orgosg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.orgosg-users@lists.openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Hi, CraigWill C be rendered twice? - yesWould it work to make C a child of A only, with A PRE_RENDER and B POST_RENDER? - yesYou could also use linear structure like A - B - CCheers, Sergey.06.05.2011, 17:55, "Craig S. Bosma" craig.bo...@gmail.com:Sergey,Thanks, that's been very helpful. I have some other questions though: suppose you have a graph with camera C, a child of sibling cameras A B, e.g.A - CB - CWill C be rendered twice? If so, how would one make C render first, then render each of A, B with the output textures of C? Would it work to make C a child of A only, with A PRE_RENDER and B POST_RENDER?Thanks,Craig On Tuesday, May 3, 2011 at 2:30 AM, Sergey Polischuk wrote: Sent incomplete message by accident :)Example : camera1 - camera2(prerender) - camera4(prerender) - camera3(postrender)render order will be camera4 (rendered first), camera2, camera3, camera1(rendered last)Cheers, Sergey.03.05.2011, 11:28, "Sergey Polischuk" pol...@yandex.ru:Hi, CraigWhen you have nested cameras they work like nested render stages. All cameras under another camera node will render just before or just after (depending on render order set on camera) rendering parent camera. With that in mind you can build hierarchy that suits your purposes.Example : camera1 - camera202.05.2011, 16:17, "Craig S. Bosma" craig.bo...@gmail.com;:Will the same technique work with a third camera C?Sent from my iPhoneOn Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote:Hi, CraigIn your example, put camera A as child of B with render order on camera A set to prerender.Cheers, Sergey.27.04.2011, 18:38, "Craig S. Bosma" craig.bo...@gmail.com:Robert,Thanks for pointing out the "TraversalOrderBin", I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the "TraversalOrderBin", would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B?Thanks,Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote:Hi Craig,The best way to manage render bin is vis State::setRenderBinDetails(),and in the 2.9.x dev series you can now select a render bin that sortson traversal order of a subgrpah which makes some techniques easier -use the RenderBin string "TraversalOrderBin" to select this bin.If you want to create and chain RenderStages then using an osg::Camerain the scene graph is often one of the best ways to do this, and usethe Camera::setRenderOrder(..) to control the order. You can also usea custom cull traversal callback to create RenderStage/RenderBin andassign these to the rendering backend, but this does require a greaterknowledge of the internals of the rendering backend.Robert.On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote:Hi,I'm working on a shader-driven graphics pipeline for an OSG-based app, and Iwant to better understand how I can better control the rendering order. Iwant to render my initial scene to several texture targets, with opaque andtransparent objects handled separately. Currently I do this using nodemasks, but from this thread(http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like itwould be better to use renderbin/renderstages. I have several morepost-processing stages to follow, so I'm convinced that's the way to go forme to have full control over the pipeline.I've dug into the source for SceneView, RenderBin, RenderStage, etc. butit's not obvious to me how to shift objects from one bin to another (asidefrom setRenderBinDetails), or how to add stages that form a dependencychain. If anyone has examples or general advice on where to look, I'd beglad to hear it.Thanks,Craig___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing
Re: [osg-users] Fine-grained render ordering
Sergey, Thanks, that's been very helpful. I have some other questions though: suppose you have a graph with camera C, a child of sibling cameras A B, e.g. A - C B - C Will C be rendered twice? If so, how would one make C render first, then render each of A, B with the output textures of C? Would it work to make C a child of A only, with A PRE_RENDER and B POST_RENDER? Thanks, Craig On Tuesday, May 3, 2011 at 2:30 AM, Sergey Polischuk wrote: Sent incomplete message by accident :) Example : camera1 - camera2(prerender) - camera4(prerender) - camera3(postrender) render order will be camera4 (rendered first), camera2, camera3, camera1(rendered last) Cheers, Sergey. 03.05.2011, 11:28, Sergey Polischuk pol...@yandex.ru: Hi, Craig When you have nested cameras they work like nested render stages. All cameras under another camera node will render just before or just after (depending on render order set on camera) rendering parent camera. With that in mind you can build hierarchy that suits your purposes. Example : camera1 - camera2 02.05.2011, 16:17, Craig S. Bosma craig.bo...@gmail.com;: Will the same technique work with a third camera C? Sent from my iPhone On Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote: Hi, Craig In your example, put camera A as child of B with render order on camera A set to prerender. Cheers, Sergey. 27.04.2011, 18:38, Craig S. Bosma craig.bo...@gmail.com: Robert, Thanks for pointing out the TraversalOrderBin, I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the TraversalOrderBin, would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B? Thanks, Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig, The best way to manage render bin is vis State::setRenderBinDetails(), and in the 2.9.x dev series you can now select a render bin that sorts on traversal order of a subgrpah which makes some techniques easier - use the RenderBin string TraversalOrderBin to select this bin. If you want to create and chain RenderStages then using an osg::Camera in the scene graph is often one of the best ways to do this, and use the Camera::setRenderOrder(..) to control the order. You can also use a custom cull traversal callback to create RenderStage/RenderBin and assign these to the rendering backend, but this does require a greater knowledge of the internals of the rendering backend. Robert. On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote: Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Hi, CraigWhen you have nested cameras they work like nested render stages. All cameras under another camera node will render just before or just after (depending on render order set on camera) rendering parent camera. With that in mind you can build hierarchy that suits your purposes.Example : camera1 - camera202.05.2011, 16:17, "Craig S. Bosma" craig.bo...@gmail.com:Will the same technique work with a third camera C?Sent from my iPhoneOn Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote:Hi, CraigIn your example, put camera A as child of B with render order on camera A set to prerender.Cheers, Sergey.27.04.2011, 18:38, "Craig S. Bosma" craig.bo...@gmail.com:Robert,Thanks for pointing out the "TraversalOrderBin", I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the "TraversalOrderBin", would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B?Thanks,Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig,The best way to manage render bin is vis State::setRenderBinDetails(),and in the 2.9.x dev series you can now select a render bin that sortson traversal order of a subgrpah which makes some techniques easier -use the RenderBin string "TraversalOrderBin" to select this bin.If you want to create and chain RenderStages then using an osg::Camerain the scene graph is often one of the best ways to do this, and usethe Camera::setRenderOrder(..) to control the order. You can also usea custom cull traversal callback to create RenderStage/RenderBin andassign these to the rendering backend, but this does require a greaterknowledge of the internals of the rendering backend.Robert.On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote:Hi,I'm working on a shader-driven graphics pipeline for an OSG-based app, and Iwant to better understand how I can better control the rendering order. Iwant to render my initial scene to several texture targets, with opaque andtransparent objects handled separately. Currently I do this using nodemasks, but from this thread(http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like itwould be better to use renderbin/renderstages. I have several morepost-processing stages to follow, so I'm convinced that's the way to go forme to have full control over the pipeline.I've dug into the source for SceneView, RenderBin, RenderStage, etc. butit's not obvious to me how to shift objects from one bin to another (asidefrom setRenderBinDetails), or how to add stages that form a dependencychain. If anyone has examples or general advice on where to look, I'd beglad to hear it.Thanks,Craig___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Sent incomplete message by accident :)Example : camera1 - camera2(prerender) - camera4(prerender) - camera3(postrender)render order will be camera4 (rendered first), camera2, camera3, camera1(rendered last)Cheers, Sergey.03.05.2011, 11:28, "Sergey Polischuk" pol...@yandex.ru:Hi, CraigWhen you have nested cameras they work like nested render stages. All cameras under another camera node will render just before or just after (depending on render order set on camera) rendering parent camera. With that in mind you can build hierarchy that suits your purposes.Example : camera1 - camera202.05.2011, 16:17, "Craig S. Bosma" craig.bo...@gmail.com;:Will the same technique work with a third camera C?Sent from my iPhoneOn Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote:Hi, CraigIn your example, put camera A as child of B with render order on camera A set to prerender.Cheers, Sergey.27.04.2011, 18:38, "Craig S. Bosma" craig.bo...@gmail.com:Robert,Thanks for pointing out the "TraversalOrderBin", I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the "TraversalOrderBin", would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B?Thanks,Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig,The best way to manage render bin is vis State::setRenderBinDetails(),and in the 2.9.x dev series you can now select a render bin that sortson traversal order of a subgrpah which makes some techniques easier -use the RenderBin string "TraversalOrderBin" to select this bin.If you want to create and chain RenderStages then using an osg::Camerain the scene graph is often one of the best ways to do this, and usethe Camera::setRenderOrder(..) to control the order. You can also usea custom cull traversal callback to create RenderStage/RenderBin andassign these to the rendering backend, but this does require a greaterknowledge of the internals of the rendering backend.Robert.On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote:Hi,I'm working on a shader-driven graphics pipeline for an OSG-based app, and Iwant to better understand how I can better control the rendering order. Iwant to render my initial scene to several texture targets, with opaque andtransparent objects handled separately. Currently I do this using nodemasks, but from this thread(http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like itwould be better to use renderbin/renderstages. I have several morepost-processing stages to follow, so I'm convinced that's the way to go forme to have full control over the pipeline.I've dug into the source for SceneView, RenderBin, RenderStage, etc. butit's not obvious to me how to shift objects from one bin to another (asidefrom setRenderBinDetails), or how to add stages that form a dependencychain. If anyone has examples or general advice on where to look, I'd beglad to hear it.Thanks,Craig___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Will the same technique work with a third camera C? Sent from my iPhone On Apr 28, 2011, at 11:06 AM, Sergey Polischuk pol...@yandex.ru wrote: Hi, Craig In your example, put camera A as child of B with render order on camera A set to prerender. Cheers, Sergey. 27.04.2011, 18:38, Craig S. Bosma craig.bo...@gmail.com: Robert, Thanks for pointing out the TraversalOrderBin, I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the TraversalOrderBin, would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B? Thanks, Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig, The best way to manage render bin is vis State::setRenderBinDetails(), and in the 2.9.x dev series you can now select a render bin that sorts on traversal order of a subgrpah which makes some techniques easier - use the RenderBin string TraversalOrderBin to select this bin. If you want to create and chain RenderStages then using an osg::Camera in the scene graph is often one of the best ways to do this, and use the Camera::setRenderOrder(..) to control the order. You can also use a custom cull traversal callback to create RenderStage/RenderBin and assign these to the rendering backend, but this does require a greater knowledge of the internals of the rendering backend. Robert. On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote: Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Hi, CraigIn your example, put camera A as child of B with render order on camera A set to prerender.Cheers, Sergey.27.04.2011, 18:38, "Craig S. Bosma" craig.bo...@gmail.com:Robert,Thanks for pointing out the "TraversalOrderBin", I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the "TraversalOrderBin", would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B?Thanks,Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig,The best way to manage render bin is vis State::setRenderBinDetails(),and in the 2.9.x dev series you can now select a render bin that sortson traversal order of a subgrpah which makes some techniques easier -use the RenderBin string "TraversalOrderBin" to select this bin.If you want to create and chain RenderStages then using an osg::Camerain the scene graph is often one of the best ways to do this, and usethe Camera::setRenderOrder(..) to control the order. You can also usea custom cull traversal callback to create RenderStage/RenderBin andassign these to the rendering backend, but this does require a greaterknowledge of the internals of the rendering backend.Robert.On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote:Hi,I'm working on a shader-driven graphics pipeline for an OSG-based app, and Iwant to better understand how I can better control the rendering order. Iwant to render my initial scene to several texture targets, with opaque andtransparent objects handled separately. Currently I do this using nodemasks, but from this thread(http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like itwould be better to use renderbin/renderstages. I have several morepost-processing stages to follow, so I'm convinced that's the way to go forme to have full control over the pipeline.I've dug into the source for SceneView, RenderBin, RenderStage, etc. butit's not obvious to me how to shift objects from one bin to another (asidefrom setRenderBinDetails), or how to add stages that form a dependencychain. If anyone has examples or general advice on where to look, I'd beglad to hear it.Thanks,Craig___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Robert, Thanks for pointing out the TraversalOrderBin, I wasn't aware of that. However, I'm still a little unclear on how that might help for my use. Suppose I have a scene with with a root Group node and two child Camera Nodes, A and B. Suppose both render to a texture via FBO, and that B needs A's texture output. If I put the root node in the TraversalOrderBin, would that guarantee that camera A is rendered completely before camera B? What if A instead were a child of B? Thanks, Craig On Tuesday, April 26, 2011 at 5:01 AM, Robert Osfield wrote: Hi Craig, The best way to manage render bin is vis State::setRenderBinDetails(), and in the 2.9.x dev series you can now select a render bin that sorts on traversal order of a subgrpah which makes some techniques easier - use the RenderBin string TraversalOrderBin to select this bin. If you want to create and chain RenderStages then using an osg::Camera in the scene graph is often one of the best ways to do this, and use the Camera::setRenderOrder(..) to control the order. You can also use a custom cull traversal callback to create RenderStage/RenderBin and assign these to the rendering backend, but this does require a greater knowledge of the internals of the rendering backend. Robert. On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote: Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fine-grained render ordering
Hi Craig, The best way to manage render bin is vis State::setRenderBinDetails(), and in the 2.9.x dev series you can now select a render bin that sorts on traversal order of a subgrpah which makes some techniques easier - use the RenderBin string TraversalOrderBin to select this bin. If you want to create and chain RenderStages then using an osg::Camera in the scene graph is often one of the best ways to do this, and use the Camera::setRenderOrder(..) to control the order. You can also use a custom cull traversal callback to create RenderStage/RenderBin and assign these to the rendering backend, but this does require a greater knowledge of the internals of the rendering backend. Robert. On Fri, Apr 22, 2011 at 9:52 PM, Craig S. Bosma craig.bo...@gmail.com wrote: Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fine-grained render ordering
Hi, I'm working on a shader-driven graphics pipeline for an OSG-based app, and I want to better understand how I can better control the rendering order. I want to render my initial scene to several texture targets, with opaque and transparent objects handled separately. Currently I do this using node masks, but from this thread (http://forum.openscenegraph.org/viewtopic.php?t=2374) it seems like it would be better to use renderbin/renderstages. I have several more post-processing stages to follow, so I'm convinced that's the way to go for me to have full control over the pipeline. I've dug into the source for SceneView, RenderBin, RenderStage, etc. but it's not obvious to me how to shift objects from one bin to another (aside from setRenderBinDetails), or how to add stages that form a dependency chain. If anyone has examples or general advice on where to look, I'd be glad to hear it. Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org