Hi Pawel,

Thanks for the example, it works great on my Geforce 580Ti.  For the
cell size I've changed the default size to be sqrtf(numTrees) so that
it scales more appropriately, and will default to 100 which suits the
GLSL based techniques better.  I have changed the command line
parameter for controlling the number of trees per cell to to
--trees-per-cell to be more in keeping with usage elsewhere in the OSG
and other command line applications.

With the move towards using shaders the osgforest example is possibly
becoming a bit outdated - a lot more can done down with shaders so the
actual trees could be rendered in a more sophisticated way.   This is
a huge topic that I'll not dive into now, plenty of other work to do
:-)

Robert.

On 23 May 2013 01:35, Paweł Księżopolski <[email protected]> wrote:
> Hi Robert
>
>
> robertosfield wrote:
>>
>> Any chance you could write an example to test out the new functionality?
>>
>
>
> I'm sending you a modified osgforest example that uses
> geometry instancing with texture buffer objects.
> In this example TBOs are holding information about position, color
> and size of each tree. Also all steps necessary to use geometry
> instancing are shown ( setUseVertexBufferObjects(true), 
> setUseDisplayList(false),
> setNumInstances(), setInitialBound() ).
>
> I have few issues with that example :
>
> - dividing cells to maximum 10 trees in a cell is against geometry instancing 
> idea
>   ( draw maximum quantity of objects in one glDraw call ) and with such small 
> cells
>   this example renders very slow. I added parameter "--trees_per_cell" which 
> changes
>   the default cell size. Following command shows that geometry instancing 
> works as
>   expected :
>
>    osgforest --trees_per_cell 200
>
> - this example uses one osg::TextureBuffer per cell. It may be further 
> optimized
>   by introducing only one osg::TextureBuffer per whole forest, but the 
> example will
>   become less understandable and not analogous to other forest techniques.
>
> - I used shaders with GLSL version 420. Is it a problem ?
>
> Cheers
> Paweł Księżopolski
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54115#54115
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/osgforest_204.zip
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to