[osg-users] Cameras with same target and different near/far

Riccardo Corsi riccardo.corsi at kairos3d.it
Mon Sep 14 02:37:16 PDT 2015


Hi all,

sorry to revamp my own thread, but I'm facing again the same problem I
explained in the first post and couldn't find a correct setup.
Any hint?
thanks,
ricky



On Fri, Jul 10, 2015 at 5:46 PM, Riccardo Corsi <riccardo.corsi at kairos3d.it>
wrote:

> Hi all,
>
> what I'm after is a sort of simple depth peeling, the aim is to render 2
> different parts of a whole scene with different near/far settings to the
> same render target. Something like:
>
> * mainCamera (render the huge surrounding scene)
> |
> |-- huge scene
> |
> |-- detailCamera (render a closer object in detail with small z near/far)
>       |
>       |-- detailed geometry
>
>
> I thought the best option was to place the detailCamera in scene, to share
> the render target, and:
> - set a custom near/far settings
> - set the clear depth bit
> - set the render order to post (or nested?)
> but I couldn't get it to work.
>
> I'm particular I have some doubts:
> 1. does a PRE/POST and a NESTED ORDER camera have the same behavior with
> respect to sharing the mainCamera render target, when placed in-scene under
> it?
> 2. for point 1, does anything change if mainCamera renders to the Frame
> Buffer or to and FBO?
> 3. is there any other/more correct way to get 2 cameras to render to the
> same FBO with different near/far settings?
>
> Thank you!
> Ricky
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150914/2be0262c/attachment-0001.htm>


More information about the osg-users mailing list