Aspose.3D 17.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aspose.3D --version 17.9.0
NuGet\Install-Package Aspose.3D -Version 17.9.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.3D" Version="17.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspose.3D --version 17.9.0
#r "nuget: Aspose.3D, 17.9.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aspose.3D as a Cake Addin
#addin nuget:?package=Aspose.3D&version=17.9.0

// Install Aspose.3D as a Cake Tool
#tool nuget:?package=Aspose.3D&version=17.9.0

Aspose.3D is a class library for working with 3D files. It allows developers to create/manipulate/render 3D scene and work with FBX,STL,OBJ,3DS,U3D,DAE,PDF,DRC,GLTF files. It allows you to open files and manipulate the elements in the 3D scene, from line,mesh,nurbs curve, to more complex elements animation, and then export to FBX ASCII, FBX binary, STL ASCII, STL binary, Collada, Wavefront .obj, 3DS, PDF formats, glTF, glTF2, Google Draco.

Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Aspose.3D:

Package Downloads
Aspose.Total

Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications.

Aspose.3D.Codec.SkiaSharp

This plugin allows you to use SkiaSharp's image codec to encode and decode textures.

nilnul.geometry._stereo_._LIB_

cubic/3dimension geometry

Pilz.Simple3DFileParser

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.3.0 1,494 3/26/2024
24.2.0 1,611 2/28/2024
24.1.0 2,294 1/30/2024
23.12.0 4,174 12/28/2023
23.11.1 1,202 12/8/2023
23.11.0 4,232 11/29/2023
23.10.0 4,223 10/30/2023
23.9.0 5,669 9/27/2023
23.8.0 7,693 8/25/2023
23.7.0 7,106 7/26/2023
23.6.0 6,917 6/26/2023
23.5.0 5,348 5/26/2023
23.4.0 7,110 4/13/2023
23.3.0 6,959 3/16/2023
23.2.0 6,536 2/14/2023
23.1.0 10,678 1/18/2023
22.12.0 9,740 12/21/2022
22.11.0 9,852 11/17/2022
22.10.0 11,070 10/14/2022
22.9.0 7,371 9/9/2022
22.8.0 19,967 8/3/2022
22.7.0 7,135 7/8/2022
22.6.0 10,899 6/10/2022
22.5.0 11,862 5/9/2022
22.4.0 6,980 4/13/2022
22.3.0 15,012 3/4/2022
22.2.0 8,635 2/7/2022
22.1.0 9,671 1/5/2022
21.12.0 2,591 12/3/2021
21.11.0 8,549 11/11/2021
21.10.0 6,825 10/9/2021
21.9.0 12,724 9/6/2021
21.8.0 14,788 8/6/2021
21.7.0 11,499 7/5/2021
21.6.0 4,409 6/7/2021
21.5.0 9,359 5/6/2021
21.4.0 10,680 4/2/2021
21.3.0 7,624 3/4/2021
21.2.1 10,483 2/14/2021
21.2.0 1,787 2/7/2021
21.1.0 3,538 1/8/2021
20.12.2 3,737 12/10/2020
20.12.0 1,704 12/5/2020
20.11.0 7,915 11/3/2020
20.9.0 4,066 9/4/2020
20.8.0 3,229 8/11/2020
20.7.0 3,197 7/3/2020
20.6.1 2,594 6/16/2020
20.6.0 3,316 6/8/2020
20.5.0 10,240 5/12/2020
20.4.0 4,711 4/9/2020
20.3.0 4,180 3/3/2020
20.2.1 3,374 2/14/2020
20.2.0 2,053 2/10/2020
20.1.0 4,915 1/2/2020
19.12.2 3,519 12/10/2019
19.12.0 1,716 12/9/2019
19.11.0 2,274 11/5/2019
19.10.0 36,171 10/9/2019
19.9.0 2,357 9/9/2019
19.8.0 2,200 8/2/2019
19.7.0 2,344 7/8/2019
19.6.0 2,572 6/5/2019
19.5.0 2,610 5/12/2019
19.4.0 2,165 4/4/2019
19.3.0 2,180 3/8/2019
19.2.0 2,869 2/2/2019
19.1.0 2,057 1/9/2019
18.12.0 2,279 12/6/2018
18.11.0 2,327 11/6/2018
18.10.0 2,160 10/9/2018
18.9.0 2,608 9/6/2018
18.8.0 2,195 8/8/2018
18.7.0 2,588 7/11/2018
18.6.0 3,216 6/11/2018
18.5.0 2,623 5/10/2018
18.4.0 2,495 4/16/2018
18.3.0 2,303 3/14/2018
18.2.0 2,379 2/8/2018
18.1.0 2,545 1/8/2018
17.12.0 2,314 12/8/2017
17.11.0 2,755 11/6/2017
17.10.0 2,257 10/10/2017
17.9.0 2,294 9/7/2017
17.8.0 2,231 8/8/2017
17.7.0 2,326 7/17/2017
17.6.0 2,929 6/5/2017
17.5.0 2,518 5/8/2017
17.4.0 2,424 4/5/2017
17.3.0 2,285 3/6/2017
17.2.0 2,316 2/15/2017
17.1.0 2,359 1/5/2017
16.12.0 2,582 12/4/2016
16.11.0 2,460 11/1/2016
16.9.0 2,313 9/29/2016
2.1.0 2,351 8/30/2016
2.0.0 2,472 8/2/2016
1.7.0 2,310 6/29/2016
1.6.1 2,641 5/26/2016
1.5.0 2,408 4/27/2016
1.4.0 2,406 4/1/2016
1.3.0 2,436 2/23/2016
1.2.0 2,453 12/18/2015
1.1.0 2,609 11/27/2015
1.0.0 2,489 10/26/2015

This page contains release notes for Aspose.3D for .NET 17.9.

                   
   
Other Improvements and Changes
Key Summary Category

THREEDNET-286 Add support to uniquely identify Meshes from FBX
New feature


THREEDNET-288 Add support to render scene in fully customized shaders New feature

THREEDNET-284 Improve the memory consumption when writing a large FBX file Enhancement

THREEDNET-293 Incorrect export OBJ with texture to GLTF and GLB Bug

THREEDNET-290 Animate properties rotation (euler) and scale for FBX format Bug

     

Public API and Backwards Incompatible Changes
See the list of any changes made to the public API such as added, renamed, removed or deprecated members as well as any non-backward compatible change made to Aspose.3D for .NET. If you have concerns about any change listed, please raise it on the Aspose.3D support forum.
Adds CreateAnimationClip member to Aspose.ThreeD.Scene class

It helps in creating animations.
Definition C#

/// <summary>
/// A shorthand function to create and register the <see cref="AnimationClip"/>
/// The first <see cref="AnimationClip"/> will be assigned to the <see cref="CurrentAnimationClip"/>
/// </summary>
/// <param name="name">Animation clip&#39;s name</param>
/// <returns></returns>
public Aspose.ThreeD.Animation.AnimationClip CreateAnimationClip(string name)


This is a shorthand function to create the animation clip, before this function was made, to create an animation clip you have to:
Legacy approach C#

AnimationClip anim = new AnimationClip("anim");
scene.AnimationClips.Add(anim);
//set this as current clip
scene.CurrentAnimationClip = anim;


The equivalent code is:
New approach C#

//create an animation clip
AnimationClip anim = scene.CreateAnimationClip("anim");


The CreateAnimationClip method will make an AnimationClip in a scene.

Adds CreateAnimationNode member to Aspose.ThreeD.Animation.AnimationClip class

It helps in creating animation node.
Definition C#

/// <summary>
/// A shorthand function to create and register the animation node on current clip.
/// </summary>
/// <param name="nodeName">New animation node&#39;s name</param>
/// <returns></returns>
public Aspose.ThreeD.Animation.AnimationNode CreateAnimationNode(string nodeName)


This is a shorthand function to create and register the AnimationNode, before this function you need to write:
Legacy approach C#

var anode = new AnimationNode("animRot");
anim.Animations.Add(anode);


The equivalent code is:
New approach C#

var anode = anim.CreateAnimationNode("animRot");


Adds three members to Aspose.ThreeD.Animation.Curve class

All these members help in creating key frames.
Definition C#

/// <summary>
/// Create a new key frame with specified value
/// A synonym of <see cref="CreateKeyFrame(double, float)"/>
/// </summary>
/// <param name="time">Time position(measured in seconds)</param>
/// <param name="value">The value at this time position</param>
public void Add(double time, float value)

/// <summary>
/// Create a new key frame with specified value
/// A synonym of <see cref="CreateKeyFrame(double, float, Interpolation)"/>
/// </summary>
/// <param name="time">Time position(measured in seconds)</param>
/// <param name="value">The value at this time position</param>
/// <param name="interpolation">The interpolation type of this key frame</param>
public void Add(double time, float value, Aspose.ThreeD.Animation.Interpolation interpolation)

/// <summary>
/// Gets the enumerator to traverse all key frames.
/// </summary>
/// <returns></returns>
public System.Collections.Generic.IEnumerator<Aspose.ThreeD.Animation.KeyFrame> GetEnumerator()


The Add methods is the synonym of CreateKeyFrame, the CreateKeyFrame methods are all marked as obsoleted, and class Curve now implements the IEnumerable<KeyFrame>(so you can see a GetEnumerator is added), so you can make use of c#'s initializer syntax(Ref https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/object-and-collection-initializers) to simplify the creation of curve.


 
Adds BindCurve member to Aspose.ThreeD.Animation.CurveMapping class
 


This will bind the curve data on an existing channel in CurveMapping.
Definition C#

/// <summary>
/// Bind the curve to specified channel
/// </summary>
/// <param name="channelName">Which channel the curve will be bound to</param>
/// <param name="curve">The curve data</param>
public void BindCurve(string channelName, Aspose.ThreeD.Animation.Curve curve)


Before the version 17.9 to create animation manually you need to:
C#

//create a curve mapping on cube node&#39;s transform object, the curve manipulates the property &#39;Scale&#39;
var scale = anode.CreateCurveMapping(cube1.Transform, "Scale");

// Create the animation curve on Y component of the scale
Curve scaleYCurve = scale.CreateCurve("Y");

//let cube1.Transform.Scale.Y to be 1.0f at 0th sec using bezier interpolation
scaleYCurve.CreateKeyFrame(0, 1.0f, Interpolation.Bezier);

//let cube1.Transform.Scale.Y to be 2.0f at 2th sec using bezier interpolation
scaleYCurve.CreateKeyFrame(2, 2.0f, Interpolation.Bezier);

//let cube1.Transform.Scale.Y to be 0.2f at 5th sec using linear interpolation
scaleYCurve.CreateKeyFrame(5, 0.2f, Interpolation.Linear);

//let cube1.Transform.Scale.Y to be 1.0f at 8th sec using bezier interpolation
scaleYCurve.CreateKeyFrame(8, 1.0f, Interpolation.Bezier);


Now in version 17.9 you can implement the same task using the syntax sugar:
C#

//create a curve mapping on cube node&#39;s transform object, the curve manipulates the property &#39;Scale&#39;
var scale = anode.CreateCurveMapping(cube1.Transform, "Scale");
// Create the animation curve on Y component of the scale
scale.BindCurve("Y", new Curve()
{
   //let cube1.Transform.Scale.Y to be 1.0f at 0th sec using bezier interpolation
   {0, 1.0f, Interpolation.Bezier},
   //let cube1.Transform.Scale.Y to be 2.0f at 2th sec using bezier interpolation
   {2, 2.0f, Interpolation.Bezier},
   //let cube1.Transform.Scale.Y to be 0.2f at 5th sec using linear interpolation
   {5, 0.2f, Interpolation.Linear},
   //let cube1.Transform.Scale.Y to be 1.0f at 8th sec using bezier interpolation
   {8, 1.0f, Interpolation.Bezier}
});


 

Add ShaderSet and PresetShaders members to Aspose.ThreeD.Render.Renderer class

ShaderSet allows you to override the default implementation of Aspose.3D's renderer, if you assigned a customized ShaderSet instance, the property PresetShadersbecomes PresetShaders.Customized, if you want to revert back to Aspose.3D's default shader set, you can assign PresetShaders.Default to invalidate the property ShaderSet, by using this mechanism, we can allow user to control the render effects while we can still provide our own implementation with enough extensibility.
Definition C#

/// <summary>
/// Gets or sets the shader set that used to render the scene
/// </summary>
Aspose.ThreeD.Render.ShaderSet ShaderSet{ get;set;}
/// <summary>
/// Gets or sets the preset shader set
/// </summary>
Aspose.ThreeD.Render.PresetShaders PresetShaders{ get;set;}


Adds Aspose.ThreeD.Render.PresetShaders class

Right now only the Default is available, other render styles like non-realistic shaders can be provided in the future.
Definition C#

/// <summary>
/// This defines the preset internal shaders used by the renderer.
/// </summary>
public enum PresetShaders
{
   /// <summary>
   /// Use the default shaders for phong/lambert/pbr materials
   /// </summary>
   Default,
   /// <summary>
   /// User&#39;s customized shader set
   /// </summary>
   Customized
}



 
Adds Aspose.ThreeD.Render.ShaderSet class

It helps in customizing the ShaderProgram used by each different materials to fully take control of the final render result.
Definition C#

/// <summary>
/// Shader programs for each kind of materials
/// </summary>
public class ShaderSet : IDisposable
{
   /// <summary>
   /// Gets or sets the shader that used to render the lambert material
   /// </summary>
   public ShaderProgram Lambert { get; set; }
   /// <summary>
   /// Gets or sets the shader that used to render the phong material
   /// </summary>
   public ShaderProgram Phong { get; set; }
   /// <summary>
   /// Gets or sets the shader that used to render the PBR material
   /// </summary>
   public ShaderProgram Pbr { get; set; }
   /// <summary>
   /// Gets or sets the fallback shader when required shader is unavailable
   /// </summary>
   public ShaderProgram Fallback { get; set; }
}


Renders the scene in Panaroma mode with customized shaders with linearize depth instead of colors.

It helps in customizing the ShaderProgram used by each different material to fully take control of the final render result.
Definition C#

public void RenderPanaromaInDepth()
{
   string path = TestData + @"/textures/skybox2/skybox.obj";
   //load the scene
   Scene scene = new Scene(path);
   //create a camera for capturing the cube map
   Camera cam = new Camera(ProjectionType.Perspective);
   cam.NearPlane = 0.1;
   cam.FarPlane = 200;
   scene.RootNode.CreateChildNode(cam).Transform.Translation = new Vector3(5, 6, 0);
   cam.RotationMode = RotationMode.FixedDirection;

   //create two lights to illuminate the scene
   scene.RootNode.CreateChildNode(new Light() {LightType = LightType.Point}).Transform.Translation = new Vector3(-10, 7, -10);
   scene.RootNode.CreateChildNode(new Light()
   {
       LightType = LightType.Point,
       ConstantAttenuation = 0.1,
       Color = new Vector3(Color.CadetBlue)
       }).Transform.Translation = new Vector3(49, 0, 49);

       //create a render target
       using (var renderer = Renderer.CreateRenderer())
       {
           //Create a cube map render target with depth texture, depth is required when rendering a scene.
           IRenderTexture rt = renderer.RenderFactory.CreateCubeRenderTexture(new RenderParameters(false), 512, 512);
           //create a 2D texture render target with no depth texture used for image processing
           IRenderTexture final = renderer.RenderFactory.CreateRenderTexture(new RenderParameters(false, 32, 0, 0), 1024 * 3 , 1024);

           //a viewport is required on the render target
           rt.CreateViewport(cam, RelativeRectangle.FromScale(0, 0, 1, 1));
           renderer.ShaderSet = CreateDepthShader(renderer);
           renderer.Render(rt);

           //execute the equirectangular projection post-processing with the previous rendered cube map as input
           PostProcessing equirectangular = renderer.GetPostProcessing("equirectangular");
           equirectangular.Input = rt.Targets[0];
           renderer.Execute(equirectangular, final);
           //save the texture into disk
           ((ITexture2D)final.Targets[0]).Save(RenderResult + "/depth-equirectangular.png", ImageFormat.Png);
       }
   }

private static ShaderSet CreateDepthShader(Renderer renderer)
{
   GLSLSource src = new GLSLSource();
   src.VertexShader = @"#version 330 core
   layout (location = 0) in vec3 position;
   uniform mat4 matWorldViewProj;
   out float depth;
   void main()
   {
       gl_Position = matWorldViewProj * vec4(position, 1.0f);
       float zfar = 200.0;
       float znear = 0.5;
       //visualize the depth by linearize it so we don&#39;t get a blank screen
       depth = (2.0 * znear) / (zfar + znear - gl_Position.z /gl_Position.w  * (zfar - znear));
   }";
   src.FragmentShader = @"#version 330 core
   in float depth;
   out vec4 color;
   void main()
   {
       color = vec4(depth, depth, depth, 1);
   }";
   //we only need the position to render the depth map
   VertexDeclaration fd = new VertexDeclaration();
   fd.AddField(VertexFieldDataType.FVector3, VertexFieldSemantic.Position);
   //compile shader from GLSL source code and specify the vertex input format
   var shader = renderer.RenderFactory.CreateShaderProgram(src, fd);
   //connect GLSL uniform to renderer&#39;s internal variable
   shader.Variables = new ShaderVariable[]
   {
       new ShaderVariable("matWorldViewProj", VariableSemantic.MatrixWorldViewProj)
   };
   //create a shader set
   ShaderSet ret = new ShaderSet();
   //we only use the fallback, and left other shaders unassigned, so all materials will be rendered by this shader
   ret.Fallback = shader;
   return ret;
}



Usage Examples

Please check the list of help topics added or updated in the Aspose.3D Wiki docs:

   
       

       
https://docs.aspose.com/display/3dnet/Aspose.3D+for+.NET+17.9+Release+Notes