Aspose.3D for Java 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 com.aspose.threed.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.

    * Utility to encode/decode blind watermark  to/from a mesh.
    public class Watermark
        * Encode a text into mesh' blind watermark.
        * @param input Mesh to encode a blind watermark
        * @param text Text to encode to the mesh
        * @param password Password to protect the watermark, it's optional
        public static Mesh encodeWatermark(Mesh input, String text, String password)
            throws IOException

        * Decode the watermark from a mesh
        * @param input The mesh to extract watermark
        * @param password The password to decrypt the watermark
        * @throws SecurityException The mesh is protected by password, and provided password is incorrect.
        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);"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 = (Mesh)scene.getRootNode().getChild(0).getEntity();
    //read the watermark
    var watermark = Watermark.decodeWatermark(mesh, "password");