Aspose.3D for Java 21.5 Release Notes

Improvements and Changes

THREEDNET-878Draw black border around polygonsNew Feature
THREEDNET-879Convert STL to GLB results in invalid attribute: “/meshes/0/primitives/0/attributes/NORMAL_0”Bug fix
THREEDNET-885Aspose.3D renderer crashed due to large mesh loaded.Bug fix
THREEDNET-884Validation in converted GLB files.Improvement
THREEDNET-882Generated GLB file is not rendering in Babylon.jsBug fix
THREEDNET-887Convert image to jpg/png when user export glTF with embedded assetsNew Feature

API changes

Added new enum type com.aspose.threed.GltfEmbeddedImageFormat:

 * How glTF exporter will embed the textures during the exporting.
public enum GltfEmbeddedImageFormat
     * Do not convert the image and keep it as it is.
     * All non-supported images formats will be converted to jpeg if possible.
     * All non-supported images formats will be converted to png if possible.

Added new property in com.aspose.threed.GltfSaveOptions:

    public GltfEmbeddedImageFormat getImageFormat();
    public void setImageFormat(GltfEmbeddedImageFormat value);

Standard glTF only supports PNG/JPG as its texture format, this option will guide how Aspose.3D will convert the non-standard images to supported format during the exporting.

Default value is GltfEmbeddedImageFormat.PNG, then the embedded texture will be converted into png, usually you don’t need to manually modify this.

Added new property in com.aspose.threed.GltfSaveOptions:

    public void setFallbackNormal(Vector3 value);
    public Vector3 getFallbackNormal();

When GLTF2 exporter detected an invalid normal from the scene, this will be used instead of its original value to bypass the validation, this happens if the scene was imported from a file exported with incorrect data.

Default value is (0, 1, 0).

If assign this value with null, then the incorrect normal data will be outputed without any changes.