Line lighting and normal vector

Started by
2 comments, last by wout 17 years, 8 months ago
Hi, I'm rendering a scene with some surfaces and lines, but the lines seem to be 'flat', as in having 2 faces. While I want them to be cylindrical so a line appears to be the same from all sides. What's the proper way to achieve this? I've googled myself silly and gone through the red book, but haven't found the solution yet. Thanks a bunch! Wout
Advertisement
Would this be like isolines on the surface?

I would just draw all the surfaces first, disable lighting, then draw the lines.

If you want to see the lines no matter what the orientation may be, do the above, except also disable depth testing before drawing the lines.

I hope that helps :)
edit: you can also try adjusting the projected depth values of the surface using glPolygonOffset() before rendering, then do either of the above.
Thanks, I'll try that. The model I'm creating is of a house, but just schematically, the beams of the building are represented by lines. There are some surfaces involved too.

Actually I hoped not to have to disable lighting, I just would like it to be lighted as if it were a cylinder with the line width as diameter... but probably that's too much to ask. I should probably make it a cylinder then...

Wout

This topic is closed to new replies.

Advertisement