Browse our Products

Aspose.3D for Java 23.4 Release Notes

Improvements and Changes

KeySummaryCategory
THREEDNET-1359Exporting to OBJ - Image/texture files not copied to OBJ directoryTask
THREEDNET-1361Decouple the dependency of System.DrawingTask
THREEDNET-1360Allow export PBR material definition and normal mapping in OBJ exporterImprovement
THREEDNET-1357Missing material and texture when loading obj fileBug fixing
THREEDNET-1358When importing an obj file, ControlPoints encountered an error reading data and read it as normal vector dataBug fixing

API changes

Since 23.4, System.Drawing is no longer needed in Aspose.3D for .NET, for consistent we’ll also make similar changes in Java version, types used from java.awt package are now replaced by existing types which provide similar features:

Old TypeNew Type
java.awt.Dimensioncom.aspose.threed.Vector2
java.awt.Pointcom.aspose.threed.Vector2
java.awt.Colorcom.aspose.threed.Vector3
java.awt.Rectanglecom.aspose.threed.Rect
java.awt.image.BufferedImagecom.aspose.threed.TextureData

Added members to class com.aspose.threed.SaveOptions:

    /**
     * Try to copy textures used in scene to output directory.
     */
    public boolean getExportTextures()
    
    /**
     * Try to copy textures used in scene to output directory.
     * @param value New value
     */
    public void setExportTextures(boolean value)

Sample code

Export the scene into obj file and export the texture files:

Removed class com.aspose.threed.RenderingAPI

Removed class com.aspose.threed.ShadingLanguage

These were obsoleted for months and removed by schedule.

Added class com.aspose.threed.ITextureCodec

Added class com.aspose.threed.ITextureDecoder

Added class com.aspose.threed.ITextureEncoder

Added class com.aspose.threed.TextureCodec

In Aspose.3D 23.4, we’ve removed dependency of System.Drawing, so texture decoding will be done in external codec, we provide sample codes to integrate Aspose.3D with external image encoders/decoders, in most cases texture codec is not needed.

Added class com.aspose.threed.PixelMapMode

Added class com.aspose.threed.PixelMapping

Added members to class com.aspose.threed.TextureData:

    /**
     * Map all pixels for read/write
     * @param mapMode Map mode
     */
    public PixelMapping mapPixels(PixelMapMode mapMode)

    /**
     * Map all pixels for read/write in given pixel format
     * @param mapMode Map mode
     * @param format Pixel format
     */
    public PixelMapping mapPixels(PixelMapMode mapMode, PixelFormat format)
    
    /**
     * Map pixels addressed by rect for reading/writing in given pixel format
     * @param rect The area of pixels to be accessed
     * @param mapMode Map mode
     * @param format Pixel format
     * @return Returns a mapping object, it should be disposed when no longer needed.
     */
    public PixelMapping mapPixels(Rect rect, PixelMapMode mapMode, PixelFormat format)

Sample code

Map the pixels from TextureData for reading or writing, external texture codec can use these to encode or decode image.

Added members to class com.aspose.threed.TextureData:

    /**
     * Transform pixel's layout to new pixel format.
     * @param pixelFormat Destination pixel format
     * @throws UnsupportedOperationException When the source or destination pixel format is not supported
     */
    public void transformPixelFormat(PixelFormat pixelFormat)

Sample code

Transform internal pixel format in TextureData to specified format:

Removed members from class com.aspose.threed.TextureData:

        public static com.aspose.threed.TextureData fromBitmap(java.awt.image.BufferedImage bitmap);
        public java.awt.image.Buffered toBitmap();