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 

Blur artifacts in HDR effect


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Wed Nov 23, 2011 7:44 pm    Post subject:
Blur artifacts in HDR effect
Reply with quote

Hello all,

I am using the osgPPU HDR effect, and I noticed some undesirable
artifacts probably caused by the blur effect, or the resample of the
original pass (before the blur). Using the default resample settings
(resample by 0.25 in each direction) I get the result in the attached
screenshot. Look at the edges of the black cables, there are regular
artifacts along their length, they are supposed to be a smooth edge.

If I change the resample to 0.5 or 1.0 in each direction, I don't get
these artifacts, but of course then the glare effect is less interesting :-)

I also saw these parameters which are related to the blur (their name
implies it at least) but changing them doesn't seem to make a
significant difference.

float mHDRBlurSigma = 4.0;
float mHDRBlurRadius = 7.0;

Can anyone give me a hint as to what could help this situation? Perhaps
OpenGL is already filtering the resampled unit and then the blur uses
that badly-filtered image as input? Or perhaps the blur shaders have
some error in them?

Thanks in advance,

J-S
--
______________________________________________________
Jean-Sebastien Guay
Only registered users can see emails on this board!
Get registred or enter the forums!

http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
René Molenaar
Guest





PostPosted: Wed Nov 23, 2011 11:29 pm    Post subject:
Blur artifacts in HDR effect
Reply with quote

Hi,


maybe multisampling can reduce the problem.using osgPPU hdr I noticed small details with high frequency (distant lights) appearing and disappearing.


mutlisampling reduced these artifacts.
(It did however cause a one frame delay, which isn't very noticable until you use a request redraw viewer,
or screencaptures)



also you can add an additional gausian blur to the image before resampling to reduce the artifacts.


grtz,


René Molenaar





2011/11/23 Jean-Sébastien Guay < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Quote:
Hello all,

I am using the osgPPU HDR effect, and I noticed some undesirable artifacts probably caused by the blur effect, or the resample of the original pass (before the blur). Using the default resample settings (resample by 0.25 in each direction) I get the result in the attached screenshot. Look at the edges of the black cables, there are regular artifacts along their length, they are supposed to be a smooth edge.

If I change the resample to 0.5 or 1.0 in each direction, I don't get these artifacts, but of course then the glare effect is less interesting Smile

I also saw these parameters which are related to the blur (their name implies it at least) but changing them doesn't seem to make a significant difference.

 float mHDRBlurSigma = 4.0;
 float mHDRBlurRadius = 7.0;

Can anyone give me a hint as to what could help this situation? Perhaps OpenGL is already filtering the resampled unit and then the blur uses that badly-filtered image as input? Or perhaps the blur shaders have some error in them?

Thanks in advance,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay@cm-labs.com (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
                              http://www.cm-labs.com/
                   http://whitestar02.dyndns-web.com/

_______________________________________________
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
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Wed Nov 23, 2011 11:48 pm    Post subject:
Blur artifacts in HDR effect
Reply with quote

Hello René,

Quote:
maybe multisampling can reduce the problem.

The screenshot was with 4x MSAA active (in the camera->attach(...) call
of the HDR code, where we bind a texture to the main scene camera which
is then passed to the first unit in the osgPPU pipeline).

Perhaps you're suggesting I enable MSAA for one of the other stages in
the pipeline? How would I do that?

Quote:
also you can add an additional gausian blur to the image before
resampling to reduce the artifacts.

Again using the same separable blur (x and y passes)? So I would add two
other units before the UnitInResampleOut?

Thanks for your suggestions,

J-S
--
______________________________________________________
Jean-Sebastien Guay
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
René Molenaar
Guest





PostPosted: Thu Nov 24, 2011 10:15 am    Post subject:
Blur artifacts in HDR effect
Reply with quote

I don't think there are other textures involved to add MSAA to..

 two other blur units before the UnitInResampleOut could help yes,


also notice that the radius should be about 2.5 - 3 times sigma to make sure
the entire kernel is used instead of cutoff by the radius.


grtz,


René

2011/11/24 Jean-Sébastien Guay < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Quote:
Hello René,

Quote:
maybe multisampling can reduce the problem.


The screenshot was with 4x MSAA active (in the camera->attach(...) call of the HDR code, where we bind a texture to the main scene camera which is then passed to the first unit in the osgPPU pipeline).

Perhaps you're suggesting I enable MSAA for one of the other stages in the pipeline? How would I do that?

Quote:
also you can add an additional gausian blur to the image before
resampling to reduce the artifacts.


Again using the same separable blur (x and y passes)? So I would add two other units before the UnitInResampleOut?

Thanks for your suggestions,


J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay@cm-labs.com (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
                              http://www.cm-labs.com/
                   http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org (
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
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Thu Nov 24, 2011 11:52 am    Post subject:
Blur artifacts in HDR effect
Reply with quote

Hello René,

Quote:
also notice that the radius should be about 2.5 - 3 times sigma to make sure
the entire kernel is used instead of cutoff by the radius.

The default values in the osgPPU hdr example are sigma = 4.0 and radius
= 7.0, however I have not seen a difference between radius = 7.0, 15.0
and 200.0... So there I wonder if the values are getting to the shaders
correctly.

What values would you suggest I use for good results?

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
René Molenaar
Guest





PostPosted: Thu Nov 24, 2011 12:07 pm    Post subject:
Blur artifacts in HDR effect
Reply with quote

the radius determines the pixel for which the sigma is used.once you are on the edges of the kernel (gauss curve approaches 0), 
you can stop blurring.


this will be around 2.5 - 3 times sigma.


the correct sigma depends on the effect intended, 
try different sigmas ranging from 2-15 and radius = 2.5 * sigma
(maybe you can attach a slider to interactively determine the best value.)


René




2011/11/24 Jean-Sébastien Guay < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Quote:
Hello René,

Quote:
also notice that the radius should be about 2.5 - 3 times sigma to make sure
the entire kernel is used instead of cutoff by the radius.


The default values in the osgPPU hdr example are sigma = 4.0 and radius = 7.0, however I have not seen a difference between radius = 7.0, 15.0 and 200.0... So there I wonder if the values are getting to the shaders correctly.

What values would you suggest I use for good results?

Thanks,


J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay@cm-labs.com (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
                              http://www.cm-labs.com/
                   http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org (
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 -> osgPPU [osgPPU] 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 a linux dialog starting to blur while... lq37 General 2 Tue Nov 29, 2016 4:57 pm View latest post
No new posts OpenFlight-plugin texture effect id SMesserschmidt Submission 4 Mon Jun 06, 2016 12:17 pm View latest post
No new posts how to use precipitation effect in ge... superlauking General 0 Wed Mar 09, 2016 3:24 pm View latest post
No new posts Glowing Sphere Effect ehensens General 3 Thu Nov 19, 2015 2:19 pm View latest post
No new posts Setting update callback for osgSim::L... Trajce Nikolov NICK General 2 Tue Oct 27, 2015 12:25 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