[osg-users] SpeedTree (was General OSG Questions)
Ricko 3D
ricko3D at gmail.com
Wed Aug 29 08:06:36 PDT 2007
Just checking to see if there has been any progress or success by anyone on
this list integrating SpeedTreeRT, www.speedtree.com, into OSG. If not, I'm
considering tackling it when I know more about OSG.
Robert: I haven't made it to learning about OSG custom drawables yet, but to
clarify SpeedTree has a single call (in the easiest integration technique)
that draws the forest (collection of trees or plants, etc.) using their
supplied shaders and their geometry buffers and textures. Any issues I can
foresee might be related to their automatic culling engine or LOD
billboarding. I see your comment about bounding volume below but it will
almost always be the entire scene that is covered (at least for my use of
their trees and foliage). I agree with you about push/pop'ing the state and
I've also had to disable shaders/texture units in my home grown engine when
coming back from the SpeedTree render.
Thanks.
----
From: Robert Osfield <robert.osfield at ...
<http://gmane.org/get-address.php?address=robert.osfield%2dRe5JQEeQqe8Avxtiu
Mwx3w%40public.gmane.org> >
Subject: Re: General OSG Questions
<http://news.gmane.org/find-root.php?message_id=%3c7ffb8e9b0610230904hc013f1
8hfb39e0199a60ab4e%40mail.gmail.com%3e>
Newsgroups: gmane.comp.graphics.openscenegraph.user
<http://news.gmane.org/gmane.comp.graphics.openscenegraph.user>
Date: 2006-10-23 16:04:27 GMT (44 weeks, 1 day, 22 hours and 40 minutes ago)
Hi Jared,
I'm not familiar with speed tree, but it probably can be integrated
as a custom drawable, have a look at the osgteapot example. Important
things will be setting the bounding volume of the drawable and keeping
the state consistent use state.dirty*() calls or
glPushAttrib/glPopAttrib to stop speedtreeRT bleeding state into the
OSG rendering.
Robert.
On 10/23/06, Jared M Johnson <jared at ...
<http://gmane.org/get-address.php?address=jared%2dmZzXLS9A78w3uPMLIKxrzw%40p
ublic.gmane.org> > wrote:
> I am doing an integration of OSG with speedtreeRT.
>
> I am having a few problems related to getting these two programs to
> render correctly together. I'm using the SceneView class to render the
> OSG with a terrain and particle effects. Calling:
>
> sceneViewer->draw ();
>
> Seems to clear the depth buffer, color buffer, and change my GL
> Viewport. Basically, it clears all of my trees that SpeedTree has just
> drawn, and the depth information of these trees. It also creates a
> smaller 800x600 frame within my 1024x768 initial frame. Is there a way
> to turn off this functionality, and have OSG let me do the frame clearing?
>
> I have got OSG working correctly if I use it first, and then draw the
> speedtree trees afterwards, but I am using particle effects, so I think
> that these need to be drawn last, because they show up behind my trees.
>
> I have tried to find all calls to glClear in the source code, but even
> commenting these out, the frames are still cleared. Should I be using a
> different class to render OSG? Any help would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070829/39cb72aa/attachment-0001.htm
More information about the osg-users
mailing list