<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Nick, <br>
      <br>
      The implementation is almost to complicated. Using instancing with
      osg::Image and a texture almost beats all other implementations
      I've tested so far in terms of complexity and performance.<br>
      Maybe we should some more examples for this to osg.<br>
      Cheers<br>
      Sebastian <br>
      <br>
    </div>
    <blockquote
cite="mid:CAO-+zi=eqD+EFbD6kP4XyHJE2h+PhGb-L_JD5zSZFbN_aLdVZw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Luo,
        <div><br>
        </div>
        <div>have a look at this paper - it is OSG related with GL calls
          (In the latest OSG release there are OSG wrappers for most of
          them). It will help you with large number of instancing and
          controlling each instance separately</div>
        <div><br>
        </div>
        <div><a moz-do-not-send="true"
href="http://3dcgtutorials.blogspot.com/2013/09/instancing-with-openscenegraph-part-ii.html">http://3dcgtutorials.blogspot.com/2013/09/instancing-with-openscenegraph-part-ii.html</a><br>
        </div>
        <div><br>
        </div>
        <div>Hope it helps</div>
        <div>Nick</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jul 22, 2015 at 9:25 AM,
          Sebastian Messerschmidt <span dir="ltr"><<a
              moz-do-not-send="true"
              href="mailto:sebastian.messerschmidt@gmx.de"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:sebastian.messerschmidt@gmx.de">sebastian.messerschmidt@gmx.de</a></a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span
              class=""><br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                Hi,<br>
                <br>
                I need to use cylinder to simulate the “ladder”.  So
                there are many cylinder to create. I new a osg::Geode ,
                and then use it to new 10000 osg::MatrixTransform, all
                these osg::MatrixTransform were added to one group.<br>
                <br>
                But the program runs very very slow.<br>
              </blockquote>
            </span>
            Are you testing in debug mode?<span class=""><br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                In fact I create the same scene using opengl, the
                program runs quickly.<br>
              </blockquote>
            </span>
            Are you using the osg::Shapedrawable for the cylinder shape?
            Try to replace it with a simple triangle for testing to see
            if the geometry or the transforms are your bottleneck.<br>
            <br>
            I'd use hw-instancing for this amount of copies of a simple
            geometry or bake the transformations into big geometries
            representing hundreds of cylinders each.<br>
            <br>
            Also if the 10000 elements are spatially separable and thus
            not all of them in the view at the same time you should use
            some grouping to balance your scenegraph. Simply putting
            10000 transforms into one group most likely will kill
            performance, as all children will have to be traversed each
            frame.<span class=""><br>
              <br>
              <br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <br>
                How can I upgrade my program?<br>
                thanks.<br>
              </blockquote>
            </span>
            Can you provide a more detailed description or an example?
            Your question is too open to get you specific answers.<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
                class="">
                <br>
                Thank you!<br>
                <br>
                Cheers,<br>
                LUO<br>
                <br>
                ------------------<br>
                Read this topic online here:<br>
              </span><a moz-do-not-send="true"
                href="http://forum.openscenegraph.org/viewtopic.php?p=64386#64386"
                rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64386#64386</a><br>
              <br>
              <br>
              <br>
              <br>
              Attachments:<br>
              <a moz-do-not-send="true"
                href="http://forum.openscenegraph.org//files/mfc_osg_124.cpp"
                rel="noreferrer" target="_blank">http://forum.openscenegraph.org//files/mfc_osg_124.cpp</a><br>
              <br>
              <br>
              _______________________________________________<br>
              osg-users mailing list<span class=""><br>
                <a moz-do-not-send="true"
                  href="mailto:osg-users@lists.openscenegraph.org"
                  target="_blank">osg-users@lists.openscenegraph.org</a><br>
                <a moz-do-not-send="true"
href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"
                  rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
              </span></blockquote>
            <div class="HOEnZb">
              <div class="h5">
                <br>
                _______________________________________________<br>
                osg-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:osg-users@lists.openscenegraph.org"
                  target="_blank">osg-users@lists.openscenegraph.org</a><br>
                <a moz-do-not-send="true"
href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"
                  rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">trajce nikolov nick<br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>