"aliasing" syphon image

Home Forums Syphon Syphon Implementations – User "aliasing" syphon image

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6317
    erikparr
    Participant

    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

    #6318
    vade
    Keymaster

    Not 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, 3 months ago by vade.
    #6324
    erikparr
    Participant

    Thanks 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.

     

    #58976
    julienrobert
    Participant

    Hi, 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…?

    #58977
    vade
    Keymaster

    Do YOU have more details?

    #58982
    Brian Chasalow
    Participant

    are 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!

    #59145
    julienrobert
    Participant

    Sorry 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.
    with Syphon
    Iniside-Unity

    #59161
    julienrobert
    Participant

    Found 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!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.