Browse our Products

Aspose.3D for Java 21.2 Release Notes

Improvements and Changes

KeySummaryCategory
THREEDNET-825Add USDZ import support.New feature
THREEDNET-824Add texture support in USDZTask
THREEDNET-811Implement an evaluation version related Exception in the APIImprovement
THREEDNET-813Technical details are required on Material and Texture API limitations - API doesn’t provide a way to discover textures on materialsImprovement
THREEDNET-817Add support for texture byte[] in case of glb, gltf, objImprovement
THREEDAPP-80Improve the page loading speed of web rendererImprovement
THREEDNET-814Triangle indices are not correctBug fix
THREEDNET-809FBX Save Exception: Unsupported attribute typeBug fix
THREEDNET-810Filesize is getting bigger while reusing the same textureBug fix
THREEDNET-816Incorrect mesh while loading OBJBug fix
THREEDNET-807There is no texture in the exported FBXBug fix
THREEDNET-815Materials with shader model = Unknown will failed to render.Bug fix
THREEDNET-823Multiple mesh attached to same node is not rendering.Bug fix
THREEDNET-647Add scaling control UI in web renderer.Task
THREEDNET-646Add rotation control UI in web renderer.Task

API changes

Added class com.aspose.threed.TextureSlot

This exposed the internal texture slots in materials, in order to access all available texture slots from a material, use foreach statement:

        var mat = new PbrMaterial();
        for(var textureSlot : mat) {
            System.out.println(textureSlot.getSlotName());
            System.out.println(textureSlot.getTexture());
        }

Added class com.aspose.threed.TrialException

From 21.2, when the unlicensed usage reached the license restriction, a TrialException will be thrown to notify the license restriction, and how to apply for a temporary license.

You can simply ignore this by surround try/catch block on the Save/Open operation, or turn this exception off by:

        TrialException.setSuppressTrialException(true);

Turn this message off will not lift the restrictions(Like extra nodes are ignored by exporter/importer).

In order to get all full feature, please request a temporary license or buy a full feature license.

Added methods to com.aspose.threed.TriMesh

    /**
     * Read the vector4 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector4/FVector4 data type
     */
    public Vector4 readVector4(int idx, VertexField field);
  
    /**
     * Read the vector4 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector4/FVector4 data type
     */
    public FVector4 readFVector4(int idx, VertexField field);
  
      /**
     * Read the vector3 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector3/FVector3 data type
     */
    public Vector3 readVector3(int idx, VertexField field);
    
    /**
     * Read the vector3 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector3/FVector3 data type
     */
    public FVector3 readFVector3(int idx, VertexField field);

  
    /**
     * Read the vector2 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector2/FVector2 data type
     */
    public Vector2 readVector2(int idx, VertexField field);
    
    /**
     * Read the vector2 field
     * @param idx The index of vertex to read
     * @param field The field with a Vector2/FVector2 data type
     */
    public FVector2 readFVector2(int idx, VertexField field);

  
    /**
     * Read the double field
     * @param idx The index of vertex to read
     * @param field The field with a float/double compatible data type
     */
    public double readDouble(int idx, VertexField field);
    
    /**
     * Read the float field
     * @param idx The index of vertex to read
     * @param field The field with a float/double compatible data type
     */
    public float readFloat(int idx, VertexField field);

These methods allow you to read vertex’s field without allocating extra memory, the traditional way of accessing vertex from TriMesh actually generates a lot of temporary object, these can provide fast and low-memory footprint access.

        Scene s = new Scene("test.STL");
        var mesh = (Mesh)s.getRootNode().getChild(0).getEntity();

        //Create a new VertexDeclaration, so the TriMesh we constructed later will use this memory layout.
        var vd = new VertexDeclaration();
        var pos = vd.addField(VertexFieldDataType.F_VECTOR3, VertexFieldSemantic.POSITION);
        var normal = vd.addField(VertexFieldDataType.F_VECTOR3, VertexFieldSemantic.NORMAL);
        //create a TriMesh instance from Mesh instance with manually specified vertex declaration
        var m = TriMesh.fromMesh(vd, mesh);
        for(int i = 0; i < m.getVerticesCount(); i++)
        {
            //access each field
            var v_pos = m.readFVector3(i, pos);
            var v_normal = m.readFVector3(i, normal);
            System.out.printf("(%s), (%s)\n", v_pos, v_normal);
        }

Added new file format in com.aspose.threed.FileFormat

    /**
     * Compressed Universal Scene Description
     */
    public static final FileFormat USDZ;

Aspose.3D 21.2 can load USDZ format now.

Fixed the inconsistent APIs:

These old classes are moved to package com.aspose.threed.deprecated, and new classes are introduced to replace them:

Old ClassNew Class
com.aspose.threed.A3DWSaveOptionscom.aspose.threed.A3dwSaveOptions
com.aspose.threed.AMFSaveOptionscom.aspose.threed.AmfSaveOptions
com.aspose.threed.Discreet3DSLoadOptionscom.aspose.threed.Discreet3dsLoadOptions
com.aspose.threed.Discreet3DSSaveOptionscom.aspose.threed.Discreet3dsSaveOptions
com.aspose.threed.FBXLoadOptionscom.aspose.threed.FbxLoadOptions
com.aspose.threed.FBXSaveOptionscom.aspose.threed.FbxSaveOptions
com.aspose.threed.GLTFLoadOptionscom.aspose.threed.GltfLoadOptions
com.aspose.threed.GLTFSaveOptionscom.aspose.threed.GltfSaveOptions
com.aspose.threed.HTML5SaveOptionscom.aspose.threed.Html5SaveOptions
com.aspose.threed.STLLoadOptionscom.aspose.threed.StlLoadOptions
com.aspose.threed.STLSaveOptionscom.aspose.threed.StlSaveOptions
com.aspose.threed.U3DLoadOptionscom.aspose.threed.U3dLoadOptions


 
 English