Search Unity

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 guys,

    just submitted Update 1.51. Here's the list of changes:

    - Added an outline glow effect (Requires Unity Pro!)
    - Fixed a bug in the translucency shaders which would cause flickering lights.
    - Added a translucency spread slider to the translucency shaders.
    - Minor performance improvements to some of the cartoon shaders.
    - Fixed a bug in the screenspace subsurface scattering effect, which created multiple unused cameras.
    - Added a bumped diffuse detail version.

    The changes i made to the translucency shaders are the ones you can see in the video i posted before.

    Here's a screenshot of the new outline glow effect.

    $Outline_glow.jpg

    This effect requires Unity Pro. An example scene is included to make it easier. If you have any questions, let me know.

    @curious
    If by that you mean a shader giving you a "metallic sparkle" effect, i can not. I tried it before but i ran out of texture interpolators. Except from this, most car shaders rely on either cook torrance or usual blinn phong shading and reflections. So i'm not quite sure what you would expect.

    @SOULART
    I actually do not know how this effect is created, except the stuff already mentioned in this post. I could have a look at it, but i won't promise anything.

    In addition the package price will change from $25 to $40 next wednesday, due to the increased amount of content and therefor the increased amount of time needed to maintain it.
    I'm also working on a proper manual to make the package easier to use.
     
    Last edited: Mar 9, 2012
  2. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    @Chickenlord,
    First of all, thanks for the update :)

    I don't know, I don't think I'd need sparkles! All I need is a shader that acts as the car paint, that's all. Similar to NFS (latest series) for example Hot Pursuit, which did a nice job there on the shaders ;)

    And one that goes well with HDR, is this doable?
     
  3. AllSynergy

    AllSynergy

    Joined:
    Nov 1, 2011
    Posts:
    47

    Price increase is perfectly understandable.
    However I'm mostly doing mobile games so if you can promise to put at least some effort there I will buy immediately :)
    You don't really have excuse anymore when Unity is now giving free mobile licenses :D
    https://store.unity3d.com/products


    I understand if you don't have time ( time limits I perfectly understand.... )..... however I'm quite sure you would sell even more with just slight mobile testing (just couple mobile versions... not asking too much like dozens of them)... or at least nice promise that you'll see what you can do in close/distant/whatever future ;). I like the idea of some manual as well... always nice touch to a product.

    I'm quite close to buying anyway. Really nice work.
     
  4. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @AllSynergy
    Hey. Not only is it a great idea, but in fact i'm getting a new android phone in a few days and will be doing some iphone tests in april. But a lot of these shaders are probably to heavy for mobile devices, so i'll have to see if i can come up with some optimized mobile versions. I'll let you know, what the results are.
     
  5. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I've had this asset for a while now, and every month it seems to make my world a better place - the new outline feature is incredible, works very well - thanks again Chicken!
     
  6. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    I would love to see some optimized mobile shaders (where applicable, of course). Great stuff!
     
  7. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    82
    Yeah, the outline rocks!!, thanks dude.
    Could you let us know which could be the way to use this feature to highlight objects? or could you make a little example of that?

    A fading effect once the object is selected will be awesome.
     
  8. grimmgames

    grimmgames

    Joined:
    Jan 11, 2011
    Posts:
    50
    The outline effect looks fantastic. Is there a way to make it not appear through other non-outline-active objects? Thanks!
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hippo is waiting :D
     
  10. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey guys. Just wanted to let you know, that i am still working on the mobile shaders. I've got some running already, but i want to get a bit more performance out of them. Though they'll obviously need more performance than a simple diffuse shader or something like that, they are quite fast already. Expect performance similar to the brdf shader from the shadowgun sample, although i'm still not promising anything.
     
  11. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Wonderful news, I'm holding my breath already ;)

    At least update us with more regular image uploads ;)
     
  12. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Okay, so here's a quick preview of one of the more complex shaders i'm working on. For the screenshots and my tests i used the ShadowGun sample level. It looks pretty heavy, but it's surprisingly fast. In a quick test on my Android Phone (Acer Liquid Metal, 800mhz, Adreno 205) it ran with just 1 frame less than the original shader from Madfinger (27 instead of 28 fps average). The biggest performance hit there was the missing static batching which resulted in 151 drawcalls instead of 59.
    Anyways, here's a screenshot:

    $Final.png

    And an overview of all the parts which went into the final image.

    $Split.png


    Of course, these things can be adjusted/disabled and i'll add multiple variations, if for example you don't need indirect specular highlights.
     
    Last edited: Apr 8, 2012
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Impressive!
     
  14. dudeabot

    dudeabot

    Joined:
    Jun 26, 2010
    Posts:
    14
    great! looking forward to buy it :D
     
  15. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    awesome! will the mobile shaders be the same chickens shader bundle? (or a new one?)
     
  16. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey,
    the mobile shaders will be inlcuded in this package. I will add just a few shaders as mobile versions though, because most of the stuff (i.e. self shadowed parallax/relief mapping) is just too heavy for mobile devices.
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think that it's important for a lot of people to realise that the benefit of chickens shader bundle is the mobile versions will run fine on desktop won't they? that means if someone is doing a console or desktop game, they can tap into these versions if they need to optimise (shader lod for ex, or just plain faster shaders).

    When people see "mobile shader" they think "low quality" instead of "high speed". As we can see from above, mobile doesn't mean low quality :D


    edit: been having a lot of thoughts about this in general. A couple of really good developers on unity forums are avoiding pro shaders on asset due to not being able to either justify or afford unity pro. Perhaps a further incentive for unity to support these developers would be a win for everyone.
     
    Last edited: Apr 12, 2012
  18. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Yes they will basiclly work on desktop as well, as long as you use a supported light setup. I.e. the shader shown above only supports one directional light and thats it (as this makes sense on mobile). In addition there's no shadow support (because there are no realtime shadows on mobile). I could add the code to support all lights and add it as a variation though.
     
  19. bumd198

    bumd198

    Joined:
    Nov 11, 2010
    Posts:
    37
    Hi, Great package but I was wondering when version 1.51 will be online at UnityMagic.com? :\
     
  20. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi,
    isn't it right now? I'll check that immediately, might be possible there has been something going wrong. Sorry for that and thanks for mentioning it.

    Edit: Okay i resubmitted it to them and it should be up quite soon. Again, i'm really sorry for it. Shouldn't have happened.
     
    Last edited: Apr 12, 2012
  21. bumd198

    bumd198

    Joined:
    Nov 11, 2010
    Posts:
    37
    Thanks for quick reply, 1 more question, as I can see 'some' of your shaders may work with light probes but are you going to improve shaders that can fully supports light probes?
     
  22. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Not quite sure if i got your question right. If not, could you please explain a bit more, so i can give you a correct answer.
    The shaders which are able to support per pixel light probes should actually do so. Other than that i'm not sure what you mean.
     
  23. bumd198

    bumd198

    Joined:
    Nov 11, 2010
    Posts:
    37
    Well for example, adding sliders for per pixel lighting effectiveness,or custom color blending, like if we get blue from light probe and if we have yellow in our slot, it will return yellow. Any making sense of attributes on main light shading can be extended for light probes too.
     
  24. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    I would like to use the self shadowed relief mapping shader or the self shadowed parallax mapping shader from your package with the built-in Unity terrain. Would this be possible and how?

    Thanks.
     
  25. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    The shaders look pretty good and are already adding spice to my game but i do have one question, do you have any resources on how to make the blendmaps/colormaps/translucency maps etc that you are using for the skin shader? i am a programmer and designer but i also dabble in photoshop and 3d modeling from time to time and would love to know how to create the maps i need to use this shader :)
     
  26. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @Deckard
    Just had a quick look at the built-in terrain shader, and on the shader side it should be possible yes (though it would be a big performance hit). I don't know how the texture are set on the c#/js side though, so it might get ugly there. I'll try to find out some more and let you know, if it's possible to add.

    @Efraser2007
    I've made a short video once explaining most of the things. You can find it here: http://www.youtube.com/watch?v=XBTB17hcbio
    In case i missed somthing in the video:
    - BlendMap: The easiest way to do it is to paint a greyscale image and then check "Alpha from greyscale" in the texture settings. Black parts (or alpha zero) get the full skin effect, white parts (or alpha 1) are drawn with the standard bumped specular look. If you want something inbetween, you can paint it grey and you can adjust it with the blend slider.
    - Colormaps: The alpha value determines, how much you want the color to be adjusted (using the Exit Color Amount and Thickness slider). An easy way to get it is to use the inverse of the BlendMap as the alpha channel. RGB channels then set the color. If you don't want to use, put the Exit Color Amount slider all the way to the left.
    - Translucency maps: As explained in the video, you can either draw them or create them with a trick. The alpha channel sets the translucency intensity whereas the rgb channels modify the translucency color. To get the strength from your favourite modelling program do the following:
    -> Open your model and invert the normals.
    -> Bake ambient occlusion (you might have to change the settings in order to get a nice result)
    -> Invert the resulting ambient occlusion image and use it for your alpha channel
    This only works though, if you have UnityPro and shadows enabled. Otherwise you'd get a translucency effect where there's actually no light (but it's not hidden if you don't have shadows). With unity free you can basically only have trunslucency on the ears, because missing shadows are not that obvious in this region.

    I hope that helps. if not, feel free to ask again.

    @bumd198
    I am sorry, that i have to say it, but it looks like unitymagic has some mailserver issues, so it will probably take a bit longer until the update is available.

    EDIT:
    @Deckard
    Btw the performance hit i mentioned would be absurdly huge if you want a self shadowed version. And if i got you right, this is what you want. Still possible (as long as i'm not running out of instructions) but not practically useful.
     
    Last edited: Apr 15, 2012
  27. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    Thanks a lot for you swift and detailed answer.

    Actually I am not too worried about performances because I have a very fast machine with a NVidia GTX680 graphic card.

    I don't know precisely which shader I would pick but I definitely would need one that achieve some kind of parallax mapping. I have tried the parallax mapping shader from Chris Morris. But I cannot get it to work properly:
    - I get very strange lighting results when I turn the normal mapping on: the entire terrain gets very dark. I have tried flipping the green channel of the normal map. It did not help.
    - Also this shader is using a relaxed cone map which can supposedly be generated with Xnormal. But Xnormal crashes each time I try to generate a cone map with it. I have not found any other software which could generate such cone maps.
     
  28. bumd198

    bumd198

    Joined:
    Nov 11, 2010
    Posts:
    37
    If your bitmaps are high res it can crash, use different file formats, or try to use older xnormal versions...
     
  29. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    That's what I thought, so I tried with very small textures. It crashed anyway. I also tried all the possible settings.

    But indeed I am using the latest version of Xnormal so I may try an older one.
     
  30. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    @bumd198
    Problems solved, the update is online at unitymagic.
     
  31. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    And another image done in the awesome Shadowgun sample level. On the left it's the original BRDF shader and on the right 3 different styles done with the mobile toon shader i'm working on. Lighting is completely faked btw and keep in mind, it's only a preview. So this could change.
    Performance of the toonshader is similar to the brdf shader instruction wise, but it needs two texture lookups instead of one right now. I'm trying to change this though.
    In order to achieve this effect i had to slightly adjust the texture, so that it has a more flat style without all the details, but this only took me about half an hour.
     

    Attached Files:

  32. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Just wanted to post a warning here for anyone using the outline shader: if you check the 'Include Child Meshes' box, the shader will change all of the children of the object to be in the same physics layer as the parent.

    That might not be a big deal for some projects/objects, but for me it's a crippling problem; I use physics layers for both optimization and functionality, and thus have many objects whose children are in different layers than their parents.

    I'm going to see if it's possible through scripting to only have the outline apply to the children I want, but it'll be a hassle.

    I spent an hour tracking down why my game suddenly broke, and was very surprised to see that a purely visual shader was silently modifying the physics settings of the game. You can reproduce this behavior in the example scene that comes with the shaders. Simply change the child mesh to a different layer, and you can see the layer change as soon as the game starts.

    The shader itself looks great, so I'm not regretting my purchase, but it'll be harder to use than I thought. It would have been nice to have more documentation and warning.
     
  33. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Thanks for pointing that out. Looks like i mistakenly set the childs layer to the same as the parent, which is not supposed to happen. I'll fix this as soon as possible.
     
  34. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    +1
     
  35. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Just submitted a bugfix for the mentioned issue and it will probably get updated on monday. Have a nice weekend everyone.
     
  36. yohami

    yohami

    Joined:
    Apr 19, 2009
    Posts:
    124
    Hi, does chicken shader work with the flash export? Im having issues there.
     
  37. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey,

    could you be a bit more precise on what doesn't work properly? I don't have a flash version myself, but from i what i can read about the flash version, it should run just fine.
     
  38. Argaroth

    Argaroth

    Joined:
    May 22, 2012
    Posts:
    3
    Hi, we got a problem with the outline glow. We want different objects to have outlines with different colors, but the camera script assigns all objects (which contain the outline component) the color you select in the camera. There's a checkbox in the camera script which says "Use Object Colors" and I thought that this would work but the checkbox did nothing. Can you help me with this? Thank you!
     
  39. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi, separate colors for each only work if you draw the objects separately. So if you select "split objects" as well, it should work.
     
  40. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    I like those shots of your mobile toon shader a lot. Very cool!

    How are the mobile shaders progressing?
     
    Last edited: May 22, 2012
  41. Argaroth

    Argaroth

    Joined:
    May 22, 2012
    Posts:
    3
    Fixed! Thank you!
     
  42. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hi, i'm currently trying to get the stuff done as fast as possible but i'm also working on another job which currently takes up a lot of time. In addition i'm still working on proper documentation, so i can release the mobile shaders documented as they have more values to setup than usual shaders.
     
  43. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Hey Chicken, found a 'possible' issue when I upgraded to the latest shader bundle yesterday, the OutlineGlowRenderer class assumes a given object has child layers, which apparently in a few cases my objects do not, this yields the error:

    http://screencast.com/t/bLgLhSPE9

    A quick fix on my end was to ammend the methods: ResetLayer and ResetLayerRecursive to guard against 'childLayers' being null.

    It may just be on my end, if you'd like I'd be happy to send along one of the objects that causes this exception as well for troubleshooting purposes, just PM me.
     
  44. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    While I'm at it, is there any way to "clip" the outline effect (i.e. stop outlining when you reach a certain layer or if a layer comes between you and the camera), I'd like to avoid effects like this: http://screencast.com/t/j4K6MAeeex - of course I can probably deal with that changing up meshes and such, but it'd be cool if we could avoid that. Perhaps another camera for just outline effects is needed?
     
  45. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey, thanks for letting me know. Though it's strange because it should actually never happen, but i'll add a fix to the next update.

    Regarding the depth tested outlines: I've been trying to get it to work for quite some time know, but it still has some ugly artifacts so that i didn't include it yet. If i can fix this, i'll add it of course, but so far i'm not completely sure what is goign wrong there.
     
  46. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    No problem - one other question actually, normally i run a two camera setup, but moving back to a single camera I'm noticing this:

    http://screencast.com/t/4danMTbmMf

    Is there some way to ensure rendering order with the players layer over the glow layer?
     
  47. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Would it be possible to move the Outline Strength, Blur Steps and Blur Spread properties from the camera script to the object script, so that you can further customize how different object look?
     
  48. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hello ChikenLoard,

    I can see that your shaders look interesting, however can you please let me know if I can use your CSB to make a Warped Diffuse_Rim lighting shader?

    as this one look much like a mix between realistic and toon shader, so if the answer is not please advise how can I achive this using your shaders?

    Thanks in advance.
     
  49. FI-DavidA

    FI-DavidA

    Joined:
    Apr 18, 2012
    Posts:
    5
    When I add this shader package to a build on my HP Padilion laptop, almost all properties on all materials (Chickens Shader materials or otherwise) are removed, other than diffuse color. They work great on my desktop, but I tried on two Padilions - one old, and the latest one, with fully-updated drivers and the latest version of Unity, and both lose their material settings.

    I didn't see anyone else post about this, but is this a known issue? Is there a known solution? Normal maps were working before I added the package, and if I create a new build without Chickens Shader, they work, but if Chickens Shader is in there, everything goes flat. The only thing I haven't tried is adding the shaders one by one to see if I can get working what I need working.

    I'd love any insight!
     
  50. FI-DavidA

    FI-DavidA

    Joined:
    Apr 18, 2012
    Posts:
    5
    This was giving me so much trouble, but as soon as I posted, I figured it out. It didn't sync properly directly from the store, and broke the laptop build. When I copied the shader folder into my PC build, it was fine, so by copying my PC build back to the laptop, the problem was solved.