All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m9s
# Patchnotes 2.1.0 The changes in this update are more than just "patches". With a new UI, a new feature, and a bunch of bug fixes, improvements and a new member on the dev team, we thought this was more of a minor update. We would like to introduce @tsubasahane of MareCN to the team! We’re happy to work with them to bring Lightless and its features to the CN client as well as having another talented dev bring features and ideas to us. Speaking of which: # Location Sharing (Big shout out to @tsubasahane for bringing this feature) - Are you TIRED of scrambling to find the address of the venue you're in to share with your friends? We are introducing Location Sharing! An optional feature where you can share your location with direct pairs temporarily [30 minutes, 1 hour, 3 hours] minutes or until you turn it off for them. That's up to you! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To share your location with a pair, click the three dots beside the pair and choose a duration to share with them. [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To view the location of someone who's shared with you, simply hover over the globe icon! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) [1] # Model Optimization (Mesh Decimating) - This new option can automatically “simplify” incoming character meshes to help performance by reducing triangle counts. You choose how strong the reduction is (default/recommended is 80%). [#131](<#131>) - Decimation only kicks in when a mesh is above a certain triangle threshold, and only for the items that qualify for it and you selected for. [#131](<#131>) - Hair meshes is always excluded, since simplifying hair meshes is very prone to breaking. - You can find everything under Settings → Performance → Model Optimization. [#131](<#131>) + ** IF YOU HAVE USED DECIMATION IN TESTING, PLEASE CLEAR YOUR CACHE ❗ ** [2] # Animation (PAP) Validation (Safer animations) - Lightless now checks your currently animations to see if they work with your local skeleton/bone mod. If an animation matches, it’s included in what gets sent to other players. If it doesn’t, Lightless will skip it and write a warning to your log showing how many were skipped due to skeleton changes. Its defaulted to Unsafe (off). turn it on if you experience crashes from others users. [#131](<#131>) - Lightless also does the same kind of check for incoming animation files, to make sure they match the body/skeleton they were sent with. [#131](<#131>) - Because these checks can sometimes be a little picky, you can adjust how strict they are in Settings -> General -> Animation & Bones to reduce false positives. [#131](<#131>) # UI Changes (Thanks to @kyuwu for UI Changes) - The top part of the main screen has gotten a makeover. You can adjust the colors of the gradiant in the Color settings of Lightless. [#127](<#127>) [3] - Settings have gotten some changes as well to make this change more universal, and will use the same color settings. [#127](<#127>) - The particle effects of the gradient are toggleable in 'Settings -> UI -> Behavior' [#127](<#127>) - Instead of showing download/upload on bottom of Main UI, it will show VRAM usage and triangles with their optimization options next to it [#138](<#138>) # LightFinder / ShellFinder - UI Changes that follow our new design follow the color codes for the Gradient top as the main screen does. [#127](<#127>) [4] Co-authored-by: defnotken <itsdefnotken@gmail.com> Co-authored-by: azyges <aaaaaa@aaa.aaa> Co-authored-by: cake <admin@cakeandbanana.nl> Co-authored-by: Tsubasa <tsubasa@noreply.git.lightless-sync.org> Co-authored-by: choco <choco@patat.nl> Co-authored-by: celine <aaa@aaa.aaa> Co-authored-by: celine <celine@noreply.git.lightless-sync.org> Co-authored-by: Tsubasahane <wozaiha@gmail.com> Co-authored-by: cake <cake@noreply.git.lightless-sync.org> Reviewed-on: #123
157 lines
7.7 KiB
C#
157 lines
7.7 KiB
C#
namespace LightlessSync.LightlessConfiguration.Configurations;
|
|
|
|
public static class ModelDecimationDefaults
|
|
{
|
|
public const bool EnableAutoDecimation = false;
|
|
public const int TriangleThreshold = 15_000;
|
|
public const double TargetRatio = 0.8;
|
|
public const bool NormalizeTangents = true;
|
|
public const bool AvoidBodyIntersection = true;
|
|
|
|
/// <summary>Default triangle threshold for batch decimation (0 = no threshold).</summary>
|
|
public const int BatchTriangleThreshold = 0;
|
|
|
|
/// <summary>Default target triangle ratio for batch decimation.</summary>
|
|
public const double BatchTargetRatio = 0.8;
|
|
|
|
/// <summary>Default tangent normalization toggle for batch decimation.</summary>
|
|
public const bool BatchNormalizeTangents = true;
|
|
|
|
/// <summary>Default body collision guard toggle for batch decimation.</summary>
|
|
public const bool BatchAvoidBodyIntersection = true;
|
|
|
|
/// <summary>Default display for the batch decimation warning overlay.</summary>
|
|
public const bool ShowBatchDecimationWarning = true;
|
|
|
|
public const bool KeepOriginalModelFiles = true;
|
|
public const bool SkipPreferredPairs = true;
|
|
public const bool AllowBody = false;
|
|
public const bool AllowFaceHead = false;
|
|
public const bool AllowTail = false;
|
|
public const bool AllowClothing = true;
|
|
public const bool AllowAccessories = true;
|
|
}
|
|
|
|
public sealed class ModelDecimationAdvancedSettings
|
|
{
|
|
/// <summary>Minimum triangles per connected component before skipping decimation.</summary>
|
|
public const int DefaultMinComponentTriangles = 6;
|
|
|
|
/// <summary>Average-edge multiplier used to cap collapses.</summary>
|
|
public const float DefaultMaxCollapseEdgeLengthFactor = 1.25f;
|
|
|
|
/// <summary>Maximum normal deviation (degrees) allowed for a collapse.</summary>
|
|
public const float DefaultNormalSimilarityThresholdDegrees = 60f;
|
|
|
|
/// <summary>Minimum bone-weight overlap required to allow a collapse.</summary>
|
|
public const float DefaultBoneWeightSimilarityThreshold = 0.85f;
|
|
|
|
/// <summary>UV similarity threshold to protect seams.</summary>
|
|
public const float DefaultUvSimilarityThreshold = 0.02f;
|
|
|
|
/// <summary>UV seam cosine threshold for blocking seam collapses.</summary>
|
|
public const float DefaultUvSeamAngleCos = 0.99f;
|
|
|
|
/// <summary>Whether to block UV seam vertices from collapsing.</summary>
|
|
public const bool DefaultBlockUvSeamVertices = true;
|
|
|
|
/// <summary>Whether to allow collapses on boundary edges.</summary>
|
|
public const bool DefaultAllowBoundaryCollapses = false;
|
|
|
|
/// <summary>Body collision distance factor for the primary pass.</summary>
|
|
public const float DefaultBodyCollisionDistanceFactor = 0.75f;
|
|
|
|
/// <summary>Body collision distance factor for the relaxed fallback pass.</summary>
|
|
public const float DefaultBodyCollisionNoOpDistanceFactor = 0.25f;
|
|
|
|
/// <summary>Relax multiplier applied when the mesh is close to the body.</summary>
|
|
public const float DefaultBodyCollisionAdaptiveRelaxFactor = 1.0f;
|
|
|
|
/// <summary>Ratio of near-body vertices required to trigger relaxation.</summary>
|
|
public const float DefaultBodyCollisionAdaptiveNearRatio = 0.4f;
|
|
|
|
/// <summary>UV threshold for relaxed body-collision mode.</summary>
|
|
public const float DefaultBodyCollisionAdaptiveUvThreshold = 0.08f;
|
|
|
|
/// <summary>UV seam cosine threshold for relaxed body-collision mode.</summary>
|
|
public const float DefaultBodyCollisionNoOpUvSeamAngleCos = 0.98f;
|
|
|
|
/// <summary>Expansion factor for protected vertices near the body.</summary>
|
|
public const float DefaultBodyCollisionProtectionFactor = 1.5f;
|
|
|
|
/// <summary>Minimum ratio used when decimating the body proxy.</summary>
|
|
public const float DefaultBodyProxyTargetRatioMin = 0.85f;
|
|
|
|
/// <summary>Inflation applied to body collision distances.</summary>
|
|
public const float DefaultBodyCollisionProxyInflate = 0.0005f;
|
|
|
|
/// <summary>Body collision penetration factor used during collapse checks.</summary>
|
|
public const float DefaultBodyCollisionPenetrationFactor = 0.75f;
|
|
|
|
/// <summary>Minimum body collision distance threshold.</summary>
|
|
public const float DefaultMinBodyCollisionDistance = 0.0001f;
|
|
|
|
/// <summary>Minimum cell size for body collision spatial hashing.</summary>
|
|
public const float DefaultMinBodyCollisionCellSize = 0.0001f;
|
|
|
|
/// <summary>Minimum triangles per connected component before skipping decimation.</summary>
|
|
public int MinComponentTriangles { get; set; } = DefaultMinComponentTriangles;
|
|
|
|
/// <summary>Average-edge multiplier used to cap collapses.</summary>
|
|
public float MaxCollapseEdgeLengthFactor { get; set; } = DefaultMaxCollapseEdgeLengthFactor;
|
|
|
|
/// <summary>Maximum normal deviation (degrees) allowed for a collapse.</summary>
|
|
public float NormalSimilarityThresholdDegrees { get; set; } = DefaultNormalSimilarityThresholdDegrees;
|
|
|
|
/// <summary>Minimum bone-weight overlap required to allow a collapse.</summary>
|
|
public float BoneWeightSimilarityThreshold { get; set; } = DefaultBoneWeightSimilarityThreshold;
|
|
|
|
/// <summary>UV similarity threshold to protect seams.</summary>
|
|
public float UvSimilarityThreshold { get; set; } = DefaultUvSimilarityThreshold;
|
|
|
|
/// <summary>UV seam cosine threshold for blocking seam collapses.</summary>
|
|
public float UvSeamAngleCos { get; set; } = DefaultUvSeamAngleCos;
|
|
|
|
/// <summary>Whether to block UV seam vertices from collapsing.</summary>
|
|
public bool BlockUvSeamVertices { get; set; } = DefaultBlockUvSeamVertices;
|
|
|
|
/// <summary>Whether to allow collapses on boundary edges.</summary>
|
|
public bool AllowBoundaryCollapses { get; set; } = DefaultAllowBoundaryCollapses;
|
|
|
|
/// <summary>Body collision distance factor for the primary pass.</summary>
|
|
public float BodyCollisionDistanceFactor { get; set; } = DefaultBodyCollisionDistanceFactor;
|
|
|
|
/// <summary>Body collision distance factor for the relaxed fallback pass.</summary>
|
|
public float BodyCollisionNoOpDistanceFactor { get; set; } = DefaultBodyCollisionNoOpDistanceFactor;
|
|
|
|
/// <summary>Relax multiplier applied when the mesh is close to the body.</summary>
|
|
public float BodyCollisionAdaptiveRelaxFactor { get; set; } = DefaultBodyCollisionAdaptiveRelaxFactor;
|
|
|
|
/// <summary>Ratio of near-body vertices required to trigger relaxation.</summary>
|
|
public float BodyCollisionAdaptiveNearRatio { get; set; } = DefaultBodyCollisionAdaptiveNearRatio;
|
|
|
|
/// <summary>UV threshold for relaxed body-collision mode.</summary>
|
|
public float BodyCollisionAdaptiveUvThreshold { get; set; } = DefaultBodyCollisionAdaptiveUvThreshold;
|
|
|
|
/// <summary>UV seam cosine threshold for relaxed body-collision mode.</summary>
|
|
public float BodyCollisionNoOpUvSeamAngleCos { get; set; } = DefaultBodyCollisionNoOpUvSeamAngleCos;
|
|
|
|
/// <summary>Expansion factor for protected vertices near the body.</summary>
|
|
public float BodyCollisionProtectionFactor { get; set; } = DefaultBodyCollisionProtectionFactor;
|
|
|
|
/// <summary>Minimum ratio used when decimating the body proxy.</summary>
|
|
public float BodyProxyTargetRatioMin { get; set; } = DefaultBodyProxyTargetRatioMin;
|
|
|
|
/// <summary>Inflation applied to body collision distances.</summary>
|
|
public float BodyCollisionProxyInflate { get; set; } = DefaultBodyCollisionProxyInflate;
|
|
|
|
/// <summary>Body collision penetration factor used during collapse checks.</summary>
|
|
public float BodyCollisionPenetrationFactor { get; set; } = DefaultBodyCollisionPenetrationFactor;
|
|
|
|
/// <summary>Minimum body collision distance threshold.</summary>
|
|
public float MinBodyCollisionDistance { get; set; } = DefaultMinBodyCollisionDistance;
|
|
|
|
/// <summary>Minimum cell size for body collision spatial hashing.</summary>
|
|
public float MinBodyCollisionCellSize { get; set; } = DefaultMinBodyCollisionCellSize;
|
|
}
|