Attached are some example files that illustrates the problem AND the solution.

The original osg file (created without FSTDSS):
 * billboardtest_original.osg

How the behaviour was before my fix:
 * billboardtest_fstdss_incorrect.osg

With my fix:
 * billboardtest_fstdss_corrected.osg


On Mon, 17 Nov 2008 19:39:52 +0100, Joakim Simonsson <[EMAIL PROTECTED]> wrote:


Hi,

When using optimizer option
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS, billboards are not
correctly handled.


Description:

If a (rotated) matrixtransform had a billboard as child, the geometry of
the billboard did get the wrong position and/or rotation.

Fix:

All vertices/normals of a billboard's geometry are now transformed. The
position of the billboard is then subtracted from the vertices of the
geometry.



Files modified:

src\osgUtil\Optimizer.cpp
include\osgUtil\Optimizer







--
Joakim Simonsson

Attachment: billboardtest_fstdss_corrected.osg
Description: Binary data

Attachment: billboardtest_fstdss_incorrect.osg
Description: Binary data

Attachment: billboardtest_original.osg
Description: Binary data

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to