[osg-users] Node with different projection/view matrix fixed pipeline

Robert Osfield robert.osfield at gmail.com
Thu Jan 16 03:18:02 PST 2020


Hi Catalin,

I'm still a bit confused from your explanation.

Is it simply that you want a 2D overlay on your scene?  Have a look at the
osghud example - this uses an osg::Camera to set a user define view and
projection matrix for it's subgraph.

If you want object to be rendered like billboards within the 3D world then
there is the osg::Billboard and osg::AutoTransform classes.

Robert.

On Thu, 16 Jan 2020 at 09:07, Catalin <inbox.icf at gmail.com> wrote:

> Hi Robert,
>
> I have an old code, as you know. Some objects are rendered with OpenGL,
> but before that the ViewMatrix is set to identity, as the the objects are
> having their position computed as follow:
>
> ObjectPositionView = ViewMatrix * ObjectPosition + 2D Move Vector(x,y) in
> view space
>
> ObjectPositionView already contains the ViewMatrix, so I am feeding it
> directly to the Open GL.
>
> Those object are some billboards but with the option to be moved in the
> view space, like a 2D move.
>
> If I give directly the ObjectPosition to OSG, it works fine with
> billboards but I don't know how to incorporated the 2D Move Vector, that
> vector is in the view space.
>
> On Thu, 16 Jan 2020 at 10:18, Robert Osfield <robert.osfield at gmail.com>
> wrote:
>
>> Hi Catalin,
>>
>> Could you explain what you are trying to do with the rendering of this
>> node? What you are attempting to do will guide the best way to implement
>> what you need.
>>
>> Robert.
>>
>> On Thu, 16 Jan 2020 at 07:33, Catalin <inbox.icf at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Is there a way to change the view matrix or projection matrix for a just
>>> a specific node in fixed pipeline mode?
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200116/adb13644/attachment.html>


More information about the osg-users mailing list