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

Add high poly to low poly map bakers #405

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

wojtekpil
Copy link
Contributor

@wojtekpil wojtekpil commented Jan 3, 2022

This a high poly to low poly normal & world normal & depth map & AO baking PR. This is using bvh & raytracing.
How to use (UI is temporary):

  1. Select your low poly mesh in 3d preview window
  2. In 3d preview window: Model -> Generate Map -> HP->LP normals
  3. First popup window asks about destination file for normalmap image
  4. Second popup asks about high poly obj file

BVH is generated only once per hp mesh & creates a cache file -> *.bvh_cache alongside original hp mesh so second bake should be almost instant. Remove this cache file, in case the source hp mesh changes.
Parameters used during hp -> lp normals baking are temporarily inside preferences -> bake window
Used parameters:

  1. Cage front distance - the distance in the normal direction of baking cage from low poly model vertices
  2. Cage rear distance - the max length of ray started from cage. Intersections above this distance will result in black normalmap (as no hit was detected)
  3. Smooth cage - generate a smooth normals for baking cage. Use with hard edges lp mesh for eliminating discontinuities on mesh edges.
  4. Ray length - AO maximum ray length. Above this distance occlusion of point is not checked
  5. Ray count - number of rays used during AO calculation
  6. Denoise radius - radius of denoiser for AO baker
  7. Cos distribution - Use cosine hemisphere distribution to sample the AO. This option requires less samples for more accurate result but may produce some artifacts.
  8. Ray bias - Offset from hp vertex in the normal direction. Eliminates some numerical calculation errors due to precision loss.
  9. Norm bent normals - normalise bent normals

@wojtekpil wojtekpil changed the title Add high poly to low poly normal map baker Add high poly to low poly map bakers Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant