Search Unity

► Texture Adjustments ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, May 20, 2015.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Open Adjustments_Flip.shader file and try changing (line 19):
    from
    Code (CSharp):
    1. return (tex2D(_MainTex, lerp(i.uv, i.uv * -1, _Flip)));
    to
    Code (CSharp):
    1. return (tex2D(_MainTex, lerp(i.uv, 1 - i.uv, _Flip)));



    VacuumShaders - Facebook Twitter YouTube
     
  2. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Good job !
    It's working on IOS now :)

    Edit : Seems to be working correctly with Andoid + IOS now !

    Awesome
     
    Last edited: Apr 7, 2017
    Arkhivrag likes this.
  3. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Hi Arkhivrag,
    Sorry to bother you again with this. But I really need the "Multithreaded Rendering" to be checked in order to avoid an issue with an other plugin.

    Could you try to find a way to make it works ?

    Best regards,
    Seb
     
  4. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    84
    Hey there, I just bought your asset because I needed to use the Hue/Saturation/Lightness Shader for changing an image - the same way as I would do it in photoshop. Sadly I just found out that this shader is missing one small option which photoshop has -> the colorize option. Is it possible to add this, otherwise I can't use this asset sadly :(

    Thanks in advance,
    Oliver
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Added to a wishlist.



    VacuumShaders - Facebook Twitter YouTube
     
  6. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    84
    Thanks that would be really great. Even though I found some kind of a workaround for now with HSL (used only for the lightness) + Color Overlay (V set at 128) - so then I can reuse my photoshop settings for Hue and Saturation with a convert from HSV to HSL.

    BTW is it possible to reuse the Presets in the API or can we use the presets in the Editor only (didn't find any info on this but it looks like it only works in the editor).

    That would be also a great feature to add...
     
  7. oukaitou

    oukaitou

    Joined:
    Jan 10, 2014
    Posts:
    18
    Hello, I bought this asset recently and it works very well. But I found some features I want isn't in it.

    1. Image crop. It's not hard to implement by myself but it will be very handy if can be added to the asset.
    2. Is it possible to add a feature like this: https://www.assetstore.unity3d.com/en/#!/content/57720? I'm using it now but very slow.

    Thank you!
     
    Arkhivrag likes this.
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    oukaitou and PygmyMonkey like this.
  9. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    306
    Nice! Is the crop done on the gpu? cpu?
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Crop is done on the GPU. Just update to v2017.2



    VacuumShaders - Facebook Twitter YouTube
     
    PygmyMonkey likes this.
  11. oukaitou

    oukaitou

    Joined:
    Jan 10, 2014
    Posts:
    18
    Thank you so much!!
     
  12. down-al

    down-al

    Joined:
    Oct 3, 2015
    Posts:
    1
    Get this error on import

    TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'VacuumShaders'.
    VacuumShaders.TextureAdjustments.TextureAdjustments_Resources.LoadTexture (UnityEngine.Texture2D& _texture2D, System.String _pro, System.String _free, TextureWrapMode _wrapMode)
    VacuumShaders.TextureAdjustments.TextureAdjustments_EditorWindow.Load_Resources ()
    VacuumShaders.TextureAdjustments.TextureAdjustments_EditorWindow.OnGUI ()
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    and the Texture Adjustments windows can't open


    empty project, and empty scene with
    Unity 5.6.2f1 & latest TextureAdjustment version on Assets Store
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    'UnityEngine.ImageConversion' is part of Unity 2017.1 engine and it can not be loaded in Unity 5.6
    Solution: Completely remove plugin from the project, clear Asset Store cache and download new version from the store.
    Note, there are several plugin versions on the store for different Unity versions.



    VacuumShaders - Facebook Twitter YouTube
     
  14. DanishSinha

    DanishSinha

    Joined:
    Nov 9, 2016
    Posts:
    18
    Hey @Arkhivrag

    I need to rotate my Texture2D 90 degrees and also change the ratio during runtime.

    The texture is with different width and height.
     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Yes, you can, with included Rotate and Resize tools (in editor and runtime)




    VacuumShaders - Facebook Twitter YouTube
     
  16. JS-Lee

    JS-Lee

    Joined:
    Jun 29, 2015
    Posts:
    8
    Hi
    In my job, I need a tool to help me rotate texture2D and save it.
    So, I use Adjust_Rotate to rotate Texture2D than I use EncodeToJPG() and File.WriteAllBytes() to save it.

    Finally, the photo in file system is original photo. no any rotation.

    Jason
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Are you sure you are saving adjusted texture and not the original one?
    Does it happen in editor or in build?
    What Unity version are you using?



    VacuumShaders - Facebook Twitter YouTube
     
  18. JS-Lee

    JS-Lee

    Joined:
    Jun 29, 2015
    Posts:
    8
    Hi
    I test it on android phone(sony xp) and unity version is 5.6.0

    I am sure saved texture is adjust texture
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Inside Editor it's very easy to check if texture is adjusted, may be with public Texture2D variable.
    In Build you will have to include the shader that is used by an adjustment (it has the same name) to the Always Included Shaders array of Graphic Settings.



    VacuumShaders - Facebook Twitter YouTube
     
  20. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Hello Arkhivrag,
    I'm manipulating HD photos (flip and rotate) and I was previously using a CPU method in order to do that.
    I'm switching to your plugin and the performance is great but the result is not as good.
    I'm using this parameters :
    Code (CSharp):
    1. Adjust_Flip photoFlip = new Adjust_Flip();
    2. Adjust_Rotate photoRotate = new Adjust_Rotate();
    3.      
    4. photoFlip.vertical = true;
    5. photoFlip.horizontal = false;
    6. photoRotate.angle = Adjust_Rotate.ANGLE._90_CCW;
    And here is the comparison with my previous method (same quality settings) :


    As you see with texture adjustments the texture is a little more blurry with some aliasing.
    As I'm manipulating HD photos I don't want to lose the details :/

    You can have a closer comparison on your desktop if you download them :
    https://img15.hostingpics.net/pics/878144TestCPU.jpg
    https://img15.hostingpics.net/pics/641893TestTextureAdjustements.jpg

    Is is possible enhance the quality ouput ?
    Thank you very much !!!

    Seb
     
  21. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Also is it possible to add a "watermark" GPU feature (combine 2 Texture2D) ?
    Thank you :)
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Texture Adjustments receives input texture from Unity engine and it may be different (a little bit) then the original file you have on your hard drive. After that texture is send to GPU -> transformed using shaders -> returned from GPU -> converted to Unity texture. After all these passes generated texture can not be 100% identical as the original file.

    I've tested your images and exporting generated texture in PNG format gave me the same result (about 99% identical to original), but JPG file had significant quality drop.


    Bookmarked for the next update.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 9, 2017
    rattlesnake likes this.
  23. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
  25. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Any plans to add it in future?
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    May be Photoshop style, but it will not create such perfect pixelate image especially with outline.



    VacuumShaders - Facebook Twitter YouTube
     
  27. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    for the real-time API, is this working with AT2 ?
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    What is AT2?



    VacuumShaders - Facebook Twitter YouTube
     
  29. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Sorry. Amplify Texture 2 with simple UV.

    My bet is that it doesn’t because I cannot imagine AT2 revirtualizing the texture.
     
    Last edited: Dec 11, 2017
  30. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Even photoshop style is welcomed
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Update will be available in several days.
    Pixelate.gif



    VacuumShaders - Facebook Twitter YouTube
     
    jGate99 likes this.
  32. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Do you have a release date more or less for the "watermark" feature ?
    Thank you,

    Seb
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    version 2017.3 already includes 'Watermark' feature.
    Check it in ColorOveraly blend modes.



    VacuumShaders - Facebook Twitter YouTube
     
    rattlesnake likes this.
  34. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
  35. leeheisen

    leeheisen

    Joined:
    Oct 5, 2016
    Posts:
    5
    I like your pixelate feature. Any method to get the color value(RGB) of every pixel grid?
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    With included API - no.



    VacuumShaders - Facebook Twitter YouTube
     
  37. leeheisen

    leeheisen

    Joined:
    Oct 5, 2016
    Posts:
    5
    We'd like to use your plugin to pixelate a static image and get RGB color value of each pixel, can you add the relative API to the plugin?
     
  38. leeheisen

    leeheisen

    Joined:
    Oct 5, 2016
    Posts:
    5
    We'd like a customized version of your plugin, anyway to send an email to you?
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    No, sorry. Such method is out of the scope of this plugin.



    VacuumShaders - Facebook Twitter YouTube
     
  40. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
  42. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
  43. samtura

    samtura

    Joined:
    Feb 26, 2013
    Posts:
    1
    Hi!
    How can i move content of Texture2D using API inside of texture?
    Help, please
     
  44. r9kBBob

    r9kBBob

    Joined:
    Apr 8, 2017
    Posts:
    2
    Is it possible to use the API to do a color replace with a mask? And is it possible to add making the color replace target a gradient?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Almost everything that can be done inside Editor window, can be done with API too.
    Color replace with mask - Yes.
    Color replace target gradient - No.



    VacuumShaders - Facebook Twitter YouTube
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Working on update with new improved editor, more adjustments and Linear color space support.

    upload_2018-3-16_17-36-19.png



    VacuumShaders - Facebook Twitter YouTube
     
    jGate99 likes this.
  47. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Hi @Arkhivrag
    As in this preview, its clear that your code both knows the cell size as well as the color it apply to that cell? So its theoretically possible to return a 2D Array ( a representation of grid) where each cell (array[x][y]) contains color value of that image's cell?

    I'd really appreciate if you provide this enhancement

    Thanks
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    You can try resize texture to have the same dimensions as cell count in Pixelate tab and then use Unity's GetPixels method.
    After resizing set textures filter mode to Point.



    VacuumShaders - Facebook Twitter YouTube
     
    jGate99 likes this.
  49. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Will try and let you know how it goes. Thanks :)
     
  50. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    As im doing it dynamically on runtime, so only property i see is cellSize
    so resizing whole image to CellSize doesnt seem to work.

    Can you please explain in detail