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 

inactive Culling and update Near/Far


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Mathieu (Mathieu MARACHE)
Appreciator


Joined: 29 Oct 2009
Posts: 108

PostPosted: Mon Dec 04, 2017 9:46 am    Post subject:
inactive Culling and update Near/Far
Reply with quote

Hi Robert,


I believe the mailing-list is the prefered way of discussing issues. You've rejected my last PRs (on master and OSG-3.4 branches)


src/osgUtil/CullVisitor.cpp: 1004
I proposed to replace :



        if (!updateCalculatedNearFar(matrix,drawable,false)) return;

by

        if (drawable.isCullingActive() && !updateCalculatedNearFar(matrix,drawable,false)) return;



But I didn't give context enough... I'm still trying to get the osgDB_logo not being culled. The way it is done is that there is a Drawable created with the image that ha a special drawImplementation method to draw directly on the framebuffer.


This drawable has it's culling disabled (with no geometry) still has a bounding box (at the origin).

When passing through the CullVisitor it's BB get's to update the near far planes before my proposed change... Which could lead to the Drawable being culled when the scene is not centered around the origin (which is my case most of the time being using osg and osgEarth for country size models).




The change was then : When a drawable doesn't want to be culled don't use it to update the calculated Near/Far planes...





For context here are your two comments on these PRs :


Quote:
Toggling culling off is not toggling off the compute of the near/far, it's two very different things so it's inappropriate to put in this extra isCullingActive at this point. There is already an isCullingActive() above this code block. If there is an issue with the bounding volume then this should be addressed elsewhere.


and


Quote:
I don't understand why you put the isCullingActive into the a line about updating the near far values. There is a isCullingActive() earlier in the method already.


Maybe now it is clearer ? I agree it is not really satisfactory, do you have maybe another idea on how to solve this issue.



BTW updateCalculatedNearFar return value is used to discard a drawable if the whole object is behind the eye point



--
nǝıɥʇɐƜ

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11910

PostPosted: Mon Dec 04, 2017 9:52 am    Post subject:
inactive Culling and update Near/Far
Reply with quote

Hi Mathieu,

The logo plugin is an bit of old quick and dirty solution for putting
up a logo on a window. It's not how I'd recommend users do this type
of functionality these days.

Trying to get the logo plugin to work perfectly by hacking the core
OSG is something I'm not happy with at all. Perhaps the solution is to
just remove it, let users do it properly in their own applications.

Robert.

On 4 December 2017 at 09:44, Mathieu MARACHE <> wrote:
Quote:
Hi Robert,

I believe the mailing-list is the prefered way of discussing issues. You've
rejected my last PRs (on master and OSG-3.4 branches)

src/osgUtil/CullVisitor.cpp: 1004
I proposed to replace :

if (!updateCalculatedNearFar(matrix,drawable,false)) return;
by
if (drawable.isCullingActive() &&
!updateCalculatedNearFar(matrix,drawable,false)) return;

But I didn't give context enough... I'm still trying to get the osgDB_logo
not being culled. The way it is done is that there is a Drawable created
with the image that ha a special drawImplementation method to draw directly
on the framebuffer.

This drawable has it's culling disabled (with no geometry) still has a
bounding box (at the origin).
When passing through the CullVisitor it's BB get's to update the near far
planes before my proposed change... Which could lead to the Drawable being
culled when the scene is not centered around the origin (which is my case
most of the time being using osg and osgEarth for country size models).


The change was then : When a drawable doesn't want to be culled don't use it
to update the calculated Near/Far planes...


For context here are your two comments on these PRs :

Quote:
Toggling culling off is not toggling off the compute of the near/far, it's
two very different things so it's inappropriate to put in this extra
isCullingActive at this point. There is already an isCullingActive() above
this code block. If there is an issue with the bounding volume then this
should be addressed elsewhere.


and

Quote:
I don't understand why you put the isCullingActive into the a line about
updating the near far values. There is a isCullingActive() earlier in the
method already.


Maybe now it is clearer ? I agree it is not really satisfactory, do you have
maybe another idea on how to solve this issue.

BTW updateCalculatedNearFar return value is used to discard a drawable if
the whole object is behind the eye point

--
nǝıɥʇɐƜ





------------------
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 Camera serializer and culling mp3butcher General 1 Sat Apr 21, 2018 12:16 pm View latest post
No new posts EXTERNAL: Re: Getting a callback to u... Rowley, Marlin R General 1 Tue Apr 10, 2018 6:58 pm View latest post
No new posts Getting a callback to update shaders? Rowley, Marlin R General 2 Tue Apr 10, 2018 12:49 pm View latest post
No new posts AutoTransform, ROTATE_TO_SCREEN and s... hartwigw General 7 Mon Mar 26, 2018 9:28 pm View latest post
No new posts Prevention of near plane culling whil... hartwigw General 3 Sat Mar 10, 2018 7:57 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