User Tools

Site Tools


pidi_pbr_skin_legacy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pidi_pbr_skin_legacy [2019/09/06 02:05]
irrsoft [Creating wrinkle maps.]
pidi_pbr_skin_legacy [2019/09/06 07:30] (current)
irrsoft [Final Notes]
Line 439: Line 439:
 Here we can see the three regions we just defined with sliders to control the left and right side of any of them. By moving the sliders you can see the wrinkles appear and disappear from the Orc's face. This is useful to make sure that every parameter has been correctly set up before we go to the last and crucial step of defining which bones or blendshapes will have influence over which wrinkles.  Here we can see the three regions we just defined with sliders to control the left and right side of any of them. By moving the sliders you can see the wrinkles appear and disappear from the Orc's face. This is useful to make sure that every parameter has been correctly set up before we go to the last and crucial step of defining which bones or blendshapes will have influence over which wrinkles. 
 ### ###
 +
 +\\
 +{{ :pbr_wrinkleregiontest.jpg?direct&600 |}}
 +\\
  
 If everything is set up correctly, we can move now to the next and last step. If everything is set up correctly, we can move now to the next and last step.
 +
 +\\
 +
 +----
 +
 +==== Dynamic Wrinkles Tracking ====
 +###
 +The main goal of dynamic wrinkles is to improve the visual quality of complex animations, especially facial animations. To do this however, the wrinkles must be synced somehow to the movement of either bones or blendshapes. 
 +###
 +###
 +Since version 1.2 with the addition of the Skin Shader Manager there is a simple way to add tracking sets for each wrinkle region that, once defined, will automatically sync the wrinkles to the facial animations of your model. 
 +###
 +###
 +In this tutorial we are using the Orc Model which has a facial rig. This means that our wrinkles must be synced to specific sets of bones to work as intended.
 +###
 +###
 +To start adding tracks, open the Dynamic Wrinkles Tracking tab on the Skin Shader Manager and then click on the **Create new Wrinkles Track button**
 +###
 +\\
 +{{ :pbr_createwrinklestrack.jpg?direct&600 |}}
 +\\
 +
 +###
 +Click then on the Wrinkles Track 0 that just appeared. There you can see a tracking mode (which is set by default to “Track Blendshapes”,  the “Affect Region” is set to the Forehead region, both a Left and Right Side sliders to control the intensity of the wrinkles when affected by this tracked blendshapes/bones and finally a small button that lets you add blendshapes to track.
 +###
 +
 +\\
 +{{ :pbr_wrinklestrack1.jpg?direct&600 |}}
 +\\
 +
 +###
 +Change the tracking mode to Track Bone and then click on the Add new bone track button.
 +###
 +
 +###
 +This will add a small container that lets you add a bone transform that will be tracked as well as defining its resting pose and its target pose. As the bone moves / rotates from the resting pose and towards the target pose, the wrinkles of the affected region will move towards the target Left/Right values. 
 +###
 +
 +\\
 +{{ :pbr_createwrinklestrack_bone.jpg?direct&600 |}}
 +\\
 +
 +###
 +Once you add a transform to be tracked as a bone the script will let you copy its current position and rotation to either the resting pose or the target pose. Once those values are defined you can also set the current pose of the bone to match either the resting or target pose. This makes prototyping and testing these poses quite easy,
 +###
 +
 +###
 +In this example we have moved the position of the Brow2_R and BrowM_R bones slightly upwards. This will be our resting Pose so we just need to click now the Copy Current Pos/Rot under the Resting Pose section. The current position/rotation of the bone will be automatically assigned.
 +###
 +
 +\\
 +{{ :pbr_copyposandrot.jpg?direct&600 |}}
 +\\
 +
 +###
 +Repeat the process for the BrowM_R bone and then, once you have set the resting pose of both bones, move them both further upwards and click on the Copy Current Pos/ Rot of the Target Pose section to define this new pose as the one the bones have to take for the wrinkles to appear
 +###
 +
 +###
 +To finish, let's turn the strength of the Right Side value to 1. This will make the wrinkles of the right side of the forehead be fully visible as the bones we are tracking move upwards. If you move the bones in the editor the wrinkles will now start becoming visible and invisible as the bones move closer or further away from the rest and target poses we just defined.
 +###
 +
 +\\
 +{{ :pbr_moveboneswrinkles.jpg?direct&600 |}}
 +\\
 +
 +###
 +In the image above you can see how the bone moving upwards produces dynamic wrinkles. The Skin Shader Manager automatically updates and performs calculations for the wrinkles based on the bone positions and blendshape values which ensures that once they are defined they will work automatically even with complex animations.                                                                                                                                                                                                                                
 +###
 +
 +###
 +If we were using Blendshapes instead of bones the whole process is somewhat similar. Instead of adding a bone track we add a blendshape track :
 +###
 +
 +\\
 +{{ :pbr_createwrinkletrack_blendshape.jpg?direct&600 |}}
 +\\
 +
 +###
 +On it, we select the blendshape we want to track from the drop down list (in the image the current blendshape is set to a null value) and with the slider on the right we decide which weight must the blendshape have for the wrinkles to appear in full force. 
 +###
 +
 +###
 +A single Skin Shader Manager component can mix both bone and blendshape track as required and the weights of all the bones and blendshapes that influence a wrinkle region are added and averaged to achieve realistic and predictable results.
 +###
 +
 +###
 +This means that you can have very complex and detailed animations using blendshapes, bones or a mix of both and have the skin of your characters deform and wrinkle in a believable way and synced to all animations just by making sure you follow this set up guide carefully.
 +###
 +\\
 +
 +----
 +===== PBR Eye Shader =====
 +
 +----
 +
 +###
 +Starting with version 1.2 of this package an advanced Eye shader has been included. This shader is designed for a specific workflow where the movement of the eye is controlled through the shader itself rather than through rotation of the eye object. However, it can be used in that workflow as well.
 +###
 +
 +###
 +This eye shader is in active development to add more features and, in version 1.3, a small script system that handles object tracking in an easy to implement way. 
 +###
 +
 +###
 +The main textures used for these shaders are :
 +###
 +
 +
 +  * Eye Data Map that has Eye Occlusion information on the green channel and a pupil area shaped like a gradient-circle to allow for dilation on the alpha channel
 +  * Albedo + Iris Map that contains the main texture and, marked as full transparency, the iris area that will change colors when we modify the Eye Color variable in the material.
 +  * Normal map, to add details to the eye's surface
 +  * Reflection cubemap to add more realistic reflections to the eye itself
 +
 +
 +Example textures for this shader are provided to show how the material looks when set up properly. 
 +
 +\\
 +{{ :pbr_eyes.jpg?direct&600 |}}
 +\\
 +
 +###
 +The eye occlusion in this shader stays still when the eye moves by using the shader's Eye Direction variable. This adds a very high level of realism to the eye by adding the shadowing produced by the eyelids of the character. However, if you are rotating the spheres to perform your Eye tracking it is recommended to turn this occlusion down so it doesn't break the immersion.
 +###
 +
 +
 +
 +
 +The shader's properties are mostly self explanatory :
 +
 +\\
 +{{ :pbr_eyes2.jpg?direct&600 |}}
 +\\
 +
 +###
 +The eyes direction variable controls the direction in which the eyes point. A positive value on the X axis turns them to the right, a negative one to the left. A positive Y value turns the eyes down while a negative one turns them up.
 +###
 +###
 +The Sclera Gloss value controls the glossiness of the white part of the eye while the cornea gloss controls the glossiness of the iris and cornea areas.
 +###
 +###
 +Specular and Color control the specularity and overall color of the eye (white and iris)
 +###
 +###
 +The Albedo texture has the main texture for the eye. The iris area should remain as a grayscale with no actual color. The alpha value of this texture defines the iris zone, for which we will set the Eye Color value later.
 +###
 +###
 +The normalmap texture is a standard normalmap used to add detail to the eye's surface.
 +###
 +###
 +The eye color controls the color of the irises while eye occlusion controls the intensity of the eye's shadowing. 
 +###
 +###
 +Cornea distortion adds some depth to the eye to make it resemble more closely the real shape of an eye.
 +###
 +###
 +Pupil dilation controls how open/closed the pupils are in the eye. This can be used to simulate the eye's reaction to strong and dim lights and to produce interesting effects during close ups.
 +###
 +###
 +Night Vision effect allows you to make the pupil of the eye emit light which is useful when working with night vision-like effects. 
 +###
 +
 +\\
 +{{ :pbr_eyes3.jpg?direct&600 |}}
 +\\
 +
 +###
 +Finally the Eye Data Map, the Eye Reflection Cube and reflection intensity control the specific properties and final appearance of the eye as described above.
 +###
 +
 +###
 +To better use the eye shader, a new component is available for you called PIDI_EyeShaderManager. 
 +###
 +
 +\\
 +{{ :pbr_eyeshadermanager.jpg?direct&600 |}}
 +\\
 +
 +###
 +This component allows you to set up the eye color per-instance independently from the color set in the material itself, as well as to select if you want to use the integrated eye-tracking system.
 +###
 +
 +###
 +If you set the **Eye Motion Type** to **Shader Vector Motion** and assign either a Transform as a target or a global position, either through code or directly in the inspector and the eye will automatically follow it.
 +###
 +
 +###
 +If you use code, you need to assign the value of the variables transformTarget for a Transform component or pointTarget for a global position.
 +###
 +
 +###
 +If you would rather use another system or to do the eye tracking on your own, or if you will rotate the eyes directly using the transform component then you must set the Eye Motion Type to either None or the preferred and recommended way, Transform Direction Motion and use the Eye Shader labeled as High Quality (Dynamic).
 +###
 +\\
 +
 +----
 +
 +
 +===== Final Notes =====
 +
 +----
 +###
 +Please remember that the tracked lights need to be assigned for the translucency and scattering to work as expected in Deferred and Lightweight rendering. Please also be aware that due to limitations in those 2 pipelines the results will not be as accurate as the ones achieved in Forward mode.
 +###
 +###
 +The High quality variations of this shader for Desktop (Forward and Deferred) make use of tessellation, so a hardware compatible with Pixel Shader 5.0 (DirectX11 or OpenGLCore) is required. 
 +###
 +###
 +2 Mobile shaders are provided for Android devices compatible with OpenGLES 2.0. Their features are limited compared to the main, Desktop branch.
 +###
 +###
 +Lightweight SRP is still under development by the Unity team, meaning that some of the features for that platform may change over time. You MUST enable SRP Mode on the Skin Shader Manager component when using Lightweight SRP.
 +###
 +###
 +If you have any doubt about this product or how to use it, please contact us at support@irreverent-software.com and we will get back to you to work and solve your doubts as soon as possible.
 +###
 +###
 +Thank you very much for purchasing this asset from PIDI – Game Development Framework. I hope that it will help you make amazing games! 
 +###
pidi_pbr_skin_legacy.1567735515.txt.gz · Last modified: 2019/09/06 02:05 by irrsoft