Edges without Polygons?

Does Panda3D allow for a mesh that has vertices joined by edges, but in which none of the edges close to form polygons? Something like a trail of vertices, joined each to the next by edges?

If so, how would it be defined, and does the egg-syntax support it?

Here it is worth understanding that the concept of edges is absent in principle for the geometry intended for rendering. 3D graphics editors simulate them using geometry.

There’s nothing inherently wrong with the idea of edges without geometry, I would say. Indeed, for some purposes it might be useful (as in my current case).

Note, however, that I don’t intend the mesh in question to be rendered. Rather, it would be a useful means of specifying some spatial data that basically comes down to pairs of connected positions.

It sounds like you want linestrip geometry, which I believe is well documented, or do you mean something else?

Ah, that does look promising! Thank you!

(It didn’t turn up in my searches, likely because I was searching for “edge”, not “line”–searching has never been a strong suit of mine!)

All right, are line-strips supported in the egg-format? I don’t see mention of them on the egg-syntax page

Linestrip? In fact, you can create something similar using the Wireframe modifier.

test.bam (692.2 KB)

When you say “Wireframe” modifier, do you mean the Blender modifier of that name? If so, then I doubt that it would help, I’m afraid: I’m not looking for a way to render an object such that it looks like a wire-frame, but rather for a way to have a “model” that’s composed connected vertices that don’t form polygons–as shown in the documentation that describes GeomLinestrips–be available in Panda.

I am going to want a way to export such a thing from Blender, I imagine, but that may just call for some hacking of YABEE.

The catch is that the lines are also rendered as geometry from polygons. I don’t think it’s a 2D draw. OpenGL doesn’t have such a thing, although I could be wrong. For example, text is also a geometry made of polygons. So I don’t see the point in this.

But again, I don’t intend to render this at all. ^^;

It’s a means of getting hold of some data that I want to generate in Blender, load into Panda, iterate over, and perform logic with.

I could do it with multiple separate objects–in fact, that’s my current approach. But doing so is clumsy, I find, for a few reasons. It would be very convenient to be able to just adjust vertices, then export the result and have my code interpret the result.

I think I understand what you are talking about, you need to look in the direction of BMmesh to get the order of the connected edges. However, I don’t think the EGG interface is suitable for this. Perhaps you need:

Hmm… Will GeomLinestrips not do it?

Eh, it should be possible, I think. I’ll have to look into it properly, but as long as I don’t need branching then, even if it doesn’t have a proper edge-interface I should be able to just store vertices in order. The trick then is to extract them…

I meant the Blender API.

Ah! That part shouldn’t be difficult, I think: Blender already exposes edges, allowing me to simply iterate over them in order to write whatever-I-end-up-writing to file (whether egg or something else).

I’m happy to report that line-geometry works! :slight_smile:

To be specific, I’ve altered YABEE a little such that it can now export GeomLine objects. Then, in my code, I retrieve the resultant objects, drill down to their primitives, and use a GeomVertexReader to examine their vertices. With this data I can extract the vertex-positions that define the lines, and thus translate them into the structures that I have in mind. :slight_smile:

Thank you to all who responded here! :slight_smile: