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 

Invisible light points


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





PostPosted: Fri Aug 04, 2017 11:12 am    Post subject:
Invisible light points
Reply with quote

Hi,

I recently moved from OSG 3.2.1 to 3.5.6 and now I have problems with light points going invisible if rendered together with other geometry.

I managed to reproduce in a small test case - have a look at the attached lp and lp_poly models (both in 3.5.6 osgt and deprecated osg which I find easier to debug). With 3.5.6, I can only see the light points in the lp model and not in the lp_poly model - any idea why?

I tried disabling culling, changing render binds, removing all StateSets in the osg files. No matter what, it seems the geode causes the light points to be invisible. How can I fix this?

Regards,
Andreas

------------------
Post generated by Mail2Forum
Back to top
Andreas Ekstrand
Guest





PostPosted: Fri Aug 18, 2017 7:31 am    Post subject:
Invisible light points
Reply with quote

Did someone manage to reproduce this problem? Any suggestions are welcome, I really don't understand what's happening here...
/Andreas


On 2017-08-04 13:12, Andreas Ekstrand wrote:

Quote:
Hi,

I recently moved from OSG 3.2.1 to 3.5.6 and now I have problems with light points going invisible if rendered together with other geometry.

I managed to reproduce in a small test case - have a look at the attached lp and lp_poly models (both in 3.5.6 osgt and deprecated osg which I find easier to debug). With 3.5.6, I can only see the light points in the lp model and not in the lp_poly model - any idea why?

I tried disabling culling, changing render binds, removing all StateSets in the osg files. No matter what, it seems the geode causes the light points to be invisible. How can I fix this?

Regards,
Andreas



Quote:
_______________________________________________
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


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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Fri Aug 18, 2017 9:14 am    Post subject:
Invisible light points
Reply with quote

Hi Andreas,

On 18 August 2017 at 08:30, Andreas Ekstrand < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Did someone manage to reproduce this problem? Any suggestions are welcome, I really don't understand what's happening here...



I haven't had a chance to test the issue yet.  In the latest OSG there are rewrites of various parts of the OSG to move fully over to use vertex arrays and supporting VAO's, my guess is this work touched upon osgSim::LightPoint* functionality and introduced a regression, as to what this might be I can't say without reproduce the issue and investigating the related code. 

In general the behaviour you describe sounds like vertex array state that is not being set up correctly so the values used by the driver are just the last ones to be set rather than the one intended.


Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Andreas Ekstrand
Guest





PostPosted: Fri Aug 18, 2017 2:11 pm    Post subject:
Invisible light points
Reply with quote

Strange, thought the reply-to address was set from osg-users...this was what I accidentally sent to Robert only:

Hi Robert,

Thanks for your reply, I realize you're busy with 3.4.1 right now. But if you can find the time to look into this I have also attached a simple example reproducing the issue in code. Commenting in adding of the geode will hide the light points.

/Andreas



On 2017-08-18 11:12, Robert Osfield wrote:

Quote:
Hi Andreas,

On 18 August 2017 at 08:30, Andreas Ekstrand < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Did someone manage to reproduce this problem? Any suggestions are welcome, I really don't understand what's happening here...



I haven't had a chance to test the issue yet.  In the latest OSG there are rewrites of various parts of the OSG to move fully over to use vertex arrays and supporting VAO's, my guess is this work touched upon osgSim::LightPoint* functionality and introduced a regression, as to what this might be I can't say without reproduce the issue and investigating the related code. 

In general the behaviour you describe sounds like vertex array state that is not being set up correctly so the values used by the driver are just the last ones to be set rather than the one intended.


Robert.






Quote:
_______________________________________________
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


------------------
Post generated by Mail2Forum
Back to top
Andreas Ekstrand
Guest





PostPosted: Thu Aug 31, 2017 1:33 pm    Post subject:
Invisible light points
Reply with quote

Hi Robert,

Now that 3.4.1 has been released (great job by the way!) - do you have the time to look into this issue? I hope you can easily reproduce the problem with my code or model files. I would really appreciate any help here...

Regards,
Andreas



On 2017-08-18 16:10, Andreas Ekstrand wrote:

Quote:
Strange, thought the reply-to address was set from osg-users...this was what I accidentally sent to Robert only:

Hi Robert,

Thanks for your reply, I realize you're busy with 3.4.1 right now. But if you can find the time to look into this I have also attached a simple example reproducing the issue in code. Commenting in adding of the geode will hide the light points.

/Andreas



On 2017-08-18 11:12, Robert Osfield wrote:

Quote:
Hi Andreas,

On 18 August 2017 at 08:30, Andreas Ekstrand < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Did someone manage to reproduce this problem? Any suggestions are welcome, I really don't understand what's happening here...



I haven't had a chance to test the issue yet.  In the latest OSG there are rewrites of various parts of the OSG to move fully over to use vertex arrays and supporting VAO's, my guess is this work touched upon osgSim::LightPoint* functionality and introduced a regression, as to what this might be I can't say without reproduce the issue and investigating the related code. 

In general the behaviour you describe sounds like vertex array state that is not being set up correctly so the values used by the driver are just the last ones to be set rather than the one intended.


Robert.






Quote:
_______________________________________________
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



Quote:
_______________________________________________
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


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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Thu Aug 31, 2017 2:07 pm    Post subject:
Invisible light points
Reply with quote

Hi Andreas,

On 31 August 2017 at 14:32, Andreas Ekstrand < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Now that 3.4.1 has been released (great job by the way!) - do you have the time to look into this issue? I hope you can easily reproduce the problem with my code or model files. I would really appreciate any help here...


I am busy with client work this week, should get an opportunity next week to look into the issue.  Ping me if I don't pop up next week looking into it.


Robert.

 

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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Fri Oct 06, 2017 9:13 am    Post subject:
Invisible light points
Reply with quote

Hi Andreas,


I have now have an opportunity to look into the point light issue you've reported.  I've tried out the .osg and .osgt files you posted at the start of this thread and confirm that OSG master you can't see the lightpoints in the lp_poly.osg(t) files.


I haven't yet found the cause.  Just starting to dig.  If you have any new insights let me know.


Robert.

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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Fri Oct 06, 2017 9:30 am    Post subject:
Invisible light points
Reply with quote

Hi Andreas,


A test that I've just done was to add a return to the Geometry::drawImplementation() to prevent it from doing vertex array setup or dispatching any primitives sets, doing this allows the Lightpoits to appear.  This indicates either GL state or osg::State internal settings aren't being managed correctly somewhere in the mix.



Robert.

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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Fri Oct 06, 2017 4:22 pm    Post subject:
Invisible light points
Reply with quote

More testing has shown that there is connection between VBO's status and light points, manually disabling the use of buffer objects explictly in LightPointDrawable::drawImplementation(..) fixes the problem so that both the light point and the polygon appear when viewing the problem lp_poly.osg model.


I will now reflect on the how things are being managed in VertexArrayState w.r.t use of interleaved arrays.  Might not have time to get a fix done today but now I now roughly where the problem lies a bug fix shouldn't be too hard.


As a general comment, old code like LightPointDrawable is written around the limitations of old fixed function GL, computing data on the CPU to be streamed to the GPU.  These days I would implement light points in shaders and avoid most of the CPU computation work.  Such an approach should make LightPointDrawable irrelevant as normal shaders and osg::Geometry should be capable of doing the job.  However, such a change would take work of course...


Robert.

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


Joined: 18 Mar 2009
Posts: 11190

PostPosted: Fri Oct 06, 2017 5:07 pm    Post subject:
Invisible light points
Reply with quote

Hi Andreas,


I have just checked in a fix to src/osg/VertexArrayState.cpp to resolve this light point bug.

Commit is:
   https://github.com/openscenegraph/OpenSceneGraph/commit/4906844ea76054a83ad96afb8439dd521db456ff


This is checked into OSG master.


Robert.


 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Andreas Ekstrand
Guest





PostPosted: Fri Oct 13, 2017 2:31 pm    Post subject:
Invisible light points
Reply with quote

Hi Robert,

Thanks a lot for your efforts! And great to see that it made it into 3.5.7, so I will use this release from now on.

Regards,
Andreas



On 2017-10-06 19:06, Robert Osfield wrote:

Quote:
Hi Andreas,


I have just checked in a fix to src/osg/VertexArrayState.cpp to resolve this light point bug.

Commit is:
   https://github.com/openscenegraph/OpenSceneGraph/commit/4906844ea76054a83ad96afb8439dd521db456ff


This is checked into OSG master.


Robert.


 






Quote:
_______________________________________________
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


------------------
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 Light Map Sub d_a_heitbrink General 0 Wed Sep 06, 2017 10:04 pm View latest post
No new posts Shadows on "invisible" objects Trajce Nikolov NICK General 2 Tue Mar 28, 2017 7:09 am View latest post
No new posts Visualizing a light cone in scene suraj General 7 Tue Jan 10, 2017 10:44 am View latest post
No new posts How to get points lying on a plane cu... srappose General 0 Sat Oct 08, 2016 10:18 am View latest post
No new posts Simulating Light Lobes with Projected... Trajce Nikolov NICK General 3 Thu Aug 11, 2016 9:57 pm 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