【问题标题】:How to load 3D model from a 3ds file using AssimpNet in C# (SharpDX)?如何在 C# (SharpDX) 中使用 AssimpNet 从 3ds 文件加载 3D 模型?
【发布时间】:2017-03-09 17:53:39
【问题描述】:

我想使用 SharpDX 在 C# 中加载和显示 3ds 文件。为了加载 3ds 文件,我找到了一个工具“Assimp”并获得了 C# AssimpNet 的包装器。

如何使用 AssimpNet 加载 3ds? 我在 assimpnet 中没有看到任何可用的导入器。

【问题讨论】:

  • 你可以使用一把函数来检查扩展是否支持IsExtensionSupported(source)。如果支持的话,也许你应该学习一下 Assimp 是如何加载 *.3ds 文件的,然后在 AssimpNet 中实现。

标签: c# sharpdx assimp 3d-model 3ds


【解决方案1】:
Assimp.Scene model;
Assimp.AssimpContext importer = new Assimp.AssimpContext();
importer.SetConfig(new Assimp.Configs.NormalSmoothingAngleConfig(66.0f));
model = importer.ImportFile(filename, Assimp.PostProcessPreset.TargetRealTimeMaximumQuality);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-25
    • 1970-01-01
    • 1970-01-01
    • 2018-07-10
    • 2010-12-16
    • 2017-02-02
    • 2017-01-28
    • 2013-09-27
    相关资源
    最近更新 更多