Archived

This topic is now archived and is closed to further replies.

Drawing the outline of an object.

This topic is 5943 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

today isnt a good day. 2 requests for help at once . anyway. does anyone know how to draw the outline of an object? i dont mean the wireframe, i mean the outline. also, i need the rest of the object to be transparent. for example: imagine a quad (q) and a sphere (s). the sphere is larger and infront of the quad. if you rendered it, it might look like this:
     ssss
 qqssssssssqq
 ssssssssssss
ssssssssssssss
ssssssssssssss
 ssssssssssss
 qqssssssssqq
     ssss
notice how you can only see the corners of the quad? right, now the effect i want to pull off is this:
     ssss
 qq**qqqq**qq
 *          *
sq          qs
sq          qs
 *          *
 qq**qqqqq**q
     ssss
the * is where both objects overlap. in the end, it should look like this:
     ****
 ************
 *          *
**          **
**          **
 *          *
 ************
     ****
damn these drawings are poor . notice how the sections of the sphere arnt rendered, just its outline. this is what i want to pull off. i was thinking of using the stencil buffer for this, i.e. draw the object into the stencil buffer, then set rendering to line only mode, and dont let it draw where the object has been stencilled in (give it a good line width so that the lines will overlap the borders), but 1) the stencil buffer refuses to work (yet other demos i've downloaded work fine) and 2) it seems a slow way of doing it. any and all help appriciated. MENTAL Edited by - MENTAL on October 10, 2001 7:06:15 AM

Share this post


Link to post
Share on other sites
if you mean and effect something like jet set radio for sega dreamcast or the zelda gamecube try looking for a tutorial on cel-shading.

Share this post


Link to post
Share on other sites
Hi there,

I think you could use a 1D texture.

or

Use a mixture of glPolygonOffset and
the stencil buffer.

There was also a link on OpenGL.org for
a non-photorealistic quake which has source
and may be of some use.

Hope its of some help

Mark.

Edited by - MButchers on October 10, 2001 12:14:13 PM

Share this post


Link to post
Share on other sites