Hello Carsten, In the meantime, I moved them back into the scene, away from the user. But this didn't help either. But your hint adding another beginEdit and endEdit for the Geometry did it. I thought marking the PositionsField as edited is enough.
Thank you very much! Cheers, Max On Tue, May 25, 2010 at 4:57 PM, Carsten Neumann <carsten_neum...@gmx.net> wrote: > Hello Maximilian, > > Maximilian Haupt wrote: >> On Sat, May 22, 2010 at 1:24 AM, Carsten Neumann >> <carsten_neum...@gmx.net> wrote: >>> Maximilian Haupt wrote: >>>> 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. > > ok. > >>>> 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. > > before calling setStatic(), did you set the bounding volume of the node > to something large? > > beginEditCP(node); > BoxVolume& bvol = node->editVolume(); > bvol.extendBy(Pnt3f( 1000.f, 1000.f, 1000.f)); > bvol.extendBy(Pnt3f(-1000.f, -1000.f, -1000.f)); > bvol.setStatic(); > endEditCP(node); > >> 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. > > hm, I'm wondering if for some reason the bounding volume is not > invalidated when you edit the positions. > Can you try inserting the following after changing the positions: > > beginEditCP(geo, Geometry::PositionsFieldMask); > endEditCP(geo, Geometry::PositionsFieldMask); > > You may also want to enable bounding volume drawing: > ract->setVolumeDrawing(true); > > where ract is the RenderAction you use (you have to do that in the > render servers code though, the RenderAction is not a FieldContainer and > therefore not automatically synced). > >> 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. > > perhaps, but if you have incorrect bounding volumes on the geometry I'm > not sure it will help. > >> 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? > > Is it possible that your geometry is very close to the near clipping > plane and gets clipped by the hardware instead of OpenSG? > > > Cheers, > Carsten > > ------------------------------------------------------------------------------ > > _______________________________________________ > 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