简单的线框格式?简单、格式

2023-09-08 00:57:57 作者:踮起脚尖_吻你

我在找用于线框模型一个简单的文件格式。我知道VRML,U3D等,但这些似乎重量级的满足我的需求。我criterea是:

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 是很好的,简单的,如果有点已经过时。它也可能找到文档中的最简单的格式。微软的X文件是伟大的快速和肮脏的渲染,但我一直有点偏雷神之锤格式。他们往往是非常游戏为主,不过,正因为如此包含了大量的信息,你可能不希望。

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 :)