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 

Fix: Optimizer::SpatializeGroupsVisitor blows away Geode StateSets


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





PostPosted: Wed Mar 25, 2009 7:10 pm    Post subject:
Fix: Optimizer::SpatializeGroupsVisitor blows away Geode StateSets
Reply with quote

Attached is a patch for osgUtil::Optimizer. If you run the SpatializeGroupsVisitor on a scene graph containing Geodes, StateSets attached to Geodes can be lost.

The problem is in SpatializeGroupsVisitor::divide(osg::Geode*, unsigned int) where the code creates a new Group and divides up the input Geode into one Geode per Drawable.

I fixed the problem by assigning the Geode's stateset to the new parent group.

To replicate the bug, see attached osg/dds files:

osgviewer b.osg -- model renders correctly
set OSG_OPTIMIZER="SPATIALIZE_GROUPS"
osgviewer b.osg -- textures are missing.



Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791

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


Joined: 18 Mar 2009
Posts: 12205

PostPosted: Wed Apr 08, 2009 10:50 am    Post subject:
Fix: Optimizer::SpatializeGroupsVisitor blows away Geode StateSets
Reply with quote

Thanks Glenn, fix now merged and submitted to svn/trunk and OSG-2.8 branch

On Wed, Mar 25, 2009 at 8:09 PM, Glenn Waldron < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Attached is a patch for osgUtil::Optimizer. If you run the SpatializeGroupsVisitor on a scene graph containing Geodes, StateSets attached to Geodes can be lost.

The problem is in SpatializeGroupsVisitor::divide(osg::Geode*, unsigned int) where the code creates a new Group and divides up the input Geode into one Geode per Drawable.

I fixed the problem by assigning the Geode's stateset to the new parent group.

To replicate the bug, see attached osg/dds files:

osgviewer b.osg -- model renders correctly
set OSG_OPTIMIZER="SPATIALIZE_GROUPS"
osgviewer b.osg -- textures are missing.



Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791

_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org



------------------
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 Changing statesets at runtime digmike General 0 Fri Jan 04, 2019 7:21 pm View latest post
No new posts osg::Geode is not seen when added as ... aozdin General 2 Wed Feb 28, 2018 1:42 pm View latest post
No new posts CullVisitor::apply(Geode&) detect... romulogcerqueira General 7 Wed Aug 30, 2017 3:27 pm View latest post
No new posts Optimizer::RemoveLoadedProxyNodesVisi... guyv General 2 Fri Apr 28, 2017 5:09 pm View latest post
No new posts How can I get pixels 3D coordinates a... YrieixLeprince General 2 Wed Apr 12, 2017 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