Discussion:
[osg-users] update node in view using cullcallback
Cong Ye
2018-08-29 23:40:33 UTC
Permalink
Hi,

I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or not culled. The most straightforward method come to me is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?

Thank you!

Cheers,
Cong

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74619#74619
Cong Ye
2018-08-30 05:58:46 UTC
Permalink
One following question is how can I do the same for drawable and attribute callback?
Hi,
I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or are not culled. The most straightforward method is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?
Thank you!
Cheers,
Cong
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74621#74621
Robert Osfield
2018-08-30 06:50:25 UTC
Permalink
Hi Cong,

Whether it's safe to do or not will depend the threading you are using
in your viewer. If you viewer is running single threaded then it
should be fine to use cull callbacks. However, if you have multiple
cull traversals threads happening in parallel then you'll end up with
a potential race condition unless you mutex your callbacks.

Robert.
Post by Cong Ye
Hi,
I am recently working on a big scene simulation project. To optimize the performance, we consider to only update elements (material color, position, rotation etc.) in frustum or not culled. The most straightforward method come to me is using cullcallback to do the update. I implemented it and it works. However, after come across some online articles, most of them are not suggested to use cullcallback. Could I ask is there any drawbacks to do so?
Thank you!
Cheers,
Cong
------------------
http://forum.openscenegraph.org/viewtopic.php?p=74619#74619
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Loading...