在服务器上以批处理方式将纹理映射到 3D 对象

发布于 2024-08-18 11:18:07 字数 596 浏览 2 评论 0原文

我们有以下用例:

  1. 用户
  2. 稍后将其图片上传到 Web 服务器上 - 在服务器上 - 图片被映射到预定义的 3D 对象上并存储为普通图像(png、jpeg...) 。目前只是前视图。会话结束后,文件将被删除。
  3. 将它们以正常的 img 标签显示给用户

为了支持这一点,我正在考虑以下过程

: 3D模型离线创建并上传到服务器
b.纹理映射是在服务器上实时完成的
c.生成的 3D 模型视图保存到临时文件
d.文件显示在 img 标签中

现在问题是:

您对支持这种过程的工具有什么建议? 它们运行的​​操作系统并不重要。步骤 B.和c。应该是相当快的。

所以对这些工具的要求是​​:
对于 3D 建模者:
- 开源
- 易于使用
后续步骤
中使用的库可读的格式保存模型

-以图形库的 :
- 开源
- 易于使用
- 资源占用少(就像图形密集型应用程序一样:))
- 读取建模器生成的文件
- 应用纹理
- 将生成对象+纹理的视图保存到普通文件中以在浏览器中显示。

谢谢。

we have the following use case:

  1. the user uploads her picture on a web server
  2. at a later time - on the server - the picture(s) are mapped on predefined 3D objects and stored as normal images (png, jpeg, ...). For now just the front-view. The files will be deleted once the session ends.
  3. show them in normal img tags to the user

In order to support this, i was thinking of the following process:

a. the 3d models are created offline and uploaded to the server
b. in real time, the texture mapping is done on the server
c. the generated view of the 3D model is saved to a temporary file
d. the file is displayed in a img tag

So now to the questions:

what are your suggestions about the tools that would support this kind of process?
The OS on which they run is not important. The steps b. and c. should be quite fast.

So the requirements for theses tools are:
for the 3D modeler:
- open source
- easy to use
- save the model in a format readable by the library used in the next steps

for the graphical library:
- open source
- easy to use
- easy on resources (well as much as a graphics intensive application can be :) )
- read the files generated by the modeler
- apply textures
- save a view of the generate object + texture to a normal file to be displayed in a browser.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

忆依然 2024-08-25 11:18:07

(看来我无法对上面的问题添加评论 - 因此将其作为答案发送)

您所有的建议都很棒,我们尝试它们非常有趣。

然而很快我们就发现我们无法在服务器端应用它们,因为服务器没有 GPU。

现在有两个选项:

  • 使用 ReferenceGraphicsDeviceManager 之类的东西 - 它不需要 GPU。这里的缺点是它真的很慢。
  • 为服务器购买显卡。我担心的是可扩展性。你们中有人有这样的经验吗:GPU 适合处理来自 Web 服务器的并行请求吗?

谢谢。

(it seems i cannot add a comment to the question above - thus sending this as an answer)

all you suggestions are great and we had great fun trying them out.

however pretty soon it became clear that we cannot apply them on the server-side since the server does not have a GPU.

now there are 2 options arround that:

  • use something like a ReferenceGraphicsDeviceManager - which does not need a GPU. The dowside here is that it is really slow.
  • buy a graphic card for the server. My worry here is scalability. Do any of you have any experience here: is GPU suitable for handling parallel requests comming from the web server?

Thanks.

难得心□动 2024-08-25 11:18:07

您对此有何建议
支持这种类型的工具
过程?它们运行的​​操作系统是
不重要。步骤 B.和c。
应该很快。

那里有很多 3D 建模器,我建议您查看 Blender,但是 这里有 25 个应用程序的列表(带有屏幕截图)这里

有一些教程解释如何使用 Blender 为 XNA 建模:

http://www.stromcode.com/2008/03/10/modelling-for-xna-with-blender-part-i/
http://www.virtualrealm.com .au/blogs/getting-started-with-blender-3d-and-xna/

对于图形库

我建议您使用 XNA,它会节省您的时间,因为它是 c# 和不需要花费很多精力就能上手,而且速度非常快,因为它使用 GPU。您将需要从文件加载模型(您可以在运行时花费一些精力使其导入),然后加载纹理并通过模型的效果将其应用到模型。

然后,您可以将所需的图像生成到网站可访问的文件中。然后您的用户就可以阅读这些图像。

what are your suggestions about the
tools that would support this kind of
process? The OS on which they run is
not important. The steps b. and c.
should be quite fast.

There are a lot of 3D modelers out there, I suggest you look at Blender, but here there is a list (with screenshots) of 25 apps out there

Here are some tutorials explaining how to model for XNA with Blender:

http://www.stromcode.com/2008/03/10/modelling-for-xna-with-blender-part-i/
http://www.virtualrealm.com.au/blogs/getting-started-with-blender-3d-and-xna/

for the graphical library

I suggest you use XNA, it will save you time since it's c# and doesn't need a lot of effort to pick up and it's very quick because it uses the GPU. You will need to load a model from a file (you can make it import during runtime with a bit of effort) then load the texture and apply it to the model through the models' Effect.

Then you can generate the image you want to a file accessible by the website. Your users can then read the images.

没有你我更好 2024-08-25 11:18:07

Google sketchup,用于轻松建模(而且像啤酒一样免费)。

Irrlicht 支持离线渲染(无需窗口),因此您可以渲染到纹理并保存结果。 (开源)。

如果我要这样做,我将创建一个创建和irrlicht渲染设备(在后台运行)的服务,这将有一个接受渲染请求并按顺序处理它们的队列。另外,如果服务器有 opengl,您可以将其与 irrlicht 一起使用,可能会加快速度。

Google sketchup for an easy modeler (and free as in beer).

Irrlicht supports offline rendering(no window needed) so you could render to texture and save the results. (Open source).

If i were making this i would make a service that creates and irrlicht render device (that runs in the background), this would have a queue that accepts render requests and processes them in order. Also if the server has opengl you can use it with irrlicht, might speed things up a bit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文