简单的线框格式? [英] Simple wireframe format?

查看:35
本文介绍了简单的线框格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种用于线框模型的简单文件格式.我知道 VRML、u3D 等,但这些对于我的需求来说似乎是重量级的.我的标准是:

I'm looking for a simple file format to use for wireframe models. I am aware of VRML, u3D, etc, but these seem heavyweight for my needs. My criterea are:

  • 必须有明确的规范.无论是开放的还是非常完善的/记录在案的.
  • 我只需要(想要)简单的模型——顶点和边.我不想处理人脸或物体.如果格式支持更多,只要我可以忽略它们就可以了.
  • 最终用户工具不是必需的,但会很棒.如果不是,则它必须是人类可读的(并且对于简单模型是可编辑的).
  • 能够注释或至少标记节点会很好(但不是必需的).
  • 我使用什么语言无关紧要,但可能的选择是 Java/C++ &OpenGL

或者我只是更好地将顶点/边列表写入文本文件并完成它?

Or am I just better writing vertices/edge lists to a text file and be done with it?

推荐答案

我不知道有任何主动针对线框视图的格式.(仅限边缘/顶点)您几乎总是至少要处理面部.幸运的是,除非您对边缘列表线框渲染有非常特殊的需求,否则几乎可以使用面部列表中的任何 API 来完成.

I don't know of any formats that actively target wireframe views. (Edge/vertex only) You'll almost always have to deal with faces at the very least. The fortunate part there is that unless you have a very specific need for nothing but an edge list wireframe rendering can be done with just about any API from a face list.

至于格式,OBJ 很好很简单,如果有点过时了.它也可能是最容易找到文档的格式.Microsoft 的 X 文件非常适合快速和脏的渲染,但我一直有点偏爱 Quake 格式.不过,它们往往非常面向游戏,因此包含许多您可能不想要的信息.

As for the format, OBJ is good and simple, if a little outdated. It's also likely the easiest format to find documentation for. Microsoft's X files are great for quick and dirty rendering, but I've always been somewhat partial to the Quake formats. They tend to be very game-oriented, though, and as such include a lot of info you probably don't want.

如果这些都不能满足您的需求,不妨看看 COLLADA.它本身可能不会为您工作,但您可以将快速导出器编写为您自己的格式,仅包含边缘/顶点信息,此时您基本上可以支持地球上的每个建模包:)

If none of those meet your needs, maybe look into COLLADA. It probably won't work for you by itself, but you could write a quick exporter into your own format that only contains edge/vertex info, and at that point you essentially have support for every modeling package on the planet :)

这篇关于简单的线框格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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