Skip to content

Script for Unity ProBuilder + RealtimeCSG mapping that deletes faces with 0 area (containing NaN tangent coords)

License

Notifications You must be signed in to change notification settings

XgarhontX/Delete0AreaFaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Delete0AreaFaces

Thumbnail Script for Unity ProBuilder + RealtimeCSG mapping that deletes faces with 0 area (containing NaN tangent coords).

  • RealtimeCSG writes NaN to tangent coord space of mesh, causing shaders using normal maps + directional lightmap to spread NaNs everywhere.
  • All these faces NaN faces have an area of zero, so this script walks through all faces and deletes them.

Requirement

(Made in Unity 2022.3.13f1)

  • RealtimeCSG (used 1.601)
  • ProBuilder (used 5.2.2)

Usage

  • Put script into any "Editor" folder in Unity (else you can't build).
  • Export the RealtimeCSG Model as Unity Mesh.
  • ProBuilderize all exported mesh.
  • Add the Delete0AreaFaceScript to GameObject that all the meshes are a child of.
  • Click the buttons and ez!

About

Script for Unity ProBuilder + RealtimeCSG mapping that deletes faces with 0 area (containing NaN tangent coords)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages