Hi Alexandre,

My advice is NOT to do what you are doing, and NOT to follow osgdistotion.
I'm not going to try and debug your approach as it's just wrong to start
with.  If you want to keep following go for it but I won't be spending my
time help you bark up the wrong tree.

Robert.


On 20 August 2013 14:21, Alexandre Vaillancourt <
[email protected]> wrote:

> Hi Robert,
>
> Thanks for your answer.
>
> I have implemented something like what's in osgdistortion (--faces), with
> the 3 slave cameras, FoV of 60 degrees and the rotation of the left and
> right slave cameras by 60 degrees. It gives much better results than my
> first implementation of using a single camera with FoV of 180 degrees.
>
> However my problem is about world objects that should look 'straight' but
> are 'bent'. I've modified the osgdistortion --faces example to use only 3
> cameras, and used the cessna object to show my issue. See the screenshot
> attached. There are clear weird bends in the image (I cropped and reduced
> it in size). Where the red arrows are, we can see the wing, the propeller
> blade and the cessna nose are, well, bent. This kind of distortion occurs
> for objects near the top of the screen and near the bottom of the screen,
> i.e. placing the cessna in the centre of the screen would not result in
> this distortion.
>
> Now, looking at the osgdistortion --dome, some "correction" seems to be
> done, but for a whole sphere instead of just a cylinder. And the the camera
> draws to a texture (TextureCubeMap) that is applied to a geometry instead
> of drawing directly to the screen (color buffer).
>
> What I'd like to achieve is a mix of those two examples: Use only 3
> cameras, not the 6 faces of a cube, render to a texture and then distort it
> (using shaders or a distorted geometry). The goal here is not to have
> 'straight' lines because it might look weird, but rather 'smoothed' lines,
> which will probably be curved.
>
> So the question that remains:
> 1) Is it possible to attach cameras to the same texture without using a
> cube map?
>
> Thanks!
>
>
> [image: Images intégrées 1]
>
> --
> Alexandre Vaillancourt
>
>
> 2013/8/20 Robert Osfield <[email protected]>
>
>> Hi Alexandre,
>>
>> You shouldn't need to use a render to texture approach to set up drive
>> displays,as each slave camera can just render 60 degrees of the overall FOV
>> (plus a little bit if you are edge blending).   All you'd need to do is set
>> the slave cameras view offset matrix so that the left and right displays
>> are rotated by 60 degrees.  The osgwindows example does this rotation
>> trick, but for two windows/slave cameras, it should help provide some
>> guidance though.
>>
>> Robert.
>>
>>
>> On 19 August 2013 20:38, Alexandre Vaillancourt <
>> [email protected]> wrote:
>>
>>> Hello List and Forum,
>>>
>>> We're developing an application that aims to take the best advantages of
>>> "ultra-wide screen", which in our terms is basically using 3 widescreen
>>> monitors.
>>>
>>> Since our camera is to be of a kind of "first person", I'd like to be
>>> able to display a field of view of about 180 degrees.
>>>
>>> I've been able to achieve that by using something like what's in
>>> osgdistortion, which is using a CompositeViewer with the main camera and 3
>>> slave cameras.
>>>
>>> Now the items that should look "straight" are now "bent" at the 2
>>> viewport junctions.
>>>
>>> So the 2 options I found were:
>>> 1) RTT everything that is in the scene and draw the texture on a
>>> distorted polygon (like in osgdistortion)
>>> 2) Draw on a quad and use a shader to distort the quad or what's on it.
>>>
>>> Questions:
>>> 1) In both cases I need to draw to a texture.
>>> ---> camera->attach(osg::Camera::COLOR_BUFFER, texture, 0,
>>> osg::TextureCubeMap::POSITIVE_Z);
>>> This approach uses 6 faces of a cube map. Is there a way to use only 3
>>> cameras, i.e. tell the camera to draw only on a part of the texture?
>>>
>>> 2) Would there be a way to tell the viewer to draw on a texture instead
>>> of the cameras?
>>>
>>> 3) Is the shader approach the best or the textured mesh is better?
>>>
>>>
>>> Thanks all; and sorry if I'm not too clear, it's not much clearer to me
>>> :P
>>>
>>>
>>>
>>> --
>>> Alexandre Vaillancourt
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to