[osg-users] "Robust" Update of an osg::Image attached to a osg::camera ?
robert.osfield at gmail.com
Mon Mar 9 06:57:28 PDT 2009
Could you please do a reply to on the original thread in future, so
that people following the thread can view all the posts in sequence -
this post starts a new thread so looses the continuity.
As for your explanation, I'm afraid it fill in a few missing pieces in
the jigsaw, but also leaves many more answered. Rather than write
pseudo code please just post your segments of your code itself.
You mention embedded use of the viewer, but embedded in what? Do you
explictly specify single threaded?
The call to image->dirty() is suspicious - this shouldn't be required
and suggests that something else is wrong with your setup. Your call
to updateTraversal() is also superfluous as frame() calls
On Mon, Mar 9, 2009 at 1:46 PM, Erwan Bigorgne <erwan.bigorgne at gmail.com> wrote:
>>How are you setting up your scene + viewer to
>>render to the image?
> basically :
> mesh (readnodefile) -> PAT (internal) -> PAT (external)
> ------------------> Rootnode -> viewer
> MyCam _____________|
> |_____> Depth Map (osg::Image)
>>Is your rendering just for the purpose of
>>generating an osg::Image as output?
> Actually, I just need a depth map, so the image is the only output for the
> "osg part"
>>How you are testing the results
>>of the image?
> my eyes (considering the next answer)
>> What threading model have you used?
> no thread I think... this basic osg structure is "embedded" and called once
> at each iteration :
> something like :
> ---->access to the current Depth Map (osg::Image attached to the camera)
>>As a general note, can you do the processing in shaders instead on the
>>CPU? Avoiding the readback from the GPU to main memory can be a big
>>save in performance.
> Although i handle a little Comp.Vision, I 'm really newborn in Comp Graph
> Are you telling me that if i'd define a chain camera -> texture -> image, my
> depth map would be would be computed by the CPU?
> If not, what I have to do ?
> On Mon, Mar 9, 2009 at 12:52 PM, Erwan Bigorgne
> <erwan.bigor... at gmail.com> wrote:
>> I'm currently using (and learning) osg in order to manage an implicite 3D-
>> model in an computer vision task.
>> for that purpose, i need to compute a reliable depth map, that i intend to
>> update at each step of the algorithm.
>> I've almost reach that goal, but sometimes, the generated osg::Image (i.e.
>> the depth map) is either corrupt (two geometrical states of the model are
>> partially rendered), or just not updated at all.
>> osg::Image->dirty() makes things better but not perfect.
>> Any Idea about what i should do next or about what I should care?
>> (btw, excuse my poor english)
>> osg-users mailing list
>> osg-us... at lists.openscenegraph.org
> osg-users mailing list
> osg-us... at lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users