Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Chickens Shader Bundle

Discussion in 'Assets and Asset Store' started by Chickenlord, Jul 28, 2011.

  1. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey, just wanted to let you know i'm still working on additional stuff. This is taking a lot more time than expected though, but i guess it will be worth the time because i have a bunch of cool ideas i'm working on. In the meantime, as a short wish from my side, if you have some free time (i know, thats doesn't happen a lot) it would be really nice if you could rate the package on the store (a review would of course be even nicer).
     
  2. Drexster

    Drexster

    Joined:
    Feb 3, 2009
    Posts:
    20
    Purchased the shader package just for the SSS skin shader. Got really good results from playing around with it for about an hour. Thanks!

    Have you released any information/tutorial regarding the Image Based Lighting? You mentioned somewhere to read "the guide" but i haven't found any and the Read Me doesn't have any useful information.

    Thanks again!

    P.s. just submitted a review, though couldn't figure out how to add stars. 4/5!
     
    Last edited: Sep 7, 2011
  3. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Yeah, don't know how to add stars myself, quite annoying, but thx a lot for the review.

    I haven't done a tutorial for the IBL shader yet. The "guide" i mentioned was the few lines in the shader itself and only in case you wanted to change the amount of light samples taken (which i wouldn't recommend). Setup is really simple: The Light Vector Distribution map is in the IBL folder and the IBL CubeMap is any cubemap you want to use as a light source. Two things to keep in mind: The IBL shader doesn't receive any additional light from any light sources in your scene (ambient lighting is still added), so you might want to pick a rather bright cubemap. Let me know if you'd like a version working with additional light sources as well, so i could add that. In addition there's still a bug in there (you can see it on uv seams) and though i have already fixed it, it's still not submitted. The reason for this is, i'm working on a bigger update. But as it turns out, this update will take longer than expected. So i'll probably submit a bugfixing etc. update in one or two days.

    Again if you have anymore problems with the shaders or need another tutorial for one of it, let me know ;) I'm planning to add a manual with the already mentioned bigger update., but it will still take a while before i'm done with it. So don't wait for it, but ask me if you need more help.

    EDIT: Btw if you're interested. The next update will contain:
    - Various detail shaders (so relief, parallax, bump mapping etc. with additional detail)
    - Non self shadowed relief mapping version which can be drawn in deferred mode (so they are a bit faster than the self shadowed version)
    - The fix for the ibl shader, as already mentioned.
    - A small change to the the skinshader, making the areas where light fades out look more "glowy" (which helps creating the effect of subsurface scattering)
     
    Last edited: Sep 7, 2011
  4. 95KillerZ95

    95KillerZ95

    Joined:
    May 27, 2011
    Posts:
    253
    Chickenlord, all updates are free right?
     
  5. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Thats what i planned, yeah. Would be a bit unfair: "Hey, i found a bug. But you have to pay for a fix!" :p
    No, don't worry, i won't do that.
     
  6. 95KillerZ95

    95KillerZ95

    Joined:
    May 27, 2011
    Posts:
    253
    Ok, when I have internet on my home I will buy this :) Looks very nice, very good work :)
     
  7. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @Drexster
    Forgot to mention that there is an example material in the ibl folder as well.
     
  8. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey,

    stopped working on the big update today and decided to do the rather small one instead. So just submitted Version 1.3 and it should be up quite soon. Heres the changelist:

    - Added various detail shaders.(Relief mapped, bump mapped and parallax versions)
    - Added a toonshader using a ramp texture instead of lightsteps.
    - Added non self shadowed relief mapping versions, which can benefit from the deferred renderer as well.
    - Slightly changed the skinshader v1.3 to allow a more realistic subsurface scattering look.
    - Fixed a bug in the IBL shader causing wrong light samples being taken.

    And here's an example of the bump mapped detail shader
     

    Attached Files:

    Last edited: Sep 7, 2011
  9. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    You know when I saw the thread title, I thought this was shaders meant for 3d models of chickens. A bundle of them.
     
  10. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Mhh, guess i should add something to the title then.

    Sorry guys. Seems like i can't add the head demo to the package, due to license incompatibilities. Resubmitted the package without it and now the package should really be up soon.
     
  11. solidcrash

    solidcrash

    Joined:
    Mar 27, 2011
    Posts:
    65
    drooling all over the keyboard..... love your shader on that face's ear!

    yeah! I thought it was modelling of chicken include bump map! hah
     
  12. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    @Chickenlord,
    Can I ask for a little favor for the next update? Do we get a chance to use another layer of realism for the skin shader? A Specular map option? :)

    What do you think?
     
  13. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    I really like your Toonshader alot but I don't know exactly the difference to the unity build in one.
    Could you explain your toonshader a bit? (e.g ad/disatvantages)

    Soul :)
     
  14. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @Curious
    Sure. Would you like only the specular power in the alpha channel, or full map with spec color in rgb and the power in alpha?

    @SOULART
    It is more a matter of what you like or don't like and if fits your needs. So the built in toonshader is done in 2 passes. The first pass creates the outline look by modifying vertices. While this works in many cases, it has some disadvantages when used on objects with hard edges (simply try it on a cube and you'll see what happens). In my toonshader everything is done in 1 pass and outlines are created as a pixel effect. This obviously looks different but it doesn't have this hard edge issue. In addition, my shader needs a few more instructions but usually this shouldn't have a huge impact on performance (except maybe on mobile devices, but i have no chance to test that).
    Oh and i provide two version different versions: One using a ramp texture (comparable to what the built-in shader does with lighting) and one that uses a simple lighting step function (the one you can see one the screenshot).
     
  15. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    @Chickenlord,
    Thanks mate :)
    You're the master here, so it's your call, do what's best and we'll enjoy it no matter what ;)
     
  16. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    thank you very much :)
    so the 1 pass method ensures that it doesn't hit so much on performance and it also is less buggy as the build in one .
    anyway lovely shaders! Now, after the purchase I'm am able to play around a bit :)
     
  17. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey everyone, just submitted a update 1.4 and it will probably be up soon.

    Changes:
    - Added a Skinshader version using a separate specular map.
    - Added a screen space subsurface scattering post processing effect (Requires Unity Pro)

    Please note: Screen space subsurface scattering is a heavy effect, requiring some performance!
    In addition it is in an early stage, so there may occur bugs and/or issues. Please let me know if you're having trouble so i can fix it or help settings it up correctly.

    A short tutorial is coming soon.

    Here's a video and some screenshots (Sadly the video has some color issues and is a bit blocky). For those who are interested, the scene from the video contains two directional lights, both casting shadows, running at about 300 fps (Phenom 2.8 ghz, Radeon 5770 1GB):

     

    Attached Files:

  18. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Thanks for the update man :D

    I thought only Unreal Engine 3, UDK and CryTek's CryEngine could do SS SSS ;)
     
  19. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Thx. Glad to see you like it. Though i'm using quite an ugly workaround (which could be left if i had access to some things inside the...), i guess it's suprisingly fast. And no, basically you can do verything in Unity. The only question is, if you have to do any workarounds that might decrease performance way too much.

    Because i haven't been able to do the video tutorial recently, here's a short list of instruction on how to set it up:

    All scripts and shaders for S5 (it's just shorter than SSSSS :D ) are in the "Shaders\Screen Space Subsurface Scattering" folder.
    Always add SSSSS as the first post processing effect to avoid issues.

    Info on the script values:
    - Blur: Blur radius, just try different values to see what fits your needs. If you don't have "Consecutive Downsampling" on, you might want to use higher values.
    - Blur steps: Range 1-5, recommended 2-4. The number of blur iterations used, the more you do, the slower it gets.
    - Pass Two Shader: "Skinshader_pass2" from the shaders directory.
    - Mix Shader: "S5_mix" from the shaders directory.
    - Depth Shader: "S5_depth" from the shaders directory.
    - Consecutive Downsampling: If on, resolution will be decreased for each blur iteration, which speeds things up a lot. Definitly not recommended to turn it off, unless you want to try it or have your game running on a fast machine.

    If you want an object to use screen space subsurface scattering, either select the "S5 Skinshader" or the "S5 Skinshader Deferred" for the material. The difference is, that the normal S5 skinshader works in both Forward and Deferred mode (though it might look different), supports translucency etc. - basically the same settings as the normal skinshader (if you have an issues with a really bright red, adjust the Exit Color value). This version though needs more drawcalls if you have multiple lights, because it is always drawn in forward mode. In deferred mode you could select the deferred version, which does not support all the fancy settings (so you'd have to adjust your textures and/or lighting instead of the material) but is faster in deferred mode.

    Hope it helps setting it up. But again if you have any questions, feel free to ask me.
     
  20. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    HI,

    I like your skin shader but in the unity version sometimes the ears looks to bright, if you could fix that I probably will buy it.
    Any plans for upgrade the skin shader in a nearly future? add radiosity normal maps for instance?

    Thanks you
     
  21. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi,

    I guess you're referring to the translucency and adjusting the brightness is already possible. It has a "power" value and a multiplier. The power controls the sharpness of transmitted light, whereas the multiplier controls the overall brightness. Here's the short tutorial, where i explain how to use the shader:
    http://www.youtube.com/watch?v=XBTB17hcbio

    I'll probably add support for RNM lightprobes when Unity 3.5 is out. Until then, i can't because unity doesn't support it so far.

    Thanks
    Chicken
     
    Last edited: Oct 10, 2011
  22. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    Cool, I was checking the unity project you have online, in this tutorial it looks much better.

    I am buying it right now. ;)

    We will have free upgrades for next versions of this shader?

    Thanks, and keep the good work.
     
  23. qholmes

    qholmes

    Joined:
    Sep 17, 2010
    Posts:
    162
    Hello,

    I am looking at your shaders.. I love the Force field shader.. I am just looking at mouse over effects for my mechanical project.. Not a game.

    I just need to highlight objects and this looked pretty cool for that. Do you think it will work well in that capacity? I dont know much about shaders or Unity for that matter.. If i purchased is this force field effect pretty quick to set up on some of my objects to test?

    Thanks

    Q
     
  24. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi,

    it's not that i don't want your money, but if highlighting objects is really all that you need, then the standard rim lighting shader from the surface shader examples will probably do the job. http://unity3d.com/support/documentation/Components/SL-SurfaceShaderExamples.html

    Except from that, yes the force field shader would work, though it's transparent and you'd have to either draw the object twice or ask me if i'd add a different version which does the things the way you want it ;)

    Greetz
    Chicken
     
  25. qholmes

    qholmes

    Joined:
    Sep 17, 2010
    Posts:
    162
    I appreciate your help!!!!

    I think there is a difference between a simple highlight and a cool one.. But i did come up with something on my own.. Not as cool as the force field look though and i did use a separate object over top of my selected object.. That example page you sent me was great.. i will do some reading. I have managed to mess with some shaders to get what i want already but still very new to them...

    I might be interested in hiring you to help me with some shader work.. you obviously know what you are doing so i would be comfortable with that.. let me know if you are interested.

    Q
     
  26. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    What kind of performance does the toon shader have on mobile devices?
     
  27. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    I don't have a mobile device or license to test my shaders on mobiles, so i can't tell you anything about the performance. Maybe somebody who already bought it tested and could make a statement. But i'd guess it would run rather slow (probably comparable to the parallax mapping shader).
     
  28. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Very nice shaders, i like S5 shader, it is actually better than current Cry SDK skin shader. I will buy it probably becouse of transulency shader becouse it would look great on ice. Do you have any information if this shader is very hungry for frame rate?

    Also can you explain me what is differance between Bumped specular and Cook torrance shader? It just seems that Cook torrance is using Gloss map value or?
     
  29. cupsster

    cupsster

    Joined:
    Apr 14, 2009
    Posts:
    363
    I really dig this shaders! :)
     
  30. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @janpec
    The translucency shader ain't that evil. It's two more textures than a standard bumped specular shader which he has to grab values from and of course the calculate the lighting twice, ones the standard "front" lighting and the one from behind/inside. Compiler says:
    // opengl - ALU: 57 to 60, TEX: 4 to 5
    // d3d9 - ALU: 68 to 70, TEX: 4 to 5
    So it should end being twice the amount of a bumped specular in theory, though i didn't see this when testing it on my PC. Had a bunch of something like 100 objects once, and they ran at the same speed with translucency shader compared to bumped spec. Though on a lower end pc it might become an issue if you use it an awful lot. But usually translucent objects can use textures with a lower resolution (like the ice you mentioned) and therefor it works well.

    Regarding Cook-Torrance: It's a different specularity model, which gets closer to reality than Blinn-Phong(which is the commonly used lighting method in most games and engines today). But of course, as it's more precise, it also needs more instructions (not ridiculously more, but more) and therefor isn't a good choice as a basic lighting model but more for special cases or if you don't care about time, i.e. in rendering in max/maya/blender etc.. And that is basically it :D

    Hope that gives you all the answers you need. If not, feel free to ask again ;)

    @cupsster
    Thanks! :)
     
    Last edited: Oct 27, 2011
  31. handsomePATT

    handsomePATT

    Joined:
    Nov 30, 2010
    Posts:
    574
    just bought. Ill let you know how it runs on mobile
     
  32. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Chickenlord thanks for answer. I think that this might be dealbreaker for me, since i cant afford to spend that much performance on ice becouse there will be a lot of icy surface and shader coverage in game.
     
  33. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    I could make a quick demo with an absurd amount of translucent cubes, where you can switch between bumped spec and translucency shader, so you could simply test it.

    Edit:
    Just build a simple test. Hope its not too slow or too fast.

    http://dl.dropbox.com/u/36736567/Cubes/Cubes.html

    A few infos:
    216 Cubes
    8 Lights
    583 DrawCalls
    693.7k Triangles
    Textures 1024 * 1024 (4 textures for translucency, 2 for bumped spec)

    Running at 3 ms per frame with bumped specular, 3.4 ms with translucency at my PC.
    No objects are batched.


    I corrected the instruction and tex lookup numbers which i posted before, because i looked into the wrong shader. Sorry for that. The correct ones are:
    // opengl - ALU: 57 to 60, TEX: 4 to 5
    // d3d9 - ALU: 68 to 70, TEX: 4 to 5

    Oh and these ones are the values for the standard bumped specular, so you can compare it:
    // opengl - ALU: 7 to 37, TEX: 2 to 3
    // d3d9 - ALU: 6 to 42, TEX: 2 to 3
     
    Last edited: Oct 27, 2011
  34. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Thank you very much for test. Its kinda hard to tell what is difference in frame rate becouse for transulency shader i get 55 frames, while for bumped spec i get 60 but those frames are locked so i dont know how far it goes beyond that.

    Visual difference is huge and it is perfect shader for ice, i have just thought of easy solution. I will use transulency shader for high graphic options and bump_spec for low settings. I will make purchase somethimes soon. Thanks for your help.
     
  35. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Small update to Version 1.41

    Changes:

    - Added cutout versions of the simple sss shader and skinshader 1.3. They use the MainTexture's alpha channel for transparency and a separate specular map.

    Just submitted it, so it should be up soon.
     
  36. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey,

    just wanted to let you know that the package is available for $15 on the asset store as a special Christmas offer.

    Cheers
    Chickenlord ;)
     
  37. alr1976

    alr1976

    Joined:
    Dec 23, 2010
    Posts:
    23
    Hi!
    To use toon shader i need to use 3d model or i can use also texture2d?

    Br,Alessandro
     
  38. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi,

    It might work well on a plane if you use a good normal map because all the calculations are done based on the normal direction, but it's not an image effect. So if your looking for an image effect i would probably try using the edge detection post processing filter and the curve driven color correction effect. (Doesn't give the same result but it works quite well)
    Hope this helps.
     
  39. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Just to remind you. You can still get the package for $15 instead of $25 for another 2 weeks (so it ends on December 30th this year).
     
  40. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
  41. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Unity doesn't support the tex2Dlod function. Without it the only possible way (that i can think of right now) to achieve this would result in dependent texture lookups. Therefor the whole speed bonus this method has would probably be gone. So sorry, but i don't think i'm going to implement it right now.
     
  42. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    Could you add a specular map for the toon/transparent/outline so we could have a different specular intensity on the material?
    I am using it on a dress and it will be nice if some areas could have less or non specular.

    Also a intensity slider for the normal map and for the AO on the sss shader will be awesome.

    Thanks in advance
     
  43. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    Wow, duke this new technique looks promising ;) I will love to see that in unity
     
  44. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Yes, i'll do that (and should have already thought about it).

    You mean the 1.3 Skinshader? If so, softness is already there to change the normal map "intensity". If that's not giving you the desired effect, i'll add another way to do that. AO will get one.
     
  45. reissgrant

    reissgrant

    Joined:
    Aug 20, 2009
    Posts:
    726
    Just want to say, that skin shader looks great!
     
  46. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    Awesome, thanks, also an advance shader for cloth will be good, some more advance transparency techniques with Oren Nayar or so.

    .

    That's the one, the specular one in my case. But I can not see the softness attriubute, mmm, where is it?

    Thanks for your efforts and for the good price of this product, keep with the hard work ;)

    David
     
  47. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    The very last slider at the bottom.
     
  48. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Can the Toon Shader's Outline be sharper when maxed? It seems to get smoother/gradient when i wanted to have thicker outlines.

    It takes off the look of being toon or celshaded.

    Is there a way around this?
     
  49. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Currently it isn't but as i'm currently working on an update, i'll add a version which allows you to adjust it.
     
  50. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    thanks for that from my side too!
    looking forward the update then. :)

    merry christmas and a best new year ^^


    edit: oh i just saw the shader box v1 released for unity.
    Will you support also some of those features/shaders?

    - beast pipeline
    - opaque self illumin shader
    - probe light shader (what i think also comes with full unity 3.5)
    - opaque/ opaque detail shader
     
    Last edited: Dec 29, 2011