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 

Viewer with 2 overlay nodes


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Ortiz, Rodolfo
Guest





PostPosted: Thu Oct 16, 2008 5:48 pm    Post subject:
Viewer with 2 overlay nodes
Reply with quote

Hello,

This may be a silly question, but is it possible to have more than one OverlayNode in a scene? I ran a quick test using osganimate.cpp and I get strange results (see JPEG). I would expect to see two planes, each one projected to a different base. Instead, I get two planes, but with one plane projected to both bases (and no projection for the other one). By having 2 overlayNodes in my application, I can have the ability to “highlight” one node but not the other.

My main changes to osganimate are:

osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode(technique);
overlayNode->setContinuousUpdate(true);
overlayNode->setOverlaySubgraph(movingModel);
overlayNode->setOverlayBaseHeight(baseHeight-0.01);
overlayNode->addChild(baseModel);
root->addChild(overlayNode);

osgSim::OverlayNode* overlayNode2 = new osgSim::OverlayNode(technique);
overlayNode2->setContinuousUpdate(true);
overlayNode2->setOverlaySubgraph(movingModel2);
overlayNode2->setOverlayBaseHeight(baseHeight-0.01);
overlayNode2->addChild(baseModel2);
root->addChild(overlayNode2);
Am I missing something in the code? I am using osg2.6.0 with WindowsXP SP3, thanks,
-Rodolfo

------------------
Post generated by Mail2Forum
Back to top
Glenn Waldron
Guest





PostPosted: Thu Oct 16, 2008 6:09 pm    Post subject:
Viewer with 2 overlay nodes
Reply with quote

Rodolfo,

You probably need to set a different texture unit for each overlay; see OverlayNode::setOverlayTextureUnit(2) for the second overlay node. Just a guess.. -gw

On Thu, Oct 16, 2008 at 1:48 PM, Ortiz, Rodolfo < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

Hello,

This may be a silly question, but is it possible to have more than one OverlayNode in a scene? I ran a quick test using osganimate.cpp and I get strange results (see JPEG). I would expect to see two planes, each one projected to a different base. Instead, I get two planes, but with one plane projected to both bases (and no projection for the other one). By having 2 overlayNodes in my application, I can have the ability to "highlight" one node but not the other.

My main changes to osganimate are:

osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode(technique);
overlayNode->setContinuousUpdate(true);
overlayNode->setOverlaySubgraph(movingModel);
overlayNode->setOverlayBaseHeight(baseHeight-0.01);
overlayNode->addChild(baseModel);
root->addChild(overlayNode);

osgSim::OverlayNode* overlayNode2 = new osgSim::OverlayNode(technique);
overlayNode2->setContinuousUpdate(true);
overlayNode2->setOverlaySubgraph(movingModel2);
overlayNode2->setOverlayBaseHeight(baseHeight-0.01);
overlayNode2->addChild(baseModel2);
root->addChild(overlayNode2);
Am I missing something in the code? I am using osg2.6.0 with WindowsXP SP3, thanks,
-Rodolfo


Quote:
This e-mail, including any attachments, contains information intended only for
the use of the individual or entity to which it is addressed and may contain
information that is privileged and/or confidential or is otherwise protected by
law. If you are not the intended recipient or agent or an employee responsible
for delivering the communication to the intended recipient, you are hereby
notified that any review, use, disclosure, copying and/or distribution of its
contents is prohibited. If you have received this e-mail in error, please
notify us immediately by reply to sender only and destroy the original.

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




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

------------------
Post generated by Mail2Forum
Back to top
Ortiz, Rodolfo
Guest





PostPosted: Thu Oct 16, 2008 8:38 pm    Post subject:
Viewer with 2 overlay nodes
Reply with quote

That did the trick, thanks,

-Rodolfo


From: [mailto:] On Behalf Of Glenn Waldron
Sent: Thursday, October 16, 2008 12:09 PM
To: OpenSceneGraph Users
Subject: Re: Viewer with 2 overlay nodes


Rodolfo,

You probably need to set a different texture unit for each overlay; see OverlayNode::setOverlayTextureUnit(2) for the second overlay node. Just a guess.. -gw
On Thu, Oct 16, 2008 at 1:48 PM, Ortiz, Rodolfo < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Hello,

This may be a silly question, but is it possible to have more than one OverlayNode in a scene? I ran a quick test using osganimate.cpp and I get strange results (see JPEG). I would expect to see two planes, each one projected to a different base. Instead, I get two planes, but with one plane projected to both bases (and no projection for the other one). By having 2 overlayNodes in my application, I can have the ability to "highlight" one node but not the other.

My main changes to osganimate are:

osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode(technique);
overlayNode->setContinuousUpdate(true);
overlayNode->setOverlaySubgraph(movingModel);
overlayNode->setOverlayBaseHeight(baseHeight-0.01);
overlayNode->addChild(baseModel);
root->addChild(overlayNode);

osgSim::OverlayNode* overlayNode2 = new osgSim::OverlayNode(technique);
overlayNode2->setContinuousUpdate(true);
overlayNode2->setOverlaySubgraph(movingModel2);
overlayNode2->setOverlayBaseHeight(baseHeight-0.01);
overlayNode2->addChild(baseModel2);
root->addChild(overlayNode2);
Am I missing something in the code? I am using osg2.6.0 with WindowsXP SP3, thanks,
-Rodolfo


Quote:
This e-mail, including any attachments, contains information intended only forthe use of the individual or entity to which it is addressed and may containinformation that is privileged and/or confidential or is otherwise protected bylaw. If you are not the intended recipient or agent or an employee responsiblefor delivering the communication to the intended recipient, you are herebynotified that any review, use, disclosure, copying and/or distribution of itscontents is prohibited. If you have received this e-mail in error, pleasenotify us immediately by reply to sender only and destroy the original.


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



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

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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 Capturing all visible nodes ijwolf8 General 9 Fri Jan 18, 2019 9:16 pm View latest post
No new posts Happy New Year to all OSG Users Chris Hanson General 0 Mon Jan 07, 2019 10:17 am View latest post
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts osg-users Digest, Vol 137, Issue 14 poweruserm@live.com.au General 0 Fri Nov 16, 2018 11:16 pm View latest post
No new posts General Users starting questions in O... A Z General 1 Mon Oct 15, 2018 3:59 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