Aspose.3D for .NET 21.8 Release Notes

Improvements and Changes

THREEDNET-922Add blind watermark supportNew Feature
THREEDNET-920Save to GLB file with external draco encoder lost many information.Bug fix
THREEDNET-918Significant lock contention in parallelized Scene.Open with fbx filesImprovement
THREEDNET-924Vertex deduction was not always work in TriMeshBug fix
THREEDNET-923Opacity is not handled in FBX importerBug fix
THREEDNET-912FBX to GLTF2 Conversion issuesBug fix

API changes

Added Aspose.ThreeD.Utilities.Watermark

From 21.8 you can apply a blind watermark to a Mesh, and the watermark can exist even after its been exported into different formats.

    /// <summary>
    /// Utility to encode/decode blind watermark  to/from a mesh.
    /// </summary>
    public class Watermark
        /// <summary>
        /// Encode a text into mesh' blind watermark.
        /// </summary>
        /// <param name="input">Mesh to encode a blind watermark</param>
        /// <param name="text">Text to encode to the mesh</param>
        /// <param name="password">Password to protect the watermark, it's optional</param>
        /// <returns></returns>
        public static Mesh EncodeWatermark(Mesh input, string text, string password)

        /// <summary>
        /// Decode the watermark from a mesh
        /// </summary>
        /// <param name="input">The mesh to extract watermark</param>
        /// <param name="password">The password to decrypt the watermark</param>
        /// <exception cref="System.UnauthorizedAccessException">The mesh is protected by password, and provided password is incorrect.</exception>
        /// <returns></returns>
        public static string DecodeWatermark(Mesh input, string password)

Sample code to generate a mesh with watermark and save it to PLY file:

    //prepare a mesh for testing
    var mesh = new Torus().ToMesh();
    //encode the watermark to the mesh with password protected
    mesh = Watermark.EncodeWatermark(mesh, "Powered by Aspose.3D", "password");
    //save it to a file
    var scene = new Scene(mesh);
    scene.Save("watermark-mesh.ply", FileFormat.PLY);

Sample code to read the watermark from a mesh:

    //load a mesh instance from a ply file
    var scene = new Scene("watermark-mesh.ply");
    var mesh = scene.RootNode.ChildNodes[0].GetEntity<Mesh>();
    //read the watermark
    var watermark = Watermark.DecodeWatermark(mesh, "password");