Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Round edges of pixel-art ?

Discussion in 'Formats & External Tools' started by ApteryxK, Mar 8, 2015.

  1. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Hello !
    I am struggling to find a way to make a pixel grass billboard have round edges.
    You can see the grass billboards style I want here : http://img4.wikia.nocookie.net/__cb20140611075434/unturned-bunker/images/5/52/Grass_sniffer.png it's from unturned.
    I would really want to do something like this.
    What I tried : Do a pixel art grass on low resolution image then change the resolution to a high value without anti-aliasing.
    The only thing I need is a filter, a blur or something which blurs the edges without anti-aliasing in order to have only one color.
    I am using Gimp 2.8 but I also have Photoshop sc 2, yeah that's old but free. Sure.

    Your help would be very appreciated. :)
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
    Try Cutout shader, with the texture as bilinear (not point)
     
    ApteryxK likes this.
  3. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Is this a tool in Unity or Gimp ?
    I would prefer something with the picture itself than doing something upon it in unity.
    I need my game to be very optimized.
    Thank you .
     
    Last edited: Mar 8, 2015
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
  5. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
    Which unity version you are using? (that screenshot is from 5.0)
    Or are you going to use it on terrain, as sprites or ..?

    in 4.x
    Create new material,
    assign grass texture
    assign "shader: Transparent/Cutout/Diffuse" (or others from cutout/)
     
    ApteryxK likes this.
  7. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Unity 5.0 :
    I want to use a normal 2D texture as a terrain's billboard grass texture.
    So, does your cutout technique work with my situation ?
    Because from what I could see, you can't use a material as a 2D texture for a grass billboard on a terrain.
    Thank you.
     
  8. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
    At least it looks similar (without any custom materials or shaders):
    - Select terrain
    - Paint details tab
    - Edit details
    - Add grass texture
    - Assign texture2D, Add
    - Paint to terrain
     
    ApteryxK likes this.
  9. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    But the issue is that by doing that my texture is the same as I started. I know how to add a billboard on a terrain, I just was asking for the filter or a technique to get the result I want (here ).
    I can't apply a cutout filter on that Grass Texture once I have added it or even before without making it a material, plus I think the only way to use the cutout is by making a material out of the texture.
    I am sorry if I am bothering you so much, I am very confused because I yet have no experience in this subject.
    I really appreciate your help and the fact that you take your time to explain me :)
     
  10. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
    It looks like this for me on terrain:
    upload_2015-3-8_22-2-54.png
     
    ApteryxK likes this.
  11. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Wait, I am wrong then.
    What you did is :
    Take a texture, make it bilinear and cutout, to do cutout you have to make a material from it.
    Then you put the material as a 2D texture in the terrain.
     
  12. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,465
    Actually didnt do anything :)
    - Added texture to project (attached the sample image)
    - Painted it to terrain
     

    Attached Files:

    ApteryxK likes this.
  13. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Yeah lol, I was so confused, anyways thank you very much.
    Kiwi
     
  14. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    I'd be really interested in a shader that rounds the edges but not what's inside.