Browse our Products

Aspose.3D for .NET 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, types used from System.Drawing are now replaced by existing types which provide similar features:

Old TypeNew TypeDescription
System.Drawing.Imaging.ImageFormatSystem.StringUses image file extension name to represent image format, supported image formats are based on texture codec.
System.Drawing.SizeAspose.ThreeD.Utilities.Vector2
System.Drawing.PointAspose.ThreeD.Utilities.Vector2
System.Drawing.ColorAspose.ThreeD.Utilities.Vector3
System.Drawing.RectangleAspose.ThreeD.Utilities.Rect
System.Drawing.BitmapAspose.ThreeD.Render.TextureData

Added members to class Aspose.ThreeD.Formats.SaveOptions:

    /// <summary>
    /// Try to copy textures used in scene to output directory. 
    /// </summary>
    bool ExportTextures{ get;set;}

Sample code

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

Removed class Aspose.ThreeD.Shading.RenderingAPI

Removed class Aspose.ThreeD.Shading.ShadingLanguage

These were obsoleted for months and removed by schedule.

Added class Aspose.ThreeD.Render.ITextureCodec

Added class Aspose.ThreeD.Render.ITextureDecoder

Added class Aspose.ThreeD.Render.ITextureEncoder

Added class Aspose.ThreeD.Render.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 Aspose.ThreeD.Render.PixelMapMode

Added class Aspose.ThreeD.Render.PixelMapping

Added members to class Aspose.ThreeD.Render.TextureData:

        /// <summary>
        /// Map all pixels for read/write
        /// </summary>
        /// <param name="mapMode">Map mode</param>
        /// <returns>Returns a mapping object, it should be disposed when no longer needed.</returns>
        public Aspose.ThreeD.Render.PixelMapping MapPixels(Aspose.ThreeD.Render.PixelMapMode mapMode)

        /// <summary>
        /// Map all pixels for read/write in given pixel format
        /// </summary>
        /// <param name="mapMode">Map mode</param>
        /// <param name="format">Pixel format</param>
        /// <returns>Returns a mapping object, it should be disposed when no longer needed.</returns>
        public Aspose.ThreeD.Render.PixelMapping MapPixels(Aspose.ThreeD.Render.PixelMapMode mapMode, Aspose.ThreeD.Render.PixelFormat format)

        /// <summary>
        /// Map pixels addressed by rect for reading/writing in given pixel format
        /// </summary>
        /// <param name="rect">The area of pixels to be accessed</param>
        /// <param name="mapMode">Map mode</param>
        /// <param name="format">Pixel format</param>
        /// <returns>Returns a mapping object, it should be disposed when no longer needed.</returns>
        /// <exception cref="NotSupportedException"></exception>
        public Aspose.ThreeD.Render.PixelMapping MapPixels(Aspose.ThreeD.Utilities.Rect rect, Aspose.ThreeD.Render.PixelMapMode mapMode, Aspose.ThreeD.Render.PixelFormat format)

Sample code

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

This is a replacement for System.Drawing.Bitmap’s pixel operations.

Added members to class Aspose.ThreeD.Render.TextureData:

        /// <summary>
        /// Transform pixel's layout to new pixel format.
        /// </summary>
        /// <param name="pixelFormat">Destination pixel format</param>
        /// <exception cref="NotSupportedException">When the source or destination pixel format is not supported</exception>
        public void TransformPixelFormat(Aspose.ThreeD.Render.PixelFormat pixelFormat)

Sample code

Transform internal pixel format in TextureData to specified format:

Removed members from class Aspose.ThreeD.Render.TextureData:

        public static Aspose.ThreeD.Render.TextureData FromBitmap(System.Drawing.Bitmap bitmap)
        public System.Drawing.Bitmap ToBitmap()

When System.Drawing.Bitmap is no longer used in Aspose.ThreeD, these methods are no longer needed.