OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

MergeGeometryVisitor


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Andreas Ekstrand
Guest





PostPosted: Fri Nov 24, 2017 3:27 pm    Post subject:
MergeGeometryVisitor
Reply with quote

Hi,

I think I managed to fix my performance problem in MergeGeometryVisitor. The attached Optimizer.cpp, based on 3.5.8, reintroduces code from 3.5.1's MergeGeometryVisitor::mergeGeode to the new MergeGeometryVisitor::mergeGroup, although somewhat modified from geode to group. It references the drawables and clears them to avoid removing them one by one - as the comment in the reintroduced code says: "now clear the drawable list of the Geode so we don't have to remove items one by one (which is slow)".

This also reintroduces use of the standardDrawables list of non-mergable drawables that are still collected in 3.5.8 but weren't used before this change.

It fixes my problem, since that part now pretty much works as it did before Jannik's changes. I hope it's a robust solution and that it will end up in a 3.5.9 release soon...

Regards,
Andreas

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11910

PostPosted: Fri Nov 24, 2017 3:43 pm    Post subject:
MergeGeometryVisitor
Reply with quote

Hi Andreas,

I have just had a quick look through and I think your changes reveal a
wider bug - that the code assumes that the only children of the Group
being processed are drawables of some kind. In reality the children
of a Group can be of any type, so the code really should be adapted
properly to handle children that are Geometry which can be processed
or any other node (including Drawables but technically this no longer
matters.)

I am not in a position to properly review the code, but as this stand
I don't think just merging your changes would be appropriate. I will
make some time soon to properly look into this and will keep your
changes for reference.

Thanks,
Robert.

On 24 November 2017 at 15:25, Andreas Ekstrand
<> wrote:
Quote:
Hi,

I think I managed to fix my performance problem in MergeGeometryVisitor. The
attached Optimizer.cpp, based on 3.5.8, reintroduces code from 3.5.1's
MergeGeometryVisitor::mergeGeode to the new
MergeGeometryVisitor::mergeGroup, although somewhat modified from geode to
group. It references the drawables and clears them to avoid removing them
one by one - as the comment in the reintroduced code says: "now clear the
drawable list of the Geode so we don't have to remove items one by one
(which is slow)".

This also reintroduces use of the standardDrawables list of non-mergable
drawables that are still collected in 3.5.8 but weren't used before this
change.

It fixes my problem, since that part now pretty much works as it did before
Jannik's changes. I hope it's a robust solution and that it will end up in a
3.5.9 release soon...

Regards,
Andreas






------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Submission Further patch for: MergeGe... Samuel M Submission 2 Tue Jun 17, 2014 6:49 am View latest post
No new posts MergeGeometryVisitor behaviour, is th... Samuel M General 1 Mon Jun 16, 2014 11:01 am View latest post
No new posts osgUtil::Optimizer::MergeGeometryVisitor Poirier, Guillaume General 1 Wed Feb 02, 2011 7:17 pm View latest post
No new posts Optimizer - More handled cases in Mer... Sukender Submission 9 Tue Oct 05, 2010 11:17 am View latest post
No new posts Correction of the MergeGeometryVisitor Lionel Lagarde Submission 1 Tue Mar 10, 2009 9:49 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP