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

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Been messing around with the shader.

    $skinshadertrial2.jpg

    $skinshadertrial.jpg

    The specular map is obviously WIP, but this was my first purchase on Unity Asset Store and I must say I'm most pleased.
     
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    not bad man...
     
  3. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    I've been using standard shaders or gimmicky ones (no offense to anyone who's shader i've used, it was just my inability to move forward) but this shader gave me the will to remodel my main character. I leave the judging to you guys since there's the older version of him on this page as well.

    $day1.jpg - around 8 hours


    $day1_night.jpg -around 14 hours

    It's WIP. Started this afternoon, so far I'm very pleased. I love this shader and the fact that it forces me to create better assets that make better use of it.
     
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Do you have a depth map on this model?
     
  5. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Nope, and this is with Unity Free.
    I've since modified the specular map to get better results and added skin pores in zbrush.
     
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Very nice... i would also build a depth map to control the scattering on the ears :) they are too red right now
     
  7. sickle

    sickle

    Joined:
    Mar 14, 2013
    Posts:
    8
    Very Impressive shader. We have been looking for this for a long time but before purchasing I wonder if what do u mean of pre-integrated shader - is it like not viewable at all ? ( pre-compiled)
     
  8. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
  9. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Thanks! :)
    I've tended to the ears first thing after I posted the image.

    The details around the eyes are baffling. Since I'm relatively new to the specular map scene, can you walk me through on how you prepare yours?
     
    Last edited: Mar 28, 2013
  10. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I am using HDR and the point lights for some ODD reason shine through objects... :(
     
  11. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Can you post a screenshot?

    Is it the same with rims off?

    Also, is it 1.0 or 1.1-dev?
     
  12. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    It's pre-integrated in that some heavy calculations are done ahead of time (one time operation) and stored in lookup textures for access at runtime.
    Models can be skinned and animated as usual.
    This technique is designed to be very fast (compared to for example Texture Space Diffusion).

    Shader source is included.
     
  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    this happens with every shader in unity... and i am using 1.1. Point lights don't self shadow
     
  14. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    You have pretty nice results here :) You should make a depth map for him and it would be almost perfect. And to make it perfect I would only stick out his ears a little bit more, because antihelix and its triangular part are usually visible from front. See pic below:
    $ear.jpg
     
  15. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This is the BEST skin shader ever made... and are you using a low diffuse bump value...? been trying to figure out how to make the skin softer... and i hope you guys are adding stuff like subdermal mapping :)
     
  16. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
  17. cician

    cician

    Joined:
    Dec 10, 2012
    Posts:
    233
    Try running this shader
    HTML:
    Shader "Custom/SMTest" {
    	Properties {
    		_MainTex ("Base (RGB)", 2D) = "white" {}
    	}
    	SubShader {
    		Tags { "RenderType"="Opaque" }
    		LOD 200
    		
    		CGPROGRAM
    		#pragma surface surf Lambert
    		#pragma target 3.0
    
    		struct Input {
    			float nothing;
    		};
    
    		void surf (Input IN, inout SurfaceOutput o) {
    			o.Emission = half3(0, 1, 0);
    		}
    		ENDCG
    	}
    	SubShader {
    		Tags { "RenderType"="Opaque" }
    		LOD 200
    		
    		CGPROGRAM
    		#pragma surface surf Lambert
    		#pragma target 2.0
    
    		struct Input {
    			float nothing;
    		};
    
    		void surf (Input IN, inout SurfaceOutput o) {
    			o.Emission = half3(1, 0, 0);
    		}
    		ENDCG
    	} 
    	FallBack Off
    }
    
    If it's red, you're running on shader model 2 -> no shadows from point/spot lights.
     
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    The model turned green... and my hardware is the latest... running a SM5 graphics card...
     
  19. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Hey guys, I've been working on some other stuff so I really haven't complete this model (yet). Here's an update.

    $Scarlet_FaceApril1.jpg

    It has the depth/specular/gloss map combo that I built using the tutorials on your youtube account(which came quite handy, by the way.).
    Still a lot to be fixed, and he doesn't have eyes yet. I guess I'll have those complete by the end of this week.
     
  20. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Awesome update! nice details on ears :D One little thing, when you see those green bluish or reddish borders, this happens when you have strong angle on normal map, to avoid it, try lowering one of the diffuse bumpiness sliders, in your case green one. Keep us posted and good work :D !
     
  21. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    And it also makes your models' skin feel softer... any news on my point light issues?
     
  22. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    It happens on every shader in unity with point lights when using soft shadows and shadow strength is set to something lower than 1, it's extremely visible when material has specular or cubemap reflection. Don't know if there is a way to fix it :mad:
     
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Ironically, my shadow strength is set to 1
     
  24. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Hmmm, another thing that comes to my mind is back rim, the only thing that is not occluded, try to turn it off, but if it's not this i don't know what else could cause it.
     
  25. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Now i tried with spot light and i get exactly what you have there. No matter what type of shadow i use.
     
    Last edited: Apr 2, 2013
  26. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    And the only way to really fix this, is either disabling the light or set it to spot... and even if they are point lights, ALL light casts shadow and self shadows.
     
  27. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Unity is horrible at handling shadows :mad:
     
  28. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I have been trying to tell them, they need to fix their lighting engine... I use lighting a lot, and most engines have this similar issue... they need to fix that... also is there a way to get the skin to look even softer? And i think too the main color should be defaulted to grey... the skin gets overblown if i unplug my diffuse map...
     
  29. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    You mean more kinda waxy? It was already pretty hard to get to those results, we might tune it a bit more but not much. Remember it all works on normal maps, so better and bigger normal map than better result you get. And yes we can default it to gray. I usually use a little green-bluish color, but it all depends on how i want to tint my diffuse map.
     
  30. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    And with light probes, it is a full blown white... my normal maps are at 2048... as for the main colour, i would have to brighten up diffuse map to compensate... in a MR/VRAY SSS, a brightened version of that diffuse map would be there instead...just an idea :)

    EDIT: I also tweaked the parameters already myself. For sweat, turning up the gloss intensity helps too :)
     
  31. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Hey, thanks a lot. :D
    Took your advice and yes it worked.

    Edit: You guys need to do some eye and hair shaders.
     
    Last edited: Apr 5, 2013
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I actually have a working eye shader :)
     
  33. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey Cician, I sent you a new test render... the skin is now super soft :)...and it works with night lighting...

    $Skin-Render.png https://dl.dropbox.com/u/158971/Blade/Blade%20Test%20Render/Skin-Render.png
     
    Last edited: Apr 7, 2013
  34. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106


    What do you use?
     
  35. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467

    I am using a custom made shader for the eyes... you can see it in action in the link I posted :)
     
  36. Korda

    Korda

    Joined:
    Jan 3, 2013
    Posts:
    37
    This shader looks amazing! Will definitely buy once I go pro
     
  37. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Can we see that in action?! If you're pleased with the results, will you include this within your asset pack, or would that be separate?

    I'm interested in your shader for a first person shooter, will it seriously compromise performance for that purpose?

    Thanks!
     
  38. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This shader is nothing special... I specifically made it for eyes... all it uses is a transparent shader with a very high spec and gloss
     
  39. scarletsnake

    scarletsnake

    Joined:
    Nov 27, 2009
    Posts:
    106
    Yet another update;

    $charactermodelb.jpg

    Added alpha-mapped hair and eyelashes and lots of iteration on the normal map. Working on the hair and eyes. Right now he's just about 20k, will add more hair planes and the harness that goes on his raincoat . Another character on the way, will use the same shader on the face.
     
  40. Andrew_atl

    Andrew_atl

    Joined:
    Sep 21, 2010
    Posts:
    103
    Looks a lot better now scarletsnake.
     
  41. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Looks incredibly real! Very impressive!
     
  42. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    Bump! Hello there everyone. Do you remember the girl head for tutorial videos? There it is actually, I've been working on it for a while.
    My team mates are also working on a version 1.1 of the shader which is applied here. You will have two new great features; fresnel for specularity and a translucency color. You will be able to create other stuff, like eyes teeth or even clothes, you can see it on the pictures below.
    Still very w.i.p. Small hint: for the teeth I gray-scaled the diffuse and translucency lookup textures.
    $Untitled-1.jpg $Untitled-2.jpg $Untitled-3.jpg $Untitled-4.jpg $Untitled-5.jpg
    Ask if you have any questions.
    What is holding us from releasing it, is the unfinished yet manual, but we are working on it.
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Where are the images?
     
  44. K-JBrothers

    K-JBrothers

    Joined:
    Feb 27, 2013
    Posts:
    43
    Images will show if you clear cache in your web browser. Same happened to me few times already (I use Firefox).
     
  45. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I like how the teeth are looking... are you using an additive gloss for the shine on the teeth? And grey scaling the diffuse is one thing, but grey scaling the lookup textures may not work if the model is all one material. And I think if you are using an additive gloss for the teeth, that should make it in to the shader... And I'm also VERY interested in the hair too... did you use pre-generated hair in a 3d app and bake it into a texture?
     
  46. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    For teeth and eyes I used the new version of skin shader only, nothing more nothing less! Yeah you are right about the grey scaling, if you want to keep one material for the whole character it's not an option..
    About the hair, it's kinda tricky.. I've created hair in 3ds max as geometry picking a simple plane as node, then converted to poly mesh. As for textures I've picked it somewhere, don't remember if it was from some daz or poser object, but I was thinking if I can simply render a hair strap in 3ds max for it.. The normal map is created from greyscale noise stretched quite a lot in vertical and played a bit with tiling to get desired result.
    To get shadows and to make it double sided I've duplicated the whole hair geometry and inverted normals, and then assigned the cutout material.
    Perhaps it's a temporary solution, since the geometry is hella heavy and the specular of material is not looking like I would like to.
    There are a lot of problems with transparencies, you don't get shadows, displaying order of poligons is never right, and it's not double sided (or even if you make it, you don't have specular on the back side).
    Anyway, here ya go, the little explanatory image:
    $Untitled-6.jpg
     
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Nice walk through... thought that is WAY too much work to get hair working properly... I would simply want the hair double sided in the shader... as for the hair, it would look better without the normal map... I really wish someone made a hair shader like the one in uncharted


    http://area.autodesk.com/inhouse/bts/uncharted_3_with_naughty_dog
     
    Last edited: Apr 26, 2013
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys, I just discovered something that I should bring to your attention... light probes washes out your scattering details... is there a workaround for this...?
     
  49. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    It's always the downside of SSS shader/skin shader except ScreenspaceSSS/texture space diffussion. It happen because the shader need real light direction to achieve the SSS effect. Except if there's a way to hack the probe to modified it's behaviour in lighting function. AFAIK :D
     
  50. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    Indeed, the light probes may wash it out. But hey, it washes not only skin shader details, but also other surfaces.. I'm sure there may be some workaround, have to see myself though..
    Anyway, for curiosity can you post some images to see how much detail you loose? In mean time I will make some tests myself.

    By the way, Cician has been testing some stuff for hair... but there are so many troubles.. Thinking that for so many years nothing has been done for transparency order, getting me into despair. The only solution we've been left with is this s**ty cutout..
    There is a recent research by Intel for independent transparency order, but when we will see that?
    http://software.intel.com/en-us/articles/adaptive-transparency