Home › Forums › Syphon › Syphon Implementations – User › "aliasing" syphon image
Tagged: syphon openframeworks aliasing
- This topic has 7 replies, 4 voices, and was last updated 4 years, 10 months ago by julienrobert.
-
AuthorPosts
-
September 7, 2012 at 4:50 am #6317erikparrParticipant
Hi everyone,
I am using the Syphon plugin for Unity and I cant get rid of the “aliasing” effect in the image. I am sending the output to Openframeworks to apply a homography matrix for projection mapping. I notice that even when I use the standalone syphon Simple Client app, I get the same aliasing like effect.
Any thoughts on how to eliminate this? I thought that if the image size being displayed in openframeworks was the same as the one being output from Unity, it should be identical, no?
Any help much appreciated,
e
September 7, 2012 at 6:23 am #6318vadeKeymasterNot sure what you are seeing. Is Unity or OF applying nearest neighbor filtering when drawing the image? Can you send / post a screenshot?
Few options.
One, fiddle with texture filtering in OF or whatever is drawing and make sure it uses bilinear filtering when drawing.
Two, apply a morphological based AA filter like FXAA (we have an implementation for QC on the v002 QC plugins page you can look at) in OF.
Three, in SVN on Google Code for Syphon Framework, on trunk branch, we have an newer version of Syphon Framework which implements options that allow your to specify depth, stencil and MSAA options for rendering into a Syphon Server. That may not be much help due to Unitys render engine, and how the plugin sends frames (normally sending an already rendered texture that was from a camera, so you have no opportunity subvert Unitys renderer). Maybe you could finagle something there but Unity is super finicky about OpenGL State and inserting things into their rendering path.
And finally, my suggestion is to use Unity’s post processing shaders, and send the output of their FXAA implementation, and use that as the source texture for Unity.
That or option 1 sound good. But, without more info, im not sure what the issue is.
- This reply was modified 8 years, 6 months ago by vade.
September 9, 2012 at 8:51 am #6324erikparrParticipantThanks for the detailed reply. The fix turned out to be really simple, it was a simple order of execution problem in the script components attached to my camera in Unity. I had the anti-aliasing scripts AFTER the syphon scripts. So although in my Unity player, the image looked nice and smooth, the syphon image was looking aliased still. Duh.
Hope someone else finds this useful someday. Thanks again.
April 21, 2015 at 1:16 pm #58976julienrobertParticipantHi, tried your solution and can’t make it work. Do you have more details? I installed the package FXAA3 and put it on my camera. I tried to put it before or after the syphon server custom texture and it doesn’t make any difference…?
April 21, 2015 at 4:23 pm #58977vadeKeymasterDo YOU have more details?
May 3, 2015 at 5:00 pm #58982Brian ChasalowParticipantare you using SyphonServerCustomResolution ? you might just be seeing a downrez’d syphon output, if you’re looking at the editor view…bump up your output rez to see less aliasing!
April 13, 2016 at 6:54 pm #59145julienrobertParticipantSorry for taken that much time to respond, forgot to check the notify button… 😉
Still working on my project and still have aliasing coming from Syphon inside Unity. If I put antialiasing image effect onto my cameras, I get something better but never like the built-in antialiasing of Unity which is very good because it takes the depth into account…
here is a snapshot inside Unity without using Syphon and the second is a snapshot from Syphon recorder.
Yes, I’m using CustomResolution because I need to optimize the resolution of my cameras.
April 23, 2016 at 12:27 pm #59161julienrobertParticipantFound out that we can modify the script SyphonTextureCustomResolution and add the antialiasing option onto the render texture.
After line 78, I added this:customRenderTexture.antiAliasing = 8;
and is does the trick!
-
AuthorPosts
- You must be logged in to reply to this topic.