Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Currently, Direct3D 11 is the only API supported by FaceWorks.
GitHub Release Notes
--------------------

This repository uses DXUT as a git submodule. In order to correctly build the projects, you need to open your git shell in the main repository diretory and initialize the submodules by typing:
This repository uses DXUT as a git submodule. In order to correctly build the projects, you need to open your git shell in the main repository directory and initialize the submodules by typing:

`git submodule update --init`

Expand Down Expand Up @@ -130,7 +130,7 @@ The precomputed data used by FaceWorks falls into two categories:

As input to its SSS calculations, FaceWorks uses per-vertex curvature and per-mesh UV scale data.

The `GFSDK_FaceWorks_CalculateMeshCurvature()` function can be used to calculate the curvature values. This function takes the mesh vertex positions and normals, as arrays of floats, as well as the mesh's triangle indices. It estimates the curvature around each vertex, then optionally applies one or more smoothing passes to reduce noise (we use two passes in the sample app). The resulting curvatures are then stored to an output array, one float per vertex. You'll need to store the curvatures in a vertex buffer, and make the interpolated curvature available in pixel shaders where FaceWorks is to be used.
The `GFSDK_FaceWorks_CalculateMeshCurvature()` function can be used to calculate the curvature values. This function takes the mesh vertex positions and normals, as arrays of floats, as well as the mesh's triangle indices. It estimates the curvature around each vertex, then optionally applies one or more smoothing passes to reduce noise (we use two passes in the sample app). The resulting curvatures are then stored to an output array, one float per vertex. You'll need to store the curvatures in a vertex buffer and make the interpolated curvature available in pixel shaders where FaceWorks is to be used.

(Note that in principle, curvature values should change if a mesh animates or deforms; however, in FaceWorks we don't currently provide any support to animate curvature values in real-time. In practice, we suspect it's difficult to notice the effect of changing curvature in common cases, so we recommend simply calculating curvature for the bind pose of a mesh.)

Expand Down Expand Up @@ -163,7 +163,7 @@ Both textures are generated in RGBA8 format, in left-to-right top-to-bottom pixe

Note that if the application tries to use curvatures or shadow widths outside of the ranges represented in the textures, we will simply clamp to the edge of the textures; the results will remain plausible as long as you're not too far outside the range.

In the sample app, we used 512x512 LUTs, stored in uncompressed RGBA8. Smaller resolutions can also be used if desired. If compression is necessary, we suggest trying BC6, BC7, or YCoCg in DXT5; DXT1 isn't recommended, since it will create a great deal of banding in the smooth gradients.
In the sample app, we used 512x512 LUTs, stored in uncompressed RGBA8. Smaller resolutions can also be used if desired. If compression is necessary, we suggest trying BC6, BC7, or YCoCg in DXT5; DXT1 isn't recommended since it will create a great deal of banding in the smooth gradients.

It's important to note that the curvature LUT is generated in linear RGB color space, while the shadow LUT is generated in sRGB color space. FaceWorks expects their texture formats to reflect this, i.e. the curvature LUT should be in a `UNORM` format and the shadow LUT in a `UNORM_SRGB` format. The FaceWorks runtime API will check for this and issue warnings if the shader resource views are not in the expected formats.

Expand Down Expand Up @@ -192,7 +192,7 @@ Constant buffer data related to SSS can be generated by filling out a `GFSDK_Fac
Constant buffer data related to deep scatter can be set by filling out a `GFSDK_FaceWorks_DeepScatterConfig` struct, then calling `GFSDK_FaceWorks_WriteCBDataForDeepScatter()`. The members of `GFSDK_FaceWorks_DeepScatterConfig` are as follows:

- `m_radius` the desired deep scatter radius, in world units. In other words, the distance light can penetrate through the model. This is used as a Gaussian sigma. In principle, this value should equal the diffusion radius used for SSS, but in practice it's often more aesthetically pleasing to set this to a larger radius, such as 5--6 mm.
- `m_shadowProjType` the type of projection matrix used for the shadow map. This, and the next two members, are only needed if you're using the FaceWorks helper functions for estimating thickness from the shadow map. Set to `GFSDK_FaceWorks_NoProjection` if you're doing the thickness estimate yourself.
- `m_shadowProjType` the type of projection matrix used for the shadow map. This and the next two members are only needed if you're using the FaceWorks helper functions for estimating thickness from the shadow map. Set to `GFSDK_FaceWorks_NoProjection` if you're doing the thickness estimate yourself.
- `m_shadowProjMatrix` the shadow map projection matrix, stored in row-major order and assuming a row-vector math convention; transpose your matrix if you're using different conventions.
- `m_shadowFilterRadius` the desired filter radius for the thickness estimate, expressed as a distance in shadow map UV space.

Expand All @@ -219,7 +219,7 @@ For ambient lighting:

For deep scatter:

- Estimate the thickness from the shadow map, using either a FaceWorks helper function, or your own code.
- Estimate the thickness from the shadow map, using either a FaceWorks helper function or your own code.
- Call FaceWorks to evaluate the deep scatter lighting term using the thickness.
- Add up all the terms, factor in the diffuse color and light color where needed, and add specular.

Expand Down Expand Up @@ -313,21 +313,21 @@ When you're done with the error blob, call `GFSDK_FaceWorks_FreeErrorBlob()` to
Version History
---------------

###FaceWorks 1.0 (March 2016) - First opensource release
### FaceWorks 1.0 (March 2016) - First opensource release

- Codebase migrated to latest version DXUT (as submodules from GitHub), and upgraded to use latest DX11 and DirectXMath.
- Codebase migrated to latest version DXUT (as submodules from GitHub) and upgraded to use latest DX11 and DirectXMath.
- Fixed a problem when UV components when triangle coords were degenerate
- Code cleanup and doxygen comments
- Converted documentation to markdown

###FaceWorks 0.8 (April 2014)
### FaceWorks 0.8 (April 2014)

- Deep scattering for direct light.
- Helper functions for estimating thickness from standard types of shadow maps, for deep scattering.
- Subsurface scattering for ambient light.
- Various improvements to sample app.

###FaceWorks 0.5 (January 2014)
### FaceWorks 0.5 (January 2014)

- Preintegrated subsurface scattering supported in D3D11, for skin rendering.
- APIs to generate mesh data (curvature, UV scale) used by preintegrated SSS.
Expand Down