适用于 2d/3d NUI 可视化应用程序的 Silverlight 5、WPF 或 XNA?
我目前正处于项目的早期阶段,很难决定使用哪个框架。我听到人们说 WPF 已死,但它似乎是(唯一?)编写 Microsoft Surface 应用程序的方式。这是该项目未来可能的目标之一,但不是主要焦点。
然而,主要焦点是:同一视图中的 2D 和 3D 对象(以及 kinect/语音支持)。一些 2d 对象是 SVG 文件。到目前为止,根据我在网上阅读的内容,在 XNA 中渲染 SVG 图形并不容易(在 Silverlight 5 3D 中也是如此)。我见过一些 SVG 到 XAML 转换器,但是其结果可以在 3d 视图中使用吗?或者反之亦然?
考虑到它不是一个游戏,而是一个业务应用程序,我很想排除 XNA,但话又说回来,我也需要良好的性能,因为将会有相当多的图形内容发生,如果可能的话,支持高分辨率/视频墙。考虑到视频墙可能会排除 WPF,因为我读到,如果分辨率低于 GPU 的纹理大小限制,它只会使用硬件加速。
无意在浏览器或手机中运行该应用程序,因此我很想排除 Silverlight 5。
任何提示将不胜感激。 谢谢!
I'm currently in the early stages of a project and have difficulty deciding which framework to use. I hear people say WPF is dead, yet it seems to be the (only?) way to program a Microsoft Surface app. This is one of the possible future aims of the project, but not the main focus.
The main focus however is: both 2d and 3d objects in the same view (and kinect/voice support). Some of the 2d objects are SVG files. From what I have read online so far it's not easy to render SVG graphics in XNA (nor Silverlight 5 3D for that matter). I've seen some SVG to XAML converters, but could the result of this be used in a 3d view? Or vice versa?
Considering it's not going to be a game, but a business application I'm tempted to rule out XNA, but then again I also require good performance as there will be quite some graphical stuff going on and if possible support for high resolutions/video wall. Taking a video wall into consideration would maybe rule out WPF as I've read that it will only use hardware acceleration if the resolution is lower than the texture size limit of the GPU.
There is no intend to run the application in the browser or phone, as such i'm tempted to rule out Silverlight 5.
Any tips would be greatly be appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不会因为 XNA 是“用于游戏”而排除它。您可以仅使用硬件加速 3D 渲染所需的部分,而忽略其余部分。这实际上就是 Silverlight 5 所做的!
因此,您可能会发现 XNA 和 SL5 之间的 3D 渲染代码在任何情况下都是相同的。
这是一个有关 XNA 中 SVG 的问题。基本上答案是:你必须编写自己的硬件加速 SVG 渲染器 - 这是一项极其困难的任务。但如果您的 SVG 文件永远不会改变,您可以使用现有的软件渲染器将它们渲染为纹理。
如果您将 SVG 转换为 XAML,则必须将其渲染为纹理才能在 SL5 3D 视图中使用它(除非它是叠加层)。所以那里没有什么大的胜利。我不知道 2D-3D 合成在 WPF 中是如何工作的。
您的决定实际上取决于您是否认为 SL5 或 WPF 为用户界面提供的内置功能有用?鉴于您基本上是在制作自己的用户界面,因此您可能不会从提供的 2D 界面中得到太多用处。
SL5 提供的 3D API 基本上是 XNA 的精简版本。 WPF 的 3D API 看起来只是为您渲染模型 - 与 XNA 相比,它似乎并没有给您带来太多好处。如果您有充分的理由使用 XAML,那么 WPF 可能是一个不错的选择。否则我会选择XNA。
I wouldn't rule out XNA on the basis that it's "for games". You can simply use only the parts required for hardware-accelerated 3D rendering and ignore the rest. This is in fact what Silverlight 5 does!
So you may find that your 3D rendering code is the same between XNA and SL5 in any case.
Here is a question about SVG in XNA. Basically answer is: you have to write your own hardware-accelerated SVG renderer - a stupidly difficult task. But if your SVG files never change, you could just use an existing software renderer to render them to a texture.
If you converted your SVG to XAML, you would have to render it to a texture to use it in a SL5 3D view anyway (unless it's an overlay). So there is no big win there. I don't know how 2D-3D compositing works in WPF.
Your decision really depends on whether you would find the built-in functionality that SL5 or WPF provides for user interfaces useful? Seeing as you are basically making your own user interface, you probably would not get much use from the provided 2D interface.
The 3D API that SL5 provides is basically a cut-down version of XNA. The 3D API for WPF looks like it just renders models for you - it does not seem to buy you much over XNA. If you have a compelling reason to use XAML, then WPF may be a good choice. Otherwise I'd go with XNA.