Home 3D Art Showcase & Critiques

Unity Shader work & assets

Hi,

First post on the forum, Super impressed with everyones work, very inspirational.:)

I'll post some pics as soon as i get attachment rights. In the meantime If you would like to see the shaders and assets you can go here

Unity Shader Project

Theres a couple of videos there as well.

Cheers,
0brn0

Replies

  • Denny
    Offline / Send Message
    Denny polycounter lvl 14
    Awesome work on these materials! Let me make attachments for you until you get the rights. Will you share how you tackled these materials? Did you use any external shader editors like FX Composer? :D

    9198b034cc43fc578616a2f602b3619d.jpg
    b037f573ed4ed3b76a10c45983f45134.jpg
    6d9b4b20ff6fb198fc0f015f9f35bef8.jpg
    b5b19e8e02aa37577517e41629fee424.jpg
    d9fa95a235f1a3953b86580887f51815.jpg
    0a21b5d6e99c95ab31e5b677504e7339.png
    7f859554d650214f3d5398207d151618.png
    fbe75306f5b97abc5cf6d24793789892.jpg
  • toxic_h2o
    Offline / Send Message
    toxic_h2o polycounter lvl 8
    yes please share!!!! they look awesome!
  • Maph
    Offline / Send Message
    Maph polycounter lvl 8
    I'm really impressed by the glass! Refractive surfaces are an absolute bitch to get right, I do believe you've bloody well nailed it sir!
  • Peris
    Offline / Send Message
    Peris polycounter lvl 17
    beautiful stuff!
  • binopittan
  • Fingus
    Offline / Send Message
    Fingus polycounter lvl 11
    I saw this posted at the Unity Forums and I have toyed around with the free shaders. Absolutely fantastic work, the refraction and chromatic aberration in the bicycle light especially impressed me.
  • 0brn0
    @ Denny & toxic_h2o, Thanks kindly for attaching the images. The shaders were authored in PSpad and follow the Unity Shader Lab Surface Shader format and Nvidia CG.

    The complex surfaces are done in multiple passes with captures of the frame buffer used to create the reflection and refraction. They are both done with a screen spaced technique, where the surface normal is used to create a UV offset from the surfaces screen space position.

    Many of the transparent surfaces are also Zprimed to clean up any draw order issues.
    If you look carefully at the video you will notice that only the closest Backface & closest Front face of any surface are rendered.

    The shader tackles light and color differently to most shaders. Instead of adding the reflection to the diffuse light contribution. I replace the diffuse term with reflected light . Im following the theory that the surface can only be as bright as its light source. So if the light is being reflected back in a specular fashion then the same percentage of light has to be removed from the diffuse term. This enables the surfaces to handle extreme lighting conditions without appearing to blow out to white. And at the same time make white and Chrome surfaces much easier to handle. With the method I'm using its possible to achieve a "black reflection" ( a technically bad description ) But the best example I can give is if you stand in front of a mirror with a matt black shirt on no matter how bright the light source is the reflection of the shirt in the mirror is also black.

    The way I'm doing the metallic reflection also differs from the normal method. The standard method is to multiply the reflection by the diffuse color to achieve a metallic look. I lerp between an untinted reflection and a tinted one based on luminosity and a metallics property like this

    Reflection = lerp (CubeTex.rgb, CubeTex.rgb *_Color.rgb, (1-ReflectiveLum) *_Metalics);

    The calculation above can be done without the 1- but the compiler was smart enough to work that out for itself, or so stupid that when I did it without the 1- it used the same number of instructions anyway :)

    The result of this means that I can still get white reflections in metallic surfaces but as they get darker more of the diffuse tint becomes visible. And by changing the metallics property which is exposed to the user you can get every variation in between.

    I also vary the Alpha of the surface by the luminosity of the reflection. This ensures that reflections on transparent surfaces are handled properly.

    Creating art for the shader is quite straight forward. The only tricky part is the combined Spec/Gloss/Reflection mask texture (RGB). But it does allow for greater control.

    If you want to play around with the shaders there is a free vesion on the unity asset store.

    @fingus, binopittan,Peris & Maph , Thanks guys I put allot of time into these shaders I'm glad you like them.
  • Jeremy-S
    Offline / Send Message
    Jeremy-S polycounter lvl 11
    Those shaders are sick! I think I'll be getting the pro ones as soon as money allows. Great work, man. Absolutely great work
  • nbac
    Offline / Send Message
    nbac polycounter lvl 9
    wow! some very nice shader work.
    i am doing some shader coding by myself.
    i am really interested in the screen space reflection technique! i have done some ssao or ssaa but this is new for me. do you got any whitepapers or something like this describing this technique.
  • 0brn0
    Hi nbac,

    I don't know of any white papers on screen spaced reflection. But if you look up Screen spaced refraction you can find find many papers dating back as far as 2005 "Interactive Image-Space Refraction of Nearby Geometry Chris Wyman University of Iowa" is a good one to start with. If you get a refraction going you will have all the inputs and information you need to generate a reflection also.

    Im a little hesitant to say "this is the way I did it, and the way you should to " because to be honest my method dosen't follow physically accurate maths. The criteria I set out on when I did it were based on making the result intuitive to the user and as simple as possible for the GPU. I based my shader visually by observing lights behavior on a bag of marbles and some glass kitchen ware.

    I found approaching the shader this way I was able to eliminate many behaviors that were not noticeable to the human eye and focus on the ones that were.

    If you send me a private message I'd be quite happy to explain the inner workings in more detail. Other wise this post will turn into a white paper :)

    Cheers
    0brn0
Sign In or Register to comment.