On Sat, May 22, 2010 at 1:24 AM, Carsten Neumann
<carsten_neum...@gmx.net> wrote:
>        Hello Maximilian,
>
> Maximilian Haupt wrote:
>> I am developing a part of an application that displays additional
>> textual information on billboards. To keep them in the foreground, I
>> use sortkeys and additionally, I move them close to the user, so that
>> they are always on top of all other objects and are selected first.
>> This works very well for now in desktop mode.
>
> ok.
>
>> But I experience a strange behavior in Cluster Mode (e.g. two
>> side-by-side cameras rendered by two render nodes). When a billboard
>> with a high width is moving horizontally from one camera to another
>> and starts to be visible on the second camera - at least in theory it
>> should be visible - it will not be send to the second cluster node
>> first. Only when a huge part of the billboard should be visible on the
>> camera, it suddenly also appears on the second node. I expect the
>> following fact to be the reason of this problem:
>>
>> The billboard’s vertices are starting in the lower left corner with
>> (0,0) and grow to the right and top. Maybe the clipping algorithm is
>> only using the (0,0) point to determine the affected cameras/cluster
>> nodes.
>
> hm, what are you using to build the billboards? A Geometry below a
> Billboard?

In this case, I create the Billboard functionality for myself. I have
a simple Geometry containing a GL_POLYGON (it is not a GL_QUAD because
I also want to be able to create planes with rounded corners). This
node is a direct child of the world and I update its transformation
the following way:
- Translation: I calculate a position very close to the user for
different reasons.
- Rotation: First, I extract the up and right vector from the user's
transformation matrix (model view matrix) and do some scaling stuff.
Then, I retrieve the field of the plane's geometry and update the
vertices based on the up and right vector.

>
>
>> Therefore, the idea is to create a second geometry with the same
>> material that has its starting point in the upper right corner instead
>> of the lower left. This way I draw two billboards with the same size,
>> but the clipping algorithm should send any of them to the cluster
>> nodes and there should always be a visible billboard on all cameras -
>> even in the overlapping areas.
>
> urgh, apart from being ugly this workaround also has the potential to
> show artefacts from depth fighting between coplanar polygons.

Ok, so I will not try this first and hopefully we find a better solution.

>
>> This is a bad workaround and increases the number of triangles in the
>> scene. Is there a more straightforward solution? Maybe disabling
>> clipping on the billboards or something similar?
>
> well, if the problem is incorrect culling of billboards, I'd say the
> best solution is to fix that ;) ;)
> For that I'd appreciate it if you could provide some information how
> your billboards are built, i.e. which classes you use, how the relevant
> parts of the scenegraph look like.
> As a workaround and to confirm that the bounding volumes/culling are the
> problem you could just make the bounding volume of your billboard very
> large and mark it as static - you can also try to mark it as infinite,
> but I vaguely recall some problems with that a while back;
> see Volume::setStatic() Volume::setInfinity().

In case of setInfinity(), nothing changes and in case of setStatic(),
the plane completely disappears.

I also changed the way the vertices are positioned:
OSG::beginEditCP(pos, OSG::GeoPositions3f::GeoPropDataFieldMask);
{
        (*it) = OSG::Pnt3f(0,0,0); it++;
        (*it) = OSG::Pnt3f(Width); it++;
        (*it) = OSG::Pnt3f(Width+Height); it++;
        (*it) = OSG::Pnt3f(Height); it++;
}
OSG::endEditCP(pos, OSG::GeoPositions3f::GeoPropDataFieldMask);

and

OSG::beginEditCP(pos, OSG::GeoPositions3f::GeoPropDataFieldMask);
{
        (*it) = OSG::Pnt3f(-Width-Height); it++;
        (*it) = OSG::Pnt3f( Width-Height); it++;
        (*it) = OSG::Pnt3f( Width+Height); it++;
        (*it) = OSG::Pnt3f(-Width+Height); it++;
}
OSG::endEditCP(pos, OSG::GeoPositions3f::GeoPropDataFieldMask);

The clipping is different, but nevertheless he also clips the second version.

I think, I change the way of positioning and move them away from the
user and change the selection logic so that they are slected first,
even when they are not the first in front of the user. This Way I
should avoid the clipping problem.

But, maybe this way of updating the vertices is the problem and I
should really rotate them instead?
What do you think or do you have any other idea?

>
>        Cheers,
>                Carsten
Cheers,
Max

>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>

------------------------------------------------------------------------------

_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to