Hi Robert,
I am very thankful for every hint, really. These hints are really valuable
for optimization. And I found the issue, it was pre/post multiply order of
the matrices. I was to avoid the calculus from the nodepath and use the
ModelView matrix already available in the CullVisitor. Here is
I don't have time to dive deeply in user projects, I can do quick
scans of email and provide quick replies where possible. In terms of
optimization I'd say avoiding the inverse matrix might be useful.
Using the Matrix.postMultTrans/preMultTrans would also be another
optimization step you could
Thanks Robert,
I am aware of it, it is already used in my second snippet. Here it is: (is
it done properly?)
1. void MyCullVisitor::apply(osg::LightSource& node)
2. {
3.
4. osg::Matrixd inverseViewMatrix = osg::Matrixd::inverse(
getCurrentCamera()->getViewMatrix());
5.
Hi Nick,
The osgUtil::CullVisitor has the maintains a stack of ModelViewMatrix
that it accumulates through the the scene graph traversal, you should
just need to get the top of this stack using
cullVisitor->getModelViewMatrix().
Robert.
On 2 November 2016 at 22:25, Trajce Nikolov NICK
Hi Community,
I am trying to optimize the rendering. Getting huge update numbers.
The story is this:
My scene has huge number of lights, some are static (streetlights) some
dynamic (a car). The lighting engine needs the World matrix of a
LightSource and the ViewMatrix (which is the same as the
5 matches
Mail list logo