[osg-users] Culling and instanced drawing

Werner.Modenbach at texion.eu Werner.Modenbach at texion.eu
Fri Jul 13 12:30:21 PDT 2018


Thanks. Any suggestion how to know this?

On 13. Juli 2018 21:27:30 MESZ, Julien Valentin <julienvalentin51 at gmail.com> wrote:
>Indeed...
>
>wernerM wrote:
>> B.T.W. Is there any way of doing the culling in Tesselation- or
>> Geometry-Shader?
>> In this case I need to know if the vertices are visible or not.
>> 
>> Am 13.07.2018 um 18:51 schrieb Robert Osfield:
>> 
>> > Hi Werner,
>> > 
>> > The best way to handle the vertex shader moving geometry to new
>> > locations is to use a custom
>osg::DrawableComputeBoundingBoxCallback
>> > that you assign the the drawable that you are using for instancing.
>> > You'll want to return a BoundingBox that encompasses all the
>positions
>> > that the transformed geometries can occupy.
>> > 
>> > Robert.
>> > On Fri, 13 Jul 2018 at 17:44, Werner Modenbach
>> > <> wrote:
>> > 
>> > > Hi all,
>> > > 
>> > > maybe someone has some inspiration for me.
>> > > I have a scene graph where the same object (plenty of vertices)
>is drawn
>> > > in many instances.
>> > > Each instance gets an offset matrix to move the object to some
>place.
>> > > If I do the rendering without instances the culling removes those
>> > > objects from the draw list that are not visible.
>> > > Is there any way to implement such culling also with instances?
>> > > I think I need to remove the invisible matrices from the list and
>reduce
>> > > the number of instances somehow.
>> > > 
>> > > Any idea where to do it?
>> > > 
>> > > Thanks
>> > > 
>> > > - Werner -
>> > > 
>> > > 
>> > > _______________________________________________
>> > > osg-users mailing list
>> > > 
>> > >
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> > > 
>> > _______________________________________________
>> > osg-users mailing list
>> > 
>> >
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> > 
>> 
>> 
>> _______________________________________________
>> osg-users mailing list
>> 
>>
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> 
>>  ------------------
>> Post generated by Mail2Forum
>
>
>------------------------
>Twirling twirling twirling toward freedom
>
>------------------
>Read this topic online here:
>http://forum.openscenegraph.org/viewtopic.php?p=74342#74342
>
>
>
>
>
>_______________________________________________
>osg-users mailing list
>osg-users at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180713/113e47ad/attachment.html>


More information about the osg-users mailing list