Jump to content
  • Advertisement
Sign in to follow this  
wout

Line lighting and normal vector

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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 :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
edit: you can also try adjusting the projected depth values of the surface using glPolygonOffset() before rendering, then do either of the above.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!