我应该选择哪种3D编程? [英] What 3d programming should i choose?

查看:89
本文介绍了我应该选择哪种3D编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景:-
我在WPF中开发了一个软件,其中
用户的图像包装在3d对象中.
-包含恰好适合3d对象的静态背景.
-手动添加灯光,纹理.

问题:-
我的问题是3d对象似乎不够吸引人,因此,我的上级建议研究XNA,但我不知道XNA是否对我足够好...

选项:-
因此,我应该为上述所有工作选择XNA并制作出具有吸引力的最终图形吗?

我应该尝试一些第三方3D渲染引擎吗?
请向我解释我该怎么办,或者还有其他选择?

Scenario:-
I am developed a software in WPF in which
-user''s image are wrapped in an 3d objects.
-contains a static background which just fits with the 3d object.
-the light, texture are added manually.

Problem:-
My problem is that the 3d object does not appear appealing enough.So, my senior suggested to look into XNA, but i donot know if XNA would be good enough for me...

Options:-
So, should i choose XNA for all the above work with great , appealing final graphics
OR
should i try some 3rd party 3D rendering engine?
Please explain me what should i do or is there any other option?

推荐答案

如果您有WPF应用程序,XNA将无济于事.有两个不容易克服的问题

1)WPF应用程序是事件驱动的,而XNA应用程序则在连续的渲染循环中运行.将这两个世界融合在一起并不是开箱即用的.您将需要编写一些自己的代码来提供一个类,该类的行为类似于XNA的Game类(XNA应用程序的主要运行时对象),该类封装在WPF控件中并在单独的线程中运行. />
2)基于DirectX的XNA需要Win32窗口作为渲染目标. WPF控件不是基于Win32窗口的,因此不能用于此目的.到目前为止,唯一的解决方案是打开一个单独的Win32窗口,并使它与WPF控件保持一致,以便至少将其呈现为将内容呈现到该控件中.这当然是一个hack,而不是我想要在严肃的应用程序中看到的东西.

我有一个自己的小项目,以前是WPF,而且还需要比WPF提供的3D多一些的项目.最后,我走了相反的方向.现在它是一个纯XNA应用程序,我已经为XNA编写了自己的GUI.现在,我不得不同时拥有这两种功能,但必须编写自己的GUI.底线:不管您如何看待:3D和WPF都不容易组合在一起.
XNA will not help very much if you have a WPF application. There are two problems which are not easy to overcome

1) WPF applications are event driven while XNA applications run in a continuous rendering loop. Getting those two worlds together does not work out of the box. You will have to write a bit of your own code to provide a class that acts like XNA''s Game class (the main runtime object of an XNA application) that is encapsulated in a WPF control and runs in a separate thread.

2) XNA, which is based on DirectX, needs a Win32 window as rendering target. WPF controls are not based on Win32 windows, so they cannot be used for that purpose. The only solution to that has up to now been opening a separate Win32 window and keeping it aligned with the WPF control, so that it at least appears as if the content is rendered into that control. This of course is a hack and not what I would like to see in a serious application.

I have a little project of my own which used to be WPF and also needed a little more 3D than what WPF had to offer. In the end I went into the opposite direction. It''s now a pure XNA application and I have written my own GUI for XNA. Now I have both things at once, at the price of having to write a own GUI. Bottom line: No matter how you look at it: 3D and WPF don''t come together easily.


如果您只想在另一个3D对象的表面上显示用户的图像如果足够,则使用WPF,但是如果您希望用户能够旋转3D对象或使用3D对象,则需要XNA.
If you just want to show user''s image on surface of another 3D object then WPF if enough but if you want the user to be able to rotate 3D object or play with 3D object then you need XNA.


这篇关于我应该选择哪种3D编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆