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

Pre-Integrated Skin Shader - announcements and feedback

Discussion in 'Assets and Asset Store' started by cician, Feb 26, 2013.

?

What should I focus on for next releases

  1. optimizations and mobile

    45 vote(s)
    24.9%
  2. realism

    83 vote(s)
    45.9%
  3. ease of use

    8 vote(s)
    4.4%
  4. just fixes and compatibility, it's awesome as is and you better make a hair shader...

    45 vote(s)
    24.9%
  1. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Sorry, actually I was too excited and forgot I was in forward mode :oops:


    Mobile is still experimental. In a few weeks it may be ready. This weekend i'll try to make something more complete.
    Interested in alpha testing?
     
  2. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Sure! I have a unity3d pro for version 3 license as well as android pro license for unity 3. Also have a tegra 2 droid phone, and tegra 3 transformer prime tablet.
     
    Last edited: Jul 26, 2013
  3. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    The long overdue v1.1 update is now up on the asset store!
    I'll update the first post later today with complete changelog, and new manual.
    The main change is the fact that all textures are now separate for ease of use.
    There are some changes that alter appearence of existing materials, but don't worry. Bundled is a "combined" version which accepts the same texture setup from 1.0 (plus more). See the manual for details. Also bundled is the original 1.0 in a zip if you wan't to keep it and the 1.1 version goes into it's own folder so you can keep both versions in the same project without breaking existing assets.

    Hopefully everyone agrees the changes are positive. The underlying code is now much more dynamic and hopefully I'll be able to make more incremental and frequent updates.
    We've put a lot of effort into the manual, probably as much as in the shader itself so check it out.

    Your feedback is valuable and will affect future releases.
    Cheers :D
     
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Sweet update man... thanks. And I know what the next steps should be... the shader is near perfect..
     
  5. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Thanks a lot ! We'll check that !
     
  6. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    this is another sin! just 20!
     
  7. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    We have another bug in unity! When the things started to look good. When shader uses "fullforward shadows", and when lighting is set to deferred, object is drawn always on top! This is not confirmed yet, might be just in my scene, but I doubt it. Can someone with unity 4.2 Pro confirm this?
     
  8. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    I did confirm on a simple scene with a basic shader and filed a bug report.
    With this bug It's effectively unusable in projects with deferred lighting enabled :(

    If Unity guys don't correct it soon I'll have to remove fullforwardshadows by default, which sucks socks. In the meantime you can do it yourself:
    Open shader search for "fullforwardshadows", remove the word and save.
     
  9. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hi,

    Thanks for update,again unity bug:(

    Dev
     
  10. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    I just picked this up... fantastic shader so thanks!

    I have a character model which has two material applied; one for the head and the other for the body. Is there an easy way to use the same values for all the parameters for both materials, or add a feature in which I can enter a numeric value, that way I can enter the same value for each?

    Thanks.
     
  11. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    PIcked up this shader today and have to say I am loving this shader so far! Thanks for such a great job on this. Please make the hair shader to complement this and it will be perfect. Here is my first go with this shader that I came up with today. The next thing is to make the eyes more realistic with a reflective type surface. I'll be able to have realistic avatars now thanks to your shader. Press and hold middle mouse button to move the light setup around. Here is the webplayer.

    https://dl.dropboxusercontent.com/u/2521814/Webplayers/Skin_Shader/WebPlayers.html
     
  12. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    There are a few ways to accomplish this.

    1. In Unity when you select multiple materials you can set common properties at once. This is simplest. I don't know from which version the feature is available though.
    2. You can modify the shader. Open the shader, at the beginning of the file, in the Properties { ... } block change all the Range(...) to Float. Then you can set precise values. You can also alter the default values.

    There are other ways, but that should suffice.
    I hope to see some SSS in Unity games soon :)

    I do have a prototype hair shader that works quite well, but I haven't decided what to put in the package.
    It's Marschner/Kajiya-Kay model from the old ATi paper. Frankly almost a copy-paste plus some hacks for correct lighting on back faces.
    The cut-out version receives and casts shadows. The soft-edge version only casts shadows (cut-out shadows).
    No ambient occlusion or sss yet. The thing is, it's not so simple to prepare the textures and stuff.
    OK, more on that later, real life calls...
     
  13. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Come on cician you can do it!! Can't have an awesome skin shader without an awesome hair shader to go with it right? For anyone that needs an amazing skin shader you need to get this and that'll inspire cician to finish up the hair shader for us:)

    If you wan't I can beta test your hair shader out cician or you can use that model in the webplayer example if you want as well fine by me if it helps you out to get a a hair shader out faster.
     
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    +1. For someone who creates human characters on a daily basis, hair is just as important as skin. I would be SUPER happy if this worked with Skyshop... the realism is almost uncanny.
     
  15. Andrew_atl

    Andrew_atl

    Joined:
    Sep 21, 2010
    Posts:
    103
  16. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Cician asked on their blog if we can put their scan in the demo scene, and reply was YES. Of course we would put credits somewhere in description. So in the next update we will probably go with that. What you think guys?
     
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    That is a good idea :)...

    Side note, have any of you guys had a chance to play with Marmoset Skyshop?
     
  18. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Does this shader support dynamic tessellation? I noticed that regardless of the camera distance to the model, the tessellation stays the same. If not, were you thinking about integrating it?
     
  19. SOULSSAGA

    SOULSSAGA

    Joined:
    May 6, 2012
    Posts:
    69
    HI THERE !

    Could you please add

    - IBL Physical Shading
    - Oclusion on 2* Uv To this SHader ?


    As soon you do that will be a Instant buy to me !

    Check this out !

    http://vimeo.com/74344947



    Cheers

    SILVA DINIS
    /SOULS STUDIO
     
  20. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    I admit tessellation is confusing and manual doesn't say it, but it does depend on camera distance.
    Try increasing edge length to maximum to see the effect.

    $tess.png
     
  21. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Well I have a character thats around 9k in polygons. I'd like it to have no tessellation when the camera is at a certain distance. I'm trying to avoid using more than one mesh for LOD. Is that how yours works? I ask because I tried Unity's tessellation and I can visually see the tessellation increase and decrease based on distance. Do you know of a script that will display the polygon count of a mesh? That could help too in case it's working and I can't see the result visually.

    Also is there anyway you can provide this shader without subsurface? I ask because I'm creating a character system with clothes, so I don't need the scattering effect on those, just the tessellation. I'm having issues with my character that's tessellated and my clothes using Unity's tessellation. I want to make sure the settings for both are identical.

    Can I try your hair shader please? :)

    Thanks!
     
  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Firstly, I would just use the LODs... I saw Unity's version of tessellation and I don't like it... it is not clean to me. As for a shader that is not SSS, just use two materials, one for skin, and another for cloth...
     
  23. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    I rather not use separate meshes for LOD, simply because my 9k original mesh is fine for the lowest res, and tessellation would be for my highest. I would also like to use this shader for the cloth, simply because I want the tessellation to be identical and avoid the skin "popping" through the clothing if the number of polygons are different.
     
  24. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Ooh, I see what you are trying to do... kinda like how they make customizable clothes and it has to cull the under parts, right?
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    The only thing wrong with this shader now is I can't use it with Skyshop :(
     
  26. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Exactly. I'm trying to build a character system using this and Megafiers for morphing my character and having their Warp system automatically adjust the clothing accordingly based on sliders. I wanted to see how well that works in conjunction with tessellation and how the performance would be.
     
  27. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Cician started looking at how we can integrate IBL from skyshop, he has some sort of results not so correct yet, but somehow it works, so i can't promise anything. For me it's too complicated so i can't help him with that, so be patient because it will take some time. And furthermore we are flooded with other work, so we have only weekends to work on it :(
     
  28. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Not a problem, man... this is still on the most phenomenal shaders for skin made for Unity so far...
     
  29. richardvertigo

    richardvertigo

    Joined:
    Dec 19, 2012
    Posts:
    12
    Hello. I recently bought the shader for our diving game and I really like the result, although there seems to be 2 problems with the shader so we can't use it ingame. I don't have the time to read the whole thread so I don't know If someone already said something about it.

    1 to make the SM5 work you need 2 shadow casting directional lights to make the artifacts disappear.(Not preferable in game) Then there is a depth sorting problem when the 2 directional light are on. Al the object on the character that uses different materials disappear.
    2 when I use the SM3 ingame the depth sorting of the entire scene seems to be broken.

    Hope to hear some thing soon. THx

    Vincent
    Vertigo Games.
     
  30. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    It's a horrible bug of Unity 4.2

    There is a quick fix for it:
    Open the shader search for "fullforwardshadows", remove the word and save.
    It's a temporary fix before we find other way round about this, since the shader works in forward mode and this way it receives only one shadow. That really sucks actually. I'm hoping Unity 4.3 will resolve the problem of material sortings.
    And one more note, bug with SM5 tesselation is present only with deffered lighting.
    Always Unity bug, not on our side tho. If you read few pages back on this thread, you will see what I mean.
     
  31. richardvertigo

    richardvertigo

    Joined:
    Dec 19, 2012
    Posts:
    12
    Thx for the quick answer!
    I will ask a programmer to look at the fix.

    For the SM5 bug; we are making a diving game that is compatible with the Oculus Rift so we prefer the deferred lighting.
    For the depth sorting problem; there is always a lot of material sorting problems with soft alpha but with your shader the whole scene has problems with the depth sorting even when the character is not visible.But of this is a Unity bug I will wait for the new Unity.

    So far when you want to make high end things with Unity there seems to be a lot of bugs:(
     
  32. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Unfortunately I have to agree. Many showstopping bugs, mostly when rendering forward shaders in deferred mode (which should be supported), but also things like cloth simulation and everything non trivial in mechanim. What worries me the most is the lack of any kind of response to bug reports so far.
    Anyway, I'll make an update without the fullworwardshadows directive that makes EVERYTHING in tbe scene render incorectly in Unity 4.2.
    I'll add it again when (if) they fix it.

    p.s. I'm working on a new asset to manage scenes when working with svn/git. Someone interested in alpha testing?
     
  33. Gangsta-Geek

    Gangsta-Geek

    Joined:
    Aug 11, 2012
    Posts:
    32
    This is a great shader! I bought it when it came out but I was wondering if it works with Marmoset Skyshop?
     
  34. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Last edited: Oct 13, 2013
  35. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    oh hell yea i just bought marmoset too, probably going to buy this shader this or next week. Any ETA on release for the marmoset thing?
     
  36. SpencerPDX

    SpencerPDX

    Joined:
    Jan 3, 2012
    Posts:
    168
  37. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    +1
     
  38. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    +2, would be cool to have something that is acceptable on mobile as well for skyshop :)
     
  39. matrixii

    matrixii

    Joined:
    Mar 12, 2012
    Posts:
    36
    your work with marmoseit skyshop is very impressive .. i hope u relese soon this code to get this SSS skin on marmoiset skyshop
     
  40. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
  41. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    does that mean soon? :)
     
  42. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Status update:
    A basic skyshop integration is technically done, I just need to clean up the code a little and ask marmoset guys if it's OK if I ship a piece of their shader code.
    Basic because I'm limited in what can be done efficiently with simple cube maps. For now I decided to just do a simple cubemap so there's no scattering for diffuse light from the cube map. On the specular lighting side I replaced the standard lighting function with mine and removed the Skyshop's fakey fresnel - no offence, it works ok for most stuff - so it looks pretty good.
    Once (if) skyshop switches to spherical harmonics for diffuse it will be possible to do proper SSS. By then they'll release their skin shader as well.

    While fiddling with SkyShop I kinda... fixed the light probes :)
    I ditched Unity's way of probing the probes and did it my self, on the fragment level. I've put the light direction (which is there! kinda) into the SSS function and used some voodoo magic for specular lighting.
    I have to test it a bit more to see if it works reliably in more complex situations, but if it does it may be more useful than the skyshop integration as it stands. For those who can afford Unity Pro, that is.

    tldr; open the demo and play with the sliders.

    http://dl.dropboxusercontent.com/u/71674067/Unity3DPISS/SkyShopTest/WebPlayer/WebPlayer.html
    ps: press left and middle mouse button at the same time and rotate :cool:
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    This is LOVELY!!! Are you still using a depth map on this?
     
  44. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    work good on mobile?
     
  45. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
  46. richardvertigo

    richardvertigo

    Joined:
    Dec 19, 2012
    Posts:
    12
    Hi, I don't know if this has been asked before so sorry for not reading the thread. The specular seems to be visible working best in a grazing angle. Even a little bit over powered compared to the front specular? Does this has something todo with the gamma vs linear settings? Or should I just continue tweaking.

    Thx $Face_Spec.jpg
     
  47. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Sorry to respond after all this time I've been busy lately. As far as I can see you should add more brightness to your specular and glossiness maps. More glossy parts (mouth) should have values around 200-240 of RGB on glossiness map (almost white), the rest of the skin should be around 180-200 of RGB. As for the specular map use values between 80 and 100 and up to 150 on shiny parts. This way you will see some wetness on the skin. Anyway nice model, good job :)
     
  48. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    It may be the fresnel in the specular model. You can try upping it a little from the default, something like 0.03-0.04.
    Also, are the rims enabled?

    Nice set-up thus far, now you need some bumps ;)
     
  49. Gangsta-Geek

    Gangsta-Geek

    Joined:
    Aug 11, 2012
    Posts:
    32


    DUDE! This is amazing. Is this an update? Can we use it now??
     
    Last edited: Nov 5, 2013
  50. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    Yeeeeeeessssssssss! Unity 4.3 fixed full forward shadows!