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

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    I'm not sure what is up but whenever I import the PreIntegratedShader into my Unity project the whole Editor freezes up. I'm running DX11 w/ deferred and applying the SM3 shader onto a character. This always locks up my editor. The final log in the Unity log file is shader compilations:

    GPUProgram: compiled 1:d292d236955cd5484edec907a5d5ed93 kwords 0000000000085022 in 56.94 ms
    GPUProgram: compiled 2:094dea3674f4968c75d04d69505f84d1 kwords 0000000000085022 in 156.11 ms
    GPUProgram: compiled 4:0ad69939772631bcf6227199a3d46474 kwords 0000000000085022 in 155.49 ms
    GPUProgram: compiled 5:b65dc8a089fc44cf6dbcb0d72527be78 kwords 0000000000085022 in 147.19 ms

    Then that's it. Everything stops. Have you any ideas? This only happens when the PreIntegratedShader package is present.

    Cheers
     
  2. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    What version of Unity are you using?
     
  3. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    I'm running 4.5.2f1 - I think I have seen this with Unity 4.5.4 as well but I can't be sure!
     
  4. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hey man, any update on this one?
     
  5. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    I'll do some tests in 4.5.2, though if the editor freezes I'd say it's either a bug in Unity or in the graphics driver.
    What GPU do you have and is your driver up to date? Does it happen if you apply the shader on a simple plane in a clean project too?
     
  6. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hey thanks for the feedback on this one but coming back to this project it looks like the problem isn't occurring now. I think a driver update must have fixed it. Cheers!
     
  7. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Any thought on making your skin shader work within PBR renderers like Jove 2 for instance?
     
  8. sundance

    sundance

    Joined:
    Mar 19, 2014
    Posts:
    52
    Hi there, did you test your shader with Unity 5 Beta?
    There are some troubles i think..
     
  9. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    This definently needs to get implemented into untiy 5 beta :) I'd buy for sure if that happened... would look way better with the reflection probes and all that nice stuff...
     
    ksam2 likes this.
  10. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Can I use this for Unity5?
     
  11. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Hi! I'd like to address a few things.
    I wanted to wait to have something to show before writing this, but everyone started asking Unity 5, so here you are.

    - The next update will not be a surface shader, but a CG/hlsl shader directly.
    This change would affect only those who personalize the shader source. I'm trying to keep the source clean and documented, but you'll have to refactor your changes to the new way of doing things (old, really).
    There are two reasons for that:
    a) in order to get proper shadow penumbra separately from light attenuation (more on that later)
    b) made it easier to fix current issue with Unity 5.

    - I'm not going to support third party extensions that do what Unity 5 does already (even if they do it better).
    This means no Jove support and probably no Skyshop. Not entirely sure yet about the former, since I already prototyped it, but I'd rather concentrate on integrating Unity 5 reflection probes.

    - I'm dropping support for Unity 3. Mostly to save time on testing. Before I was planning to use more Unity 4 features, but I was pretty disappointed with the shader "keywords" limitations and won't use them. Anyway on positive side you won't need to select lookup textures for new materials since in Unity 4 I can set a default on the shader.

    - I'm removing "front rim" and I'm wondering about back rim as well since it's pretty costly. Anyone using it?

    - I'm not removing tessellation support just yet, but I'd like some feedback on performance since in my tests it was clearly negative. See my earlier post on that.
    Side note: seems Unity 5 fixed the bug so you can use tessellation with deferred lighting/shading now. Finally.

    I hope you won't be disappointed with the update since it won't be so feature rich as you may expect after all this waiting. I'm cutting on things I wanted to do so I can deliver improvements in the fundamentals I`ve already done.
    So what can you expect:
    1. Performance improvements. If not faster in general, expect at least the same performance, yet better looks.
    2. Gamma correct (more or less) rendering in Unity Free. Adds instructions, but gives a big improvement. Won't affect Unity Pro users already using Linear rendering in any way.
    3. Second specular lobe so you can get both rougher skin specular AND oily specular layer on top.
    4. Better scattering in shadow Penumbra. Now gives proper narrow reddish gradient as you'd expect instead of brown one you can get now.
    5. Per pixel light probes with scattering.

    Still experimental things like reflection probes and energy conservation will not make into 2.0.
    So basically: expect the 2.0 release in january. I'm thinking of a beta strategy for interested.
    Options:
    1. ask for invoice via email and give access via dropbox or something
    2. try submitting unfinished shader along the v1.1 on asset store
    I'll update you in a few days.
     
  12. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I have to say your skin shader is really really awesome
    Thanks for that
    I never seen any realistic skin like that
     
  13. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Please don't remove "front rim" and anything else. they are really needed
    I use those "rim" parameter to make my face a lot more realistic, so don't remove anything
     
  14. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    That's a major bummer...
     
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Really wanting that reflection support :)
     
    ksam2 likes this.
  16. HolidayAtHome

    HolidayAtHome

    Joined:
    Sep 19, 2012
    Posts:
    1
    Hi!
    Just got that awesome skin shader =D

    But I have a big problem with shadows. They are really rough at a point where they are absolutely unusable... I just opened the demo scene with the head. Tried all Shader variations, checked the Shadow resolution of the lights, switched through dereffered & forward rendering and tried Gamma and Linear Color Space. But no improvements.

    I don't know what could be the problem. The web player demo just looks perfect.
    I hope you can help me, because in this state there is no sense in using it...

    EDIT: solved it! Shadow Projection has to be set on Close Fit =D
     
    Last edited: Dec 25, 2014
  17. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    New version please
     
  18. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Thank you for your great shader, it even works in Unity5!
    I have a request, but I was not sure whom I should address, so I do it here.

    I was looking for a hair shader PLUS a hair factory asset.
    This asset should be able to create a photorealistic hair mesh depending on the user's parameters with integrated shader.
    The asset store really misses it.
    I can do that in ZBrush and Blender, but it is a painstaking work. I think if one would create an Out-Of-The-Box solution for Unity, it would really make some people happy.
    And since you seem to be really motivated and skilled, I would like to ask you if you could perhaps do such an asset.

    Thanks for your attention.

    ps: The hair shaders on the Asset Store are not really great. I have not tried your's however, and I would really like an Out-Of-The-Box solution where I could simply define a hair style, colors, length, and the asset does the rest. :)
     
  19. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can I ask a newbie question, please?



    Why are there so many sliders in Pre-Integrated Skin Shader?

    I know this question sounds a bit ignorant, but I just don't understand it.

    Depending on the shader settings, I get so much different results (see above, please).

    Is skin not almost (apart from being wet and a Mummy skin) relatively the same and thus would not require so many manual settings?

    I am asking because I am totally confused about how to achieve a photorealistic skin. I have alworked work so long on this that I can not even trust my own eyes anymore and have to ask other people what they think about it.

    I was therefore hoping that there was perhaps just one slider named "SkinThickness" (to emulate young and old skin) and perhaps one more named "Reflection" that would indicate how sweaty / wet / or fatty the skin is and which controls the specularity / reflection.

    Perhaps this really is a newbie question, but it would be really nice to get a reply about it anyway.
    Thank you.
     
  20. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This is mainly done for more control... artistic control. I have been using this shader for a long while (doesn't work in Unity 5 sadly) and I love the fact that I can get more control of the outcome of the shader. If we just have one slider for everything, we lose artistic control...

    I rather creatively control how the skin looks versus making it too simple to use.
     
  21. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    For me, it is just too much control. :) That is why I dislike the many settings where newbies like me can do things that go over their head. :)
    Can you personally estimate which one of the 2 images would be more realistic? I can't.

    One important thing that forgot to mention:

    What is REALLY driving me crazy is that I can't estimate if something looks this way or the other because I set Pre-Integrated Skin Shader's slider "incorrectly" or if it is because of strange lights.

    How do you handle this?
     
  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I usually use IBL to light up my models... and I think the model of the left feels a bit more realistic.
     
  23. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I agree, left...
     
  24. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    The hard part though is using the lighting to work out the detail... and the GI helps a lot here... on the right, the light/tint is too harsh and it drowns out the specular
     
  25. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    @Neptune_Imaging Do you still use IBL even with Unity 5? I own Skyshop, but I felt that with Unity 5, the need for it was gone.
     
  26. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I ALWAYS use IBL, even when lighting interiors... it makes lighting look more natural. And then once I feel the natural lighting is good, then I will drop in a few point lights just to add some accent to the cubemap
     
  27. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Is there any tutorial that you followed? I watched a few YouTube videos that were appearantly about an older version of SkyShop and demanded an amazing amount of pre-knowledge.
     
  28. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I just have pre knowledge of this stuff.
     
  29. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can't you make a YouTube video about it? :)
     
  30. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I can try to, though I have moved on to a new shading system.
     
  31. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    What do you mean by "new shading system"?
     
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I am using Alloy, which is a pretty robust PBR shading system... the principle of lighting human skin applies here as well...
     
  33. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Can you explain how this works together? I thought now that Unity 5 Standard Shader is available, Skyshop and other shaders are no longer needed. And you say that you are using Pre-Integrated Skin Shader and Alloy? :) I am confused.
     
  34. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Alloy has it's own skin shader which is Pre Integrated.
     
  35. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I only have a diffuse and a bump and an opacity map. There is no way to have Pre-Integrated Skin Shader automatically create the other maps for me, is there?
     
  36. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    You have to paint the other two maps, specular which is a constant grey of 35% and a roughness map which contains the most detail...
     
    shkar-noori likes this.
  37. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Isn't there any program that does that for me? :)
     
  38. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Painting textures for ANYTHING is not an automatic process... you will not magically get the perfect skin every time, especially for the different lighting conditions and so forth. As an artist, you have to put in the work
     
  39. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    But... I do have a hi-res model and a diffuse map. Is there no way to calculate the required maps automatically?

    I am an artist, but I don't have time to spend on great details, unless Google introduces a quantum computer to preserve my brain for a second life. ^^
     
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    You could create the base versions of the roughness and specular... but you need to paint them for detail
     
  41. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
  42. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
    I am using version: 1.1.1 (Feb 09, 2015) with Unity 5.0.0f4.

    I am not sure if Pre-Integrated Skin Shader uses the present lights in the right way.

    Here is an image:


    While the Pre-Integrated Skin Shader looks very nice, I think it is not influenced enough by the environment lights.
    As you can see, the Standard Shader renders out much darker (which would be correct in my opinion).

    Is this something that is being worked on and which has to do with a lack of compatibility with the Standard Shader?

    Edit: Hmmm, perhaps this also has to do with the fact that I am not using a normal map?

    Edit 2: After lots of trying, I am currently switching to the Standard Shader because it just looks more realistic under all lighting conditions. Sorry to say that.
     
    Last edited: Mar 14, 2015
  43. TobiUll

    TobiUll

    Joined:
    Feb 22, 2015
    Posts:
    73
    No reply?
     
  44. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Sorry, I was busy working on the shader and lest you guys without news/replys lately.
    Status:
    V1.1.1 now on asset store is a stop-gap solution for Unity 5. It's less broken now, but doesn't use new lighting features, thus may be inconsistent with new shaders.
    V2.0 is mostly done. It's Unity 5 ready. I need at least one more weekend to polish it up before submitting.
    I wish asset store had some clean way for beta/pre-release testing. For those wanting to test v2 in it's current fluctuating state send me a mail with PSSBETA in the title and the invoice pdf or number. Keep in mind I'm braking it constantly just to sew the guts back the next day or so.

    Stay tuned!
     
    kbalasubramanian likes this.
  45. kbalasubramanian

    kbalasubramanian

    Joined:
    Feb 6, 2015
    Posts:
    6
    I would be very interested in checking out Pre Integrated Skin shader for Unity 5. Waiting for the update. Thanks
     
  46. wdw89

    wdw89

    Joined:
    Mar 28, 2015
    Posts:
    4
    Will the 2.0 version support console platform if you rewrite in the form of a CG/HLSL shader instead of a Surface Shader?
     
    TobiUll likes this.
  47. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Console platforms are not supported, since I don't have access to dev kits and haven't seen any public information on how Unity handles shaders on consoles.

    p.s.: I've added your question to the FAQ in the new wiki.
     
    wdw89 likes this.
  48. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    any update on Unity 5 compatibility?
     
  49. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    The full changelog is available here. I'll either paste it all in or link at bottom when releasing 2.0. If I recall correctly, the publisher page somewhat implies the release description is for the version being uploaded and not an all-time changelog.

    Update: I understimated the time needed yet again, but I'm getting there!
    I'm in the middle of rewriting the specular implementation, which includes reflection probe support and energy conservation. Then I'll need some more time to clean up and rearrange the shader variants to different feature-sets before release.
    In the mean time, if you want to beta test or just check what is coming up, you can register on gitlab.
    Once finished specular I'll move on to polish, documentation and testing. This is when I'll need more external feedback on shader's behavior in real world scenarios.

    Some teasers. Here you can see in action, top-left: only direct light; top-right: direct light + GI; bottom penumbra scattering from a spot light.
    This is actually in Unity 4 with baked light probes, but the same applies to Unity 5's real time GI.
    jeezers_spot_and_gi.png Here, two of the jeezers render with a direct light and two others render with the same light, but baked into light probes. Can you tell which is which? Shadows are disabled here. What you see behind the ear for example, is actually ambient occlusion.
    jeezers1.png

    Now, back to work!
     
  50. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    Thanks for the update . I am really looking forward to the Unity 5 official compatibility release :)