HTML 页面上的 3D 模型

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/596666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 23:22:31  来源:igfitidea点击:

3D models on HTML page

html3dcad

提问by BCS

I have 3D CAD model that I want to show on a web page. I'd like to show it in a form like a <img>tag (e.g. inline with everything else rather than as a separate page) and I want the visitor to be able to rotate the model to view it from different perspectives.

我有想要在网页上显示的 3D CAD 模型。我想以<img>标签之类的形式显示它(例如与其他所有内容内联而不是作为单独的页面),并且我希望访问者能够旋转模型以从不同的角度查看它。

What options do I have?

我有哪些选择?

Things I'm thinking of/looking at

我在想/正在看的事情

  • VRML
  • 3DXML
  • flash
  • PDF has something that works but it doesn't embed like I want
  • 3DMLW(Seems very slow)
  • Universal 3D(supported by Adobe Reader)
  • VRML
  • 3DXML
  • 闪光
  • PDF 有一些有用的东西,但它不像我想要的那样嵌入
  • 3DMLW(看起来很慢)
  • 通用 3D(由 Adob​​e Reader 支持)


Edit:The model is not very complex so perf is not a major concern.

编辑:模型不是很复杂,所以性能不是主要问题。

采纳答案by Jacob

Chrome Experiments has released several 3D Javascript applications. Here's an example: Colors Cube

Chrome Experiments 已经发布了几个 3D Javascript 应用程序。这是一个例子: 颜色立方体

回答by Pete Kirkham

Papervison3Dis a 3D flash library which might be worth a look. I haven't had the opportunity to play with it myself, but some of the demos look good.

Papervison3D是一个 3D Flash 库,值得一看。我还没有机会自己玩它,但一些演示看起来不错。

回答by Ryan Christensen

Papervision and Unity3D are the best choices for the pipeline in and quick loading. Flash is installed on most machined but you need to export as COLLADA format and there is a limit of 2000 polys before it bogs down.

Papervision 和 Unity3D 是管道输入和快速加载的最佳选择。Flash 安装在大多数机器上,但您需要导出为 COLLADA 格式,并且在陷入困境之前有 2000 个多边形的限制。

Unity 3D has a great pipeline and is free for the indie now. It supports very high poly counts and the plugin installs without a browser restart and is around 4MB (Flash and Sliverlight are both over 4MB now).

Unity 3D 有一个很棒的管道,现在对独立游戏免费。它支持非常高的多边形数量,插件安装无需重启浏览器,大小约为 4MB(Flash 和 Sliverlight 现在都超过 4MB)。

Another option might be Torque 3D but that is also very game based. I think your best option is Unity 3D. You can export as FBX and have it on the web in about 5 minutes.

另一种选择可能是 Torque 3D,但这也是非常基于游戏的。我认为您最好的选择是 Unity 3D。您可以导出为 FBX,并在大约 5 分钟内将其发布到网络上。

In the future you could use O3D from Google or WebGL but it is not ready for primetime. The only capable simple pipeline to get 3d on the web currently with decent poly counts is Unity3D. It works on PC and Mac just like Flash and Silverlight.

将来您可以使用来自 Google 或 WebGL 的 O3D,但它还没有准备好迎接黄金时段。目前在网络上获得 3d 效果的唯一可行的简单管道是 Unity3D。它可以像 Flash 和 Silverlight 一样在 PC 和 Mac 上运行。

回答by ChrisR

A new tool called Sketch Fabcame out a few month ago. It's designed entirely in HTML5 and seems very powerful.

几个月前推出了一个名为Sketch Fab 的新工具。它完全采用 HTML5 设计,看起来非常强大。

回答by tkotitan

I am not sure how good flash is at 3d support for things like CAD app file formats. IIRC, flash cannot do hardware accelerated 3D graphics. On the other hand, a Java applet can (with the right library).

我不确定 Flash 对 CAD 应用程序文件格式等内容的 3d 支持有多好。IIRC,闪存不能做硬件加速的 3D 图形。另一方面,Java 小程序可以(使用正确的库)。

回答by greyfade

You could also look at the <canvas> tag, which is being implemented by more browsers. There is probably already a JavaScript library for model viewing.

您还可以查看更多浏览器正在实现的 <canvas> 标记。可能已经有一个用于模型查看的 JavaScript 库。

回答by Paulo

Consider QuickTime VR. It allows for much of what you ask and since you have the original, you can create a fairly accurate model.

考虑 QuickTime VR。它可以满足您的大部分要求,并且由于您拥有原始模型,因此您可以创建一个相当准确的模型。

回答by ChrisF

VRML might be a good choice. There's a good client available from Parallel Graphicsthat I've used for quite a while now. I've got some VRML models on my website(though the content is quite trivial!). The models will load quite quickly, especially if they're not that large. There are several navigation modes available and you can lock it to "examine" which lets the user rotate the model (though in fact it's the camera that's moving around the object).

VRML 可能是一个不错的选择。Parallel Graphics有一个很好的客户端,我已经使用了很长时间了。我的网站上有一些 VRML 模型(尽管内容很简单!)。模型会加载得非常快,尤其是当它们不是那么大时。有几种可用的导航模式,您可以将其锁定为“检查”,让用户旋转模型(尽管实际上它是围绕对象移动的相机)。

You will need to find a program that can write VRML files, though any decent modeller will have that option.

您将需要找到一个可以编写 VRML 文件的程序,尽管任何体面的建模师都会有该选项。

回答by NeARAZ

回答by Sorskoot

Have a look at http://labs.autodesk.com/technologies/freewheel/

看看http://labs.autodesk.com/technologies/freewheel/

Project FreeWheel can show 2D and 3D models made in Autocad, Invertor or Revit. I think it uses DWF or something.

Project FreeWheel 可以显示在 Autocad、Invertor 或 Revit 中制作的 2D 和 3D 模型。我认为它使用 DWF 之类的。

At this point it's not possible to host FreeWheel on your own server, but you can upload a DWF to Autodesk and show your model in an IFrame.

此时无法在您自己的服务器上托管 FreeWheel,但您可以将 DWF 上传到 Autodesk 并在 IFrame 中显示您的模型。