Public Group

Curious: Low level rep. of segments?

This topic is 2231 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I don't have a specific project (yet). But I do ask myself detailed questions about CGI, and about hardware-3D. Also, I have installed an array of software designed to support CGI and game development.

But there was one question recently, which I was not able to answer through merely analyzing it.

I can see in some of my model editors that instead of triangles, segments are well defined. Thus, if we want to model hair (and later run Physics on it), then guide hairs can be modeled as sequences of segments. Population hairs are rendered around the guide hairs...

Can an expert tell me, what the low-level representation of a segment is in graphics hardware?

I know about vertex arrays, as well as about 'polygon arrays'. Polygon arrays have as element a structure of 3 vertex numbers, which index the vertex array. These 3 vertices form one triangle within a mesh. And elements of the polygon array (triangles) also tend to form pairs in certain cases, which represent quads. And they can be arranged into strips for efficiency...

If I had to design a graphics system from the ground up (which would be well beyond my capacity), then one way in which I might try to implement segments would be to use a triangle structure within the existing polygon array, but to state one vertex number twice, while stating a second vertex number only once. This would conserve the total number of vertices used. But I don't know whether this is in fact how experts did segments and lines of segments, at the hardware level.

Can somebody set me straight? I have never heard of a ~segment array~ , analogously to the polygon array. Does one exist?

Dirk

Share on other sites
Graphics API's do support line lists and line strips (e.g. segment arrays as you call them), where two vertices define a segment. For DirectX it's called the primitive topology, there are points, line lists, line strips, triangle lists, triangle strips, triangle fans, etc... then there are all the tessellation patch variants (for D3D10+), and all of that can also be used with an index buffer.

Obviously, you can also draw a segment by sending a triangle with two identical vertices, but that's a bit wasteful (although perhaps the hardware ends up doing this anyway and provides line lists only to reduce the amount of data to send to the GPU, I don't know). Edited by Bacterius

Share on other sites
Thank you for the informative answer!

The main reason I was asking, was the fact that if one day I was to embark on some kind of 3D Art / Game project, and if I then simply did my own thing, then the subject of compatibility would crop up. For example, I do not really wish to install the "DirectX 11" SDK (because on one of my computers I do have a 'Dx 11' -capable graphics card), but would instead want to use the "OGRE" SDK, and would then want to use the "nxOgre" wrapper to "PhysX". If I was suddenly to start defining my segments as degenerate triangles, I have no way of knowing that this representation is also going to be recognized by the Physics system involved. It could bug out hugely, for which reason I'd need (one fine day) to use the correct API features.

I suppose that I could have asked on the OGRE forums, or on the "Crystal Space" forums, or on the "Delta3D" forums, but my question was in fact a basic question about hardware-accelerated 3D. So I posted it here...

Also I suspect that most of the people who do embark on a project, eventually depend to some extent on libraries if not SDKs which have already been written for them, since most people don't really want to design a graphics system from scratch.

Thanks again,
Dirk

P.S. After eliminating some ideas of my own which seemed unwieldy, the speculation remains plausible that in "line strips" or "triangle strips", there might simply be a value replacing a vertex number, which indicates some type of NULL. Edited by Dirk Mittler

1. 1
Rutin
25
2. 2
3. 3
JoeJ
19
4. 4
5. 5

• 10
• 11
• 9
• 9
• 10
• Forum Statistics

• Total Topics
631752
• Total Posts
3002095
×