A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by cician, Feb 26, 2013.
Sorry here are the image for comparison
Hey there Cician,
First off I want to say that I really love your shader, it looks beautifull. Recently we started porting our game to Xbox One and we've been getting some rather unpleasant warnings on PreIntegratedSkinShaderV2.0_combined. Unfortunately I'm not experienced in shader code, so I was wondering if this is something which can be resolved?
Here's the log:
Looking forward to your feedback. Cheers!
Although consoles are not officially supported as I don't have access to SDKs, I can probably make it work with a few tweaks.
Could you please do the following:
- Right click on the shader and click reimport
- Check the console output. If there are any errors or warnings other than what you've already written, please tell me.
- This one is a bit more of a hussle, but may help me quite a bit. Select the shader. In the inspector there's a dropdown "compile and show code". First click on the arrow and make sure the xbox one renderer is selected. Then click on the button. Copy the output from MonoDevelop/VS and send it to me in a private message.
Does this shader work for MCS(morph 3d)? and unity 5.5?
Issue seems to have cropped up again, in 5.6.0b4. And same thing, goes away when switching Unity to Forward, even though this shader doesn't even render in deferred...
Fixed the problem @cician , You just need to change line 287 in "PreIntegratedSkinShaderCore" from:
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
o.pos = UnityObjectToClipPos(v.vertex);
Since they changed some things with how that worked. I guess a version check will need to be put there to choose which.
Thank you very much @Invertex. I incorporated this change. Not using the UnityObjectToClipPos (introduced in Unity5.4) was potential cause of other bugs as well, esp. in VR.
It appears that for any forward-rendered shaders to make AO work correctly with the beta PostProcessing asset, you need to select "Force Forward Compatibility" . This is true even for default new surface shader created by Unity, if you force it to to forward path (by adding exclude_path:deferred).
Do you have issues with built-in image effects as well?
Thanks for the tip I'll give it a try. Will test more to see if everything works ok
Any idea how to fix this issue here: Any time I have a point light on character using this shader I get this:
Any clues on how to address this issue?
Hi. I'll need some more information. I'm guessing the issue is the overall flat appearance of the skin.
Please expand the internals part of the material inspector and check if there are any texture slots not plugged in. Also check if the Diffusion Profile slot is set. If in doubt, just select the default Caucasian profile.
What is texture resolution in quality settings (full res/half res..)? There's currently a known issue with the shader when it's not set to full resolution (I'm working on it).
Textures are at full resolution(4k)
Here are screen shots of the material inspector:
Shader PreIntegratedSkinShaderStandard fails to compile for ios with error: "
Shader error in 'Skin/PreIntegratedSkinShaderV2.0_Standard': invalid subscript 'boxMax' at Assets/PreIntegratedSkinShader V2.0/PreIntegratedSkinShaderCore.cginc(925) (on glcore)
Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_NO_SCREENSPACE_SHADOWS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA"
Unity version 5.5.1f1
Workaround: in file PreIntegratedSkinShaderCore.cginc in line 885 replace #if UNITY_VERSION < 540 with #if 1.
AFAIUI this code defines specular component only.
We've been using your shader for quite a while, and have a few questions and comments. However to start off with I'll post some pics from our project to give you an idea as to how well your awesome shader is working.
We are having some issues though and perhaps you can help us...
1. There is no way to add wrinkle maps right now. We will probably go ahead and modify the shader to add this feature, but if you are already adding wrinkle map support let us know and we'll hold off.
2. Energy conservation: It doesn't look like the shader conserves light energy in a way that matches the Unity standard shader - or possibly it is not getting all of the light inputs that Unity shaders are getting. Essentially this means that given different lighting situations, the skin in the scene will either be too bright or more frequently way way to dark compared to the "standard" shaders that are next to it (for example the shirt here).
What this means for us is that we have to light the skin on a separate layer, and add about three point lights per character, and animate the intensity of the lights as the character moves through the scene to make the skin look realistic in an ordinary scene.
We usually have issues here when characters go into strongly lit, or dimly lit environments.
3. Very difficult to dial in the scattering, specular, translucency settings. Essentially we've done this above using just a very long process of trial and error. We don't know what the physically correct ranges are for each slider, and we have no idea beyond checking the demo model, and just moving things left/right until it starts to look better. The above shots look "good", but still not perfect. We are using photo reference to try to dial it in a bit closer.
As for this character.. if anyone is interested:
- Eye Advance for eyes (asset store).. This shader also takes some serious tweaking, and eye brightness has to be carefully animated in a scene to avoid cases where eyes are either "spooky" because they're too light or too dark.
- NVidia Hairworks.. Obviously in these shots the hair has not yet been tuned, and there's no self/model shadowing yet, but we have some other shots of this model from a bit later where the hair is perfect. It's actually pretty remarkable you can do hair now in realtime like this. We've obviously taken the Japan Unity's hairworks repo, and actually fixed it to work in Unity 5.6.
- SE Soft Shadows - For any photoreal rendering in Unity, you've got to replace the nasty unity shadows with this shader. In fact there's no reason IMO to not just use this shader everywhere on everything as it's awesone.
4. Forward rendering with 8x MSAA and HDR (Unity 5.6) with the new postprocessing stack - in this case just a bit of color correction.
Just thought I'd also post a video..
The fix for this is coming to the asset store, currently in review.
Thank you for sharing. Seeing your work encourages me to keep advancing this asset. I'll give high priority to fix any energy conservation related bugs, but I may need some help in reproducing the issues. I need to know some of your graphics settings and light setup. For starters:
I'll write some more specific questions tomorrow. And again, thanks for feedback.
Gamma Lighting (Though we're switching to Linear)
Global illumination for BG scene
Reflection probe (static - box)
The thing we were thinking of doing was to place several simple geo (say a sphere) materials next to the same geo mapped with the skin, and just compare it's response to lighting under different circumstances (point, spot, directional - light probes, reflection probes, gi, ambient, etc).
We're thinking it might be a combination of the features we're using in the scene.
On another subject, these characters come with a full set of wrinkle maps that we'd really love to plug in. We were thinking of modifying the shader to add support, but you mentioned you might be working on that soon.
We're getting better results with the new changes to the Eye-Advance shader for eyes in getting our eyes to more closely match the total energy of the surrounding rendered mesh. Any progress on looking at checking on how to make sure skin matches up in various lighting conditions?
If you'd like we could privately send you some of our models for you to test with. This might be the best way to help you out.
Thank you very much for your shader!
We want to render asian women's face, can you give some advice on how to prepare for the assets?
We want asian face like following with smooth skin, bright skin, a little blush on the cheek,
So We are thinking to make relativly flat depth map, and makeup on specular map, is there anything else we should optimize like diffusion map?
Hello everyone. I've been asked many times how I make the depth maps for the skin shader, so I decided to make a small tutorial for Substance Painter to help you all.
Here you go:
As I have already discussed with @cician in private, I would so much like support for transmission maps.
The author of the popular and amazing Knald map baking application pointed out that he will not allow the creation of thickness and depth map.
Here is what he said:
I would therefore like to ask if the authors of pre-integrated skin shader (which I love sooooo much) would create an additional version that supports transmission maps instead of flawed thickness maps.
@cician suggested using Knald's transmission map with some tweaks, but I never got it to work, it never looked realistic whereas I have produced great results with the old thickness maps.
But I don't want to use an old technique, I would rather like to step forward and use Knald's transmission maps. They require no setup at all, they simply bake within less than a second. The above screenshot shows what it produces: A totally realistic view of transmission.
The pre-integrated skin shader should be able to allow us using it.
Thank you for your consideration.
Maybe you can add this option to your poll.
What is teh result of knald? greyscale or sh map?
a have some problem with reenabling spot light.
translucency and specular not shadowed.
switching light into mode "with shadow" and turn back temporary fixes bug.
I would also like to use Knald transmission maps.
What is an SH map?
SH = spherical harmonics, code low frequency directional contribution using 7 floats per point. Basically a gray scale has no concept of direction, but thickness can change depend on that. SH map are used in some game to code the directional data of light (see the last of us).
Thank you so much for such a wonderful shader. Here's a WIP of our character using your shaders. (Also, this is a mobile project)
Just wanted to say thanks creating this great set of shaders. They've really helped us on our game project. Please keep up the awesome work!
Best regards, -Heinz
Unity 2017.1 iOS with deferred rendering path:
UnityObjectToClipPos function call was already added by unity on upgrade.
Any idea what went wrong?
Mobile platform doesn't support deferred pretty sure.
iOS: Enable deferred shading rendering path for Metal and OpenGL ES 3.0 for A8 and later iOS devices.
I found a cause of my problem (few posts up).
In deferred shading mode forward-rendered objects are rendered to depth texture with SHADOW_CASTER pass.
This skin shader uses VertexLit shader shadow path. Which adds small shadow bias to geometry. And this leads to the bug.
@cician, please replace vertex lit shadow caster pass reference with some simple copy of vertex shader.
When is this ever going to get the update with normal detail mapping?
Hey guys... so I haven't used the new version of this shader and I'm wondering what the new changes are? Are the controls the same as version 1? And is this physically based...
This is impressive!!! I haven't used this shader in a long time (I use Amplify Shader Editor and Alloy), but I may go back to this if there is some way to customise it for use with Amplify. Possible, @cician @dzodzu?
You can bake a thickness map in Substance Painter and invert the results. I have a tutorial that goes in depth of making it
I tried so long to automate the process of the map creations, and I nearly went crazy because I had to jump back and forth in different programs.
I just wanted to tell everybody who's interested that I finally found a good solution.
Knald 1.2.1 provides all the maps necessary to bake the required maps ultra-fast and in amazing quality. Not like waiting 2 days for xNormals to bake not-so-good maps.
Knald is on sale (or he permanently lowered the price?, I don't know), so I bought it, and it works just great.
For depth / thickness map (which Pre-Integrated Skin Shader requires) you can simply use Knald's transmission map (which is a more realistic version of Depth / Thickness).
I have a knald license and it bakes VERY FAST, especially for transmission maps. I also bake with Substance Painter and it bakes out a near perfect transmission maps that I can edit as needed.
Would anyone here know if it is possible to get this shader working with SEGI? I am willing to pay for a solution, but nobody seems to have one!
Yes, SEGI compatibility, please!!!!!
@KRGraphics Kashif, could you show your faster way of creating a depth / thickness map with a YouTube video?? That would be a big help!
Can the authors of Pre-Integrated Skin Shader support transmission so we can do everything in one baking program like Knald?
It's pretty straightforward in Substance Painter (if you have it). Just bake your map as normal and invert the results using a levels node. You can also paint on it too, and add veins and capillaries.
@dzodzu made a short video on how this is done.
And same with Knald... it's brutally easy. Just import your high res, low res mesh, enable transmission, bake, enjoy
The author has been responded in ages
Yeah, guess he abandoned it.
I read your discussion from the beginning.
Can you tell me in detail how to make the textures needed with knald?@twda
I tried to import the daz3d model into the unity, but they led poorly.
If anybody is interested:
The normal map of jijii to me didn't look like it's a "normal" normal.
I had somebody investigate on it, and he confirmed that it's X+Y+Z+, so it's what Unity expects.
Just in case anybody else wondered about it.
KANLD can generate the following map:
The texture required for the plugin is as follows:
Diffuse Map(RGB)==Color map ？？
Depth / thickness map(R)==transmission？how to use？
Normal Map==Normal Map
Occlusion texture==AO？But, I get the AO map is more profound than the demo, can I use it directly?
I have a closer look at the pdf document, but as an independent game producer who does not use the substance painter, it is very difficult to understand the meaning of these maps and make it out with a program.
Can anyone tell me that I can use it directly on the basis of KNALD or use PS to make the map needed for this plugin?
Detailed description or can google words, thanks!