如何减小 ViewPort3D xaml 的文件大小?
我有一个形状的 3D max 文件。我将其转换为 3ds 文件。然后通过Zam3D将其转换为xaml文件。但文件太大而无法加载,我的电脑因“内存输出”异常而崩溃。我可以做什么来减少 xaml 文件的大小?
I have a 3D max file for a shape. And i convert it to a 3ds file. Then convert it to a xaml file by Zam3D. But the file is too big to load, my computer is crashed by the exception "Output of Memory". What can i do to reduce the xaml file size?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的文件有多大?我正在处理大约 8 MB 的 3D 模型文件,并且非常详细。我成功导入的最大文件有 13.4 MB,29 MB 模型崩溃了,与您遇到的异常相同,但它设计得不好。
要将 3ds 转换为 xaml,我使用 Wpf-Graphics 的 Reader3ds。您可以避免将其转换两次的步骤(通过 zam3d)。 Reader3ds 甚至能够读取大文件,您可以轻松地使用这些元素。接下来我不高兴使用 zam3d,我希望 zam3d 向文件中添加比需要的更多信息。甚至我得到的几何图形也与以前不一样,并且添加了我没有使用的灯光。
为了减少 xaml,您还可以尝试使用 ResourceDictionary 将信息交换到另一个文件,并在需要时使用它。
希望这对
斯蒂芬有帮助
how large is you file? I am working with 3D model files having about 8 MB and are very detailed. The largest I imported successfully had 13.4 MB and the 29 MB-model crashed with the same exception you got but it was not well designed.
To convert 3ds into xaml I am using the Reader3ds of Wpf-Graphics. You avoid the step to convert it twice (through zam3d). The Reader3ds is able to read even large files and you can comfortably use the elements. Next I'm not glad using zam3d, I expect zam3d to put more information to the file than needed. Even the geometry I get is not the same as it was before and lights are added I did not use.
To reduce your xaml you can also try to work with a ResourceDictionary to swap the information to another file and just use it when it's needed.
Hope this helps
Stef