|
What is the correct way to change the simplification options in code?? does anyone have any examples they could share that would be much appreciated. |
Answered by
Whinarn
Aug 20, 2021
Replies: 1 comment 2 replies
|
The SimplificationOptions is a struct that can be changed through the You can create the struct very easily, with your desired properties like this: var simplificationOptions = new SimplificationOptions
{
PreserveBorderEdges = false,
PreserveUVSeamEdges = false,
PreserveUVFoldoverEdges = false,
PreserveSurfaceCurvature = false,
EnableSmartLink = true,
VertexLinkDistance = double.Epsilon,
MaxIterationCount = 100,
Agressiveness = 7.0,
ManualUVComponentCount = false,
UVComponentCount = 2
};
var meshSimplifier = new MeshSimplifier();
meshSimplifier.SimplificationOptions = simplificationOptions;
meshSimplifier.Initialize(mesh);
meshSimplifier.SimplifyMesh(quality);Or you can start with the default options and make modifications: var simplificationOptions = SimplificationOptions.Default;
simplificationOptions.EnableSmartLink = false;Is this what you had in mind? Please see the very fresh documentation on the wiki as well, which could hopefully clear up a few things. |
2 replies
Answer selected by
Whinarn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The SimplificationOptions is a struct that can be changed through the
SimplificationOptionsproperty of theMeshSimplifierclass (see list of properties here). Or you can use them as an input for the LOD Generator API.You can create the struct very easily, with your desired properties like this: