-
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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
The SimplificationOptions is a struct that can be changed through the
SimplificationOptions
property of theMeshSimplifier
class (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: