Hi Oliver,
On Fri, 2005-10-14 at 13:44 +0200, Oliver Kutter wrote:
> Hi,
>
> I have a geometry with particles (gl_points) and I move them by a
> shader. The origin of the particles is at a specific point in the scene.
> But when I move or rotate the scene and the origin is outside my
> viewport (culled away), the geometry is not shown anymore. That's
> correct, but it's bad for me, because it could be, that my particles are
> in the scene furthermore (because moved by the shader).
>
> It there a way to force the geometry to be drawn, even if it is in a non
> visible area? Or is there a shader solution?
The shader is the problem, not the solution. ;) The besy way to handle
this is knowing in which volume the particles can be. Then you can set
the bounding volume of the Node that contains them to that volume and
make it static:
// set volume static to prevent constant update
beginEditCP(pnode, Node::VolumeFieldMask);
Volume &v=pnode->getVolume(false).getInstance();
v.setEmpty();
v.extendBy(Pnt3f(0,0,0));
v.extendBy(Pnt3f(1,1,1));
v.setStatic();
((DynamicVolume&)pnode->getVolume()).instanceChanged();
endEditCP (pnode, Node::VolumeFieldMask);
If you don't know the volume just make it big. ;)
Hope it helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users