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 

culling / bounding calculation for shader scaled geometries


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
christoph
Newbie


Joined: 10 Jul 2014
Posts: 19

PostPosted: Thu Mar 28, 2019 1:17 pm    Post subject:
culling / bounding calculation for shader scaled geometries
Reply with quote

Hi all,

I need to display textured items in a pixel-constant size even on zooming. For my implementation I use the position as vertices and store the size in the normals. The vertex shader handles it all corrrectly and the image is shown in a constant size.

Unfortunately these items are culled if the position is outside the viewport. That's bad Sad

I tried to use setInitialBound() with a maximum area to define the bounding box to prevent these items from being culled away. But instead of keeping the items on screen this results in scaled items!

What other way could I go to prevent the items from beeing culled? Maybe I have to read back the vertices somehow?

Thank you!

Cheers,
Christoph
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Mar 28, 2019 1:26 pm    Post subject:
culling / bounding calculation for shader scaled geometries
Reply with quote

Hi Christoph,


there is something like setCullingActive(bool) in the interface of the Node classes


[/url] Virus-free. [url=https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link]www.avast.com [url=#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2][/url]

On Thu, Mar 28, 2019 at 2:16 PM Christoph Dohmen < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi all,

I need to display textured items in a pixel-constant size even on zooming. For my implementation I use the position as vertices and store the size in the normals. The vertex shader handles it all corrrectly and the image is shown in a constant size.

Unfortunately these items are culled if the position is outside the viewport. That's bad Sad

I tried to use setInitialBound() with a maximum area to define the bounding box to prevent these items from being culled away. But instead of keeping the items on screen this results in scaled items!

What other way could I go to prevent the items from beeing culled? Maybe I have to read back the vertices somehow?

Thank you!

Cheers,
Christoph

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75742#75742





_______________________________________________
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



--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
christoph
Newbie


Joined: 10 Jul 2014
Posts: 19

PostPosted: Thu Mar 28, 2019 1:50 pm    Post subject:
Reply with quote

Thanks for the hint!

I forgot to mention this. Using setCullingActive( false ) works, but I want the item to be culled if it is completely outside the viewport.

Thank you!

Cheers,
Christoph
Back to top
View user's profile Send private message
GarfieldPig
Appreciator


Joined: 26 Oct 2018
Posts: 129

PostPosted: Thu Mar 28, 2019 2:07 pm    Post subject:
Reply with quote

Hi,


the init boundbox will be recomputed in many node's ComputeBound method,so it don't work.

if possible,you can rewrite the ComputeBound() method.Or,I think osg::Node::ComputeBoundCallback can help you out,but I'm not sure whether the ComputeBound method which your texture item 's node use support this way.

anyway,It depend on your node's computeBound method.

Thank you!

Cheers,
Qi Yu
Back to top
View user's profile Send private message
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 Layered rendering with a geometry shader AnyOldName3 General 8 Tue May 14, 2019 11:25 pm View latest post
No new posts Write Image From texture Generated by... GarfieldPig General 1 Wed May 08, 2019 11:42 am View latest post
No new posts override the texture with the gl_frag... GarfieldPig General 1 Sun Apr 14, 2019 8:31 am View latest post
No new posts Colored Bounding Box over osgText::Text dhhabyc General 1 Fri Apr 05, 2019 12:43 pm View latest post
No new posts why does the adding of lighting shade... mirro General 0 Mon Feb 11, 2019 3:03 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