View Full Version : How would you render a cable?

11-11-2003, 08:31 AM
Hi there.

Now that the gfx card can render so many polys, a lot of games make use of very detailed objects. One thing i was wondering is, how they render their wires and cables.

Simply using GL_LINES should not be the preferred way, because those lines always have the width of 1 pixel (or the line-width which one can set) regardless of how far away an object is. Or am i wrong here?

So how would you do that? A billboarded line of quads? Or maybe simply a 3 sided object?
I didnīt try it out yet, but i think it is more complicated than one would expect.

Just curious how you would do that, or if someone has done it yet.

Bye then,

11-11-2003, 11:28 AM
A group of connected cylinders would look ok.

11-11-2003, 11:36 AM
Well, when i said "how would you render it" i should have added "to make it as efficiently as possible", since it would be insane to render a thin cable with a high detail.
By rendering connected cylinders you can easily end up with a few hundred polys for a simple cable.


11-11-2003, 12:01 PM
I think you just answered your own question.

I wouldn't consider a cable to be important enough to give it any attention at all, so why bother giving it such high detail? It is just a simple cable, as you said.

[This message has been edited by gator (edited 11-11-2003).]

11-11-2003, 03:08 PM
Instead of a circle, that you extrude along a path, you could also use a quad and encode the other vertices (to make it round) into a normalmap. This should be simple to implement.


11-15-2003, 04:39 AM
If you want to make a low poly model still visually appealing, I guess you could
also first create a high resolution model of it, then use some kind of poly reduction
tool to keep the best vertices, and throw away what is not needed.

I think there is at least one open-source poly decimation tool out there.

[This message has been edited by gator (edited 11-15-2003).]