Search Unity

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. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
  2. kelley

    kelley

    Joined:
    Oct 5, 2012
    Posts:
    11
    I'm also very interested in using this with Marmoset Skyshop. I hope that the update will be released soon :)
     
  3. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    @Cician: Hello, I just bought this asset but it looks like something's broken with Unity 4.3.1 and/or DX11. I just loaded the head demo scene and here is how it looks:

    $ScreenShot109.png

    There seems to be missing/flickering faces. Could you please update it? Thanks...
     
  4. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    It's Unity bug. If you read first post, below you will find this:
    Unity folks added tessellation feature in Unity 4 but it's useless in deferred lighting. Use forward rendering or use our SkinSM3 without tessellation. Nothing we can do about it as it is now... And if I remember correctly, we mentioned about it in manual as well.
     
  5. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    I see. Well, thanks for the reply. As a suggestion I would say it might be good to add a line about that limitation (even if it's Unity's fault and not yours) in the product's description on the asset store, so people don't find themselves in this kind of situation...


    Edit: By the way that's a great-looking shader!
     
    Last edited: Dec 13, 2013
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I'm kinda glad i saw this now because that is really bad. I'm hoping for a workable version of this for Skyshop.
     
  7. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Hi!
    I stopped adding things to the description after reaching the character limit ;)
    I'm really sorry to advertise a feature that [more or less] doesn't work. Maybe I should remove tessellation support from description until the bug is fixed.
    More about the bug:
    It works if you switch to forward mode, but deferred is desired most of the time, at least on DX11 level hardware.
    The bug is in Unity and not the shader and there's no known workaround either. I didn't get any feedback on the bug report, submitted back in march of this year. It's there in every version of unity I used since 3.5.
    Technically you can do tessellation in deferred, but your shader needs to use the standard deferred lighting model, which is blinn-phong+lambert. So no skin shaders, grass or physically based goodness.
    Unity advertises mixing forward mode shaders on top of deferred rendering, but it doesn't work if you alter vertex positions.
    If anyone knows a way, please let me know.
    Since UT guys are overloaded with gazillons of boogs I don't know a human even got to see it. If you consider it important you can help me by deliberately submitting a duplicate bug report or persecuting innocent graphics engineers on twitter (the latter seems to work :twisted: ).
    TL;DR
    For now please use shader model 3 variant (which is the same, sans tessellation) or switch to forward rendering. Alternatively you can ask a refund from the asset store support.

    ps.: to all people screaming skyshop integration. Vote for this and/or discuss, seriously: http://feedback.unity3d.com/suggestions/nested-asset-store-packges-slash-products

    Cheers,
    Maciej.
     
    Last edited: Dec 13, 2013
  8. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    current my project need make skin like game artificial girl 3
    so pre-integrated skin can make like this ?
    $screenshot_artificial_girl_3_10.jpg
     
  9. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Of course it can! And much better than that!
     
  10. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Yup... with the right maps and texturing, you can eclipse this quality
     
  11. TWaanders

    TWaanders

    Joined:
    Mar 27, 2013
    Posts:
    46
    Hi there, any news on a mobile optmized version?
     
  12. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
  13. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    I'm preparing for the 1.2 release. The highlight of the release is per pixel light probes, but I may include something more.
    After release I'll concentrate on mobile. I may release an early version without official support. Future versions may vary wildly in featureset.
    Finding proper feature set that fits may reqire many iterations. It's more about right compromises than optimizztions. Though a few optimizations are coming.
     
  14. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Keep up the good work
     
  15. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    any update mobile version or skyshop with your skin shader?
     
  16. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    bump
     
  17. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    any update in mobile version?
     
  18. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
  19. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Been away for some time, just thought I'd come back in and try version 1.1, but the asset store doesn't show the new 1.1 version for me, and when I delete the old files and import from scratch, I still get the old version with all the S G and D maps have to be combined, what am I missing?
     
  20. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Are you sure you are logged in with the account you bought it with?
    To make sure enter asset store from a browser and click on the download manager icon on top of the page and/or enter in your profile->credit cart/paypal transactions.
    If you still have problems contact asset store support and PM me your invoice number so I can give you access to the latest version in the mean time.
     
  21. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    After updating Unity to the latest version, I was able to get a proper download by following the link that you provided(click on the download manager icon on top of the page and/or enter in your profile->credit cart/paypal transactions.). Downloaded fine now, thanks for the help, can't wait to test it out!
     
  22. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    After an afternoon of messing around, here's what I've done with the new version;
    Diffuse(Default)
    $Shader1.jpg


    PISkinShader V1.1SM5
    $Shader2.jpg

    Spec and Gloss maps are the same right now, will make seperate ones tomorrow, but for now I'm very impressed. This first dirty draft was made in about an hour, and I haven't even added fine details to the normal and specular map. Not only is this MUCH more easier to use than the original, but the level of interaction and control with and over every little detail is superb. Love it, man. Brilliant job.
     
  23. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Have you integrated your shader to work with Skyshop yet?
     
  24. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Does anyone know if this shader works with Skyshop?
     
  25. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    Will there be any plans to maybe upgrade this for Unity 5, so to make better use of the upgrades going into the program?

    If you can at all.
     
  26. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Sure, but Unity 5 is still a ways off. In the mean time, next update will take advantage of some of 4.x features mainly for organizing material inspector and making some features optional.
    Btw. anyone still stuck on 3.5?
     
  27. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I'm on unity 4 now. I hope you guys are aware that skyshop needs to be included in the next update.
     
  28. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    +1!!!
     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I have gotten a visual look with this shader that nearly rivals computer generated movies, here is a recent post of my models with this shader attached. This was just a test.
     

    Attached Files:

    John-G and Reanimate_L like this.
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Now that's pretty cool looking skin....mind to share your setup?
     
  31. Aabel

    Aabel

    Joined:
    Nov 4, 2012
    Posts:
    193
    Headshader.jpg I love this shader, only things that would make it better is skyshop and shaderforge integration.
     
    Last edited: Jun 11, 2014
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I honestly don't remember my settings, but you just need to play around with the diffuse blending and scattering
     
  33. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    It's been a while and I'm not done yet. To be honest I was slacking and procrastinating.
    While I do have skyshop and lux integration prototyped I'll decide at the last moment if I'll include it or not since I think integration with third party IT is a pain, in particular after release support. I may include it, but keep in mind i'll probably ditch it once unity 5 is out.

    I was thinking of removing:
    1. Front rim. It was my attempt at "peach fuzz" and it's not quite working as it shoud, nor is its purpose clear.
    2. Tessellation. After testing things properly and failed attempts to make it better I conclude it just isn't practical and you're better with making a higher res mesh instead. Just turning on shader stage for tessellation adds a significant performance hit. While it's OK in deferred, in forward rendering (skin is always rendered in forward mode) the disadvantage is multiplied by the number of lights. There are more reasons like cracks and the above mentioned bug.
    While I hate removing features, doing so will make a it better product overall.
    3. Support for Unity 3.5 as mentioned earlier.
    If anyone wants to keep them scream now or forever hold your peace.

    In compensation you'll get:
    - Secondary specular lobe. I can't stress how far you can push the realism with just this. I'm switching from SSK to GGX specular model which looks very similar, but renders much more efficiently (at least compared to my SSK implementation). Rendering two lobes is still much cheaper than one before the change.
    - Ambient occlusion with nice tricks for scattering and faked direction dependence that make it look less "burnt" compared to simple AO.
    - Per pixel light probes with fakey scattering. So you can actually use light probes without your characters looking like in games from 90s.
    - An approximation of energy conservation between specular and diffuse that doesn't just make skin uniformly dark but more or less accounts for how scattering behaves in function of specular intensity, roughness and fresnel.

    While I'm not entirely happy how some things are have to make compromises and release soon or I'll wake up in front of an angry crowd with forks and torches one morning ;]

    Here's some of choices I have to make:
    - I tried to make thing correct for light probes and skyshop in frequency domain like suggested by authors of Order 1886, but the math is a bit over me so I'll settle for a simple weghting of SH factors and a "squeeze" trick.
    - The energy conservation will use an additional lookup texture that will need to be rebaked when a non standard fresnel value is desired.
    - I reimplemented lookup texture generation as compute shaders so I can run it at non geological time scales when testing. The downside is Unity supports compute shaders only on Windows/DX11. While I doubt anyone used this feature until now it may become more important going forward (see energy conservation).

    TL;DR

    </talk><do>


    upload_2014-6-14_17-49-15.png
     
    KRGraphics likes this.
  34. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    I was wondering

    How do you know when it's best to use a hand-painted skin texture, versus using a skin shader?

    I'm just needing to know.

    Also, on my end, do you need to have a skin texture already made to make use of a shader?
     
  35. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Yes, you do need a diffuse texture. In a skin shader, that texture is actually called Epidermal, which is the outer most layer of skin. For skin shaders like this one, you will need a diffuse texture with NO LIGHTING INFO WHATSOEVER, especially if you will use PBR solutions like Lux or Alloy. You also need a roughness texture, normal map with High Frequency detail, and a transmission map. You can create one by baking an inverted curvature map. Take advantage of IBL and GI.The image I posted is an example of hand painted skin

    @cician you should probably drop out the specular texture and use the spec as a float instead to tone the reflection on the surface.
     
  36. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    You can get an overall idea of what you need for best results by looking at the manual.
    http://dl.dropboxusercontent.com/u/71674067/Unity3DPISS/Manual_1_1.pdf
    Most importantly you need:
    - A diffuse texture with as little lighting information in it as possible. Can be hand painted.
    - A high resolution normal map. Usually baked from hi poly sculpted mesh.
    - Standard specular glossiness(roughnes) and intensity maps.
    - The "depth" map (transmission/thickness/curvature you call it) is a bit particular but not that difficult to author.

    Even if you don't plan on achieving photo realistic results and investing too much in texturing the shader should help quite a bit compared to standard shaders.

    The head in my screenshot is actually a 3D scan, which is another approach for making said textures, but not affordable for most of us. See http://www.ten24.info/?p=1164 (this one is free!).

    ps. I have a strong feeling of Déjà vu.

    That screenshot was with no specular or gloss maps at all. Here's one with them and more natural spec intensity.

    upload_2014-6-14_22-49-1.png
     
  37. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    And it's still awesome. I actually like that one way better. I've been able to make it look like an offline renderer. The transmission map is definitely fun to tweak. I have settings that make it look so good. But it won't work with my current project now.
     
  38. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    Then I guess...I'm confused

    What do shaders do then?
     
  39. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Think of a shader as a small program that tells a render engine how to light and shade an object. Such as, is the surface smooth in appearance, or does it reflect light in the environment. The engine has to determine all of these factors when rendering an object. I hope that is clear enough for you :)
     
  40. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    Yeah it does.

    Now I'm just wondering what shaders need textures and what ones don't
     
  41. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Well, you should get into the practice of using textures. There is no way around this
     
  42. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    I have a request

    Can I see a skin without a shader

    Like have a non-shaded skin right next to the shader version

    I just want to know what they look like beside each other
     
  43. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    upload_2014-6-22_19-11-15.png

    upload_2014-6-22_19-15-21.png

    upload_2014-6-22_19-16-47.png



    Compared to standard bumped specular. No IBL or anything fancy just good textures and settings. Only one directional light is active.
     
  44. facepunch

    facepunch

    Joined:
    Apr 7, 2013
    Posts:
    7
    Using this in Rust and loving it.. one problem. In editor when I fire my gun, which creates a point light, I get this..

     
  45. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Sorry I was away on vacation and forgot about your post.
    If you still have the problem. The first error in the console of your screenshot says it cannot include the file PreIntegratedSkinShaderCommon.cginc that is part of the shader. Make sure it's present in the same folder as the *.shader files. If the file is there and the problem persists I'll need more info: unity version, shader variant used, platform, is D3D11 enabled?
     
  46. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Good to see you back... and I am hoping you are getting back on this especially with the PBR shaders coming about.
     
  47. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Hi, thx for good shader.
    I have question about shadows. Can i turn off them in shader?
     
  48. 2dchaos

    2dchaos

    Joined:
    Sep 11, 2013
    Posts:
    63
    Hello, any news about the update? ;]
     
  49. EquineKnight

    EquineKnight

    Joined:
    Oct 7, 2014
    Posts:
    2
    Does this work with the free version?
     
  50. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I'd like to request a feature; distance based tessellation. It's a fantastic shader, so it would be great to set the tessellation to 0 when the camera is at a certain distance.