<div dir="ltr">> <span style="font-size:12.8000001907349px">I'm not doing billboards but instanced models</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">then I bet the proposed in the paper instancing will help you ... I did this for complex models (like an airplane) and was in need to maintain matrix for positional update ... Got like 2000 dynamically updated models (each with throusands tris) @ 60Hz . You have to parse the model though to place it into one draw call</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 3:00 PM, Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <div>Am 22.07.2015 um 14:26 schrieb Trajce
      Nikolov NICK:<br>
    </div>
    </span><blockquote type="cite">
      <div dir="ltr">Hi Sebastian,
        <div><br>
        </div><span class="">
        <div>Yah, this is off topic now, but once here: re: trees, I am
          getting on older card ~3 mil @ 60Hz with geometry shaders :-).
          Static though. Why you are using Matrices in Image/Texture for
          vegetation, or you have SpeedTree like vegetation?</div>
      </span></div>
    </blockquote>
    I'm not doing billboards but instanced models(smallest have around
    20 Vertices + normals + tex-coords)  . So i need apart from ground
    color, scale, index into an TextureArray (for diversity) and
    rotation some position of course. A no I'm not using matrices but
    the angle of rotation around my up vector. <br>
    Using billboards and geometry shaders your figures are of course
    absolutly okay. I'll try the vertexDivisor if I have the time. I
    guess for dynamic streaming it will outperform classical texture
    objects (I'll have to test this for particle effects anyways)
    <span class=""><blockquote type="cite">
      <div dir="ltr">
        <div>But anyway, thanks for disabling resize/mipmaping .. not
          sure (getting old :-)) can not recall if we did these for the
          instancing, but for sure I will try it in  the lighting system
          I am working on now .. Thanks a bunch for these hints !</div>
      </div>
    </blockquote></span>
    You're welcome. <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Nick</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote"><span class="">On Wed, Jul 22, 2015 at 2:17 PM,
          Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank"></a><a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span>
          wrote:<br>
          </span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"><span class=""><span>
                <div>Am 22.07.2015 um 14:12 schrieb Trajce Nikolov NICK:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">Hi Sebastian,
                    <div><br>
                    </div>
                    <div>few months ago I tested something (was the
                      lighting system) implementation with updates via
                      osg::Image and osg::Texture - not related to
                      instancing at all, but the mentioned method. My
                      colleague then did benchmarking and the update of
                      the Image (and the texture) by OSG was terribly
                      slow - the same thing using raw OpenGL calls
                      out-performed the one from OSG. I also remember
                      Robert implemented then the Vertex Attribute
                      Divisor wrapper for OSG so it might really need
                      example of these with various techniques ...</div>
                  </div>
                </blockquote>
              </span> Thats right for data dynamically changed via
              texture. Static data is incredibly fast however (I'm
              talking ~1mio trees @30Hz min) . <br>
              Getting slightly off-topic here, but:<br>
              Are you sure you had resizing and mipmapping disabled for
              the texture/image? That is certainly a performance killer.<br>
              </span><blockquote type="cite"><span class=""><span>
                  <div dir="ltr">
                    <div><br>
                    </div>
                    <div>Thanks for the ping :-)</div>
                    <div><br>
                    </div>
                    <div>Nick</div>
                  </div>
                </span>
                </span><div class="gmail_extra"><br>
                  <div class="gmail_quote"><span class=""><span>On Wed, Jul
                      22, 2015 at 1:59 PM, Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span>
                      wrote:<br>
                    </span>
                    </span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000"><span class=""><span>
                          <div>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<span><font color="#888888"><br>
                                Sebastian <br>
                                <br>
                              </font></span></div>
                        </span>
                        </span><blockquote type="cite"><span class=""><span><span>
                              <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 href="http://3dcgtutorials.blogspot.com/2013/09/instancing-with-openscenegraph-part-ii.html" target="_blank">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>
                            </span> </span>
                          </span><div>
                            <div>
                              <div>
                                <div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote"><span class="">On Wed, Jul
                                      22, 2015 at 9:25 AM, Sebastian
                                      Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank"></a><a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span>
                                      wrote:<br>
                                      </span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Hi,<span><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><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><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>
                                        </span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><span>
                                            <br>
                                            Thank you!<br>
                                            <br>
                                            Cheers,<br>
                                            LUO<br>
                                            <br>
                                            ------------------<br>
                                            Read this topic online here:<br>
                                          </span></span><a href="http://forum.openscenegraph.org/viewtopic.php?p=64386#64386" rel="noreferrer" target="_blank"></a><a href="http://forum.openscenegraph.org/viewtopic.php?p=64386#64386" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64386#64386</a><div><div class="h5"><br>
                                          <br>
                                          <br>
                                          <br>
                                          <br>
                                          Attachments:<br>
                                          <a 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><br>
                                            <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
                                            <a 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></div></div></blockquote><div><div class="h5">
                                        <div>
                                          <div> <br>
_______________________________________________<br>
                                            osg-users mailing list<br>
                                            <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
                                            <a 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>
                                      </div></div></blockquote>
                                    </div>
                                    <br>
                                    <br clear="all">
                                    <div><br>
                                    </div>
                                    -- <br>
                                    <div>trajce nikolov nick<br>
                                    </div>
                                  </div><div><div class="h5">
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                  <pre>_______________________________________________
osg-users mailing list
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
                                </div></div></div>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                        <br>
                      </div><div><div class="h5">
                      <div>
                        <div> <br>
_______________________________________________<br>
                          osg-users mailing list<br>
                          <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
                          <a 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>
                          <br>
                        </div>
                      </div>
                    </div></div></blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <span><font color="#888888">
                      <div><br>
                      </div>
                      -- <br>
                      <div>trajce nikolov nick<br>
                      </div>
                    </font></span></div><div><div class="h5">
                <div>
                  <div> <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
osg-users mailing list
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
                  </div>
                </div>
              </div></div></blockquote>
              <br>
            </div><div><div class="h5">
            <br>
            _______________________________________________<br>
            osg-users mailing list<br>
            <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
            <a 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>
            <br>
          </div></div></blockquote>
        </div>
        <br>
        <br clear="all"><span class="HOEnZb"><font color="#888888">
        <div><br>
        </div>
        -- <br>
        <div>trajce nikolov nick<br>
        </div>
      </font></span></div><div><div class="h5">
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
osg-users mailing list
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
    </div></div></blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a 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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">trajce nikolov nick<br></div>
</div>