Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / silhouette Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Steph

August 16, 1999, 10:11 AM

Hello,

Do you know papers or web sites where I can find a way
to have the projected 2D silhouette of a 3D object ( convex
or concave ...)

Thank you

Steph

 
Raven

August 17, 1999, 12:04 PM

>> Do you know papers or web sites where I can find a way
>>to have the projected 2D silhouette of a 3D object ( convex
>>or concave ...)
I don't know of any algos to do this, but if i'm right you need this for shadow generation. You want to project the concave silhouette onto the envirnoment, because you think it would be faster than many convex volumes. I would really like to know how you are planning to project an arbitrarily CONCAVE volume onto an arbitrarily CONCAVE envirnoment. That is the real problem, and that is probably why an algo like that is not all over the web, its simply not useful. I think its probably possible(in fact its called Liang-Barsky clipping i think), but it would be so slow you're better off LODing your model to the lowest setting where it still resembles itself, and projecting the whole thing. You can de a little clipvolume merging while you're at it, as long as your volume stays reasonable and convex. Or you might consider other methods of shadow generation, though that depends on your method of doing dynamic lighting.

 
Steph

August 18, 1999, 03:49 AM

In fact, I know it's possible to do it, because I have done it
(check your mail). But the algorithm to find the silhouette is not
perfect and some holes appear sometime in the shadow... That's why
I'm looking for another one...
Somebody has an idea of the MDK2 method for shadow?

Steph


Raven wrote:

>>I don't know of any algos to do this, but if i'm right you need this for shadow generation.
>>You want to project the concave silhouette onto the envirnoment,
>>because you think it would be faster than many convex volumes.
>>I would really like to know how you are planning to project an arbitrarily CONCAVE
>>volume onto an arbitrarily CONCAVE envirnoment.
>>That is the real problem, and that is probably why an algo like that is not all over the web,
>>its simply not useful. I think its probably possible(in fact its called Liang-Barsky clipping
>>i think), but it would be so slow you're better off LODing your model to the lowest
>>setting where it still resembles itself, and projecting the whole thing.
>>You can de a little clipvolume merging while you're at it, as long as your volume stays
>>reasonable and convex. Or you might consider other methods of shadow generation,
>>though that depends on your method of doing dynamic lighting.

 
Effin Goose

August 18, 1999, 10:29 AM

Hi,

Dont know much about it really, however I was browsing today and found an article on www.opengl.org, on stencil buffering. Not sure if that was what you were looking for or not, but i hope it helps..

Ryan

 
Raven

August 18, 1999, 10:42 AM

>>In fact, I know it's possible to do it, because I have done it
>>(check your mail). But the algorithm to find the silhouette is not
>>perfect and some holes appear sometime in the shadow... That's why
>>I'm looking for another one...
Are you sure the holes are not caused by your fine visibility determination(ie z-buffer or whatever you have)? Since the shadow polys are very close to the object polys you might need to put a depthbias on the shadow. Also, are you sure that you are doing it correctly? I mean, the shadow volume algo is well-documented and i just opened a book and it said how to do it, silhouette edges and all("Advanced animation and rendering techinques"). It even had code fragments that calculated the shadowvolume by tracing out the silhouette. There is a well-known and defined way to do this, though the algo doesn't fair too well when it comes to dynamic models. Just make sure that the way you are doing it is the "tried tested and true" way. If you are having trouble finding good material on the algo(NOT tutorials on the net, a real graphics book), email me and i'll send you a condensed(no pseudocode) version of the explanation in AART.

>>Somebody has an idea of the MDK2 method for shadow?
No, sorry. I doubt anyone has, since its a commercial engine and it's very much under NDA

- Raven

 
Raven

August 18, 1999, 10:46 AM

>>Dont know much about it really, however I was browsing today and found an article on
>> www.opengl.org, on stencil buffering. Not sure if that was what you were looking for or
>> not, but i hope it helps..
I read that doc(seen the slideshow actually). Stencil buffer is nice to put the shadows onto the polygons, but you still need the shadowvolumes in place, so its really no substitute for the actual algorithm. It is very educational however to check out the sample that comes with the little slideshow, since it uses almost all dynamic shadowing algorithms known to man that do not involve zbuffering. And, though i never actually looked at the sample, they promise that the source code for all the methods is in there. You might find a good example of how to do shadow volumes.

- Raven

 
Tim Lewis

August 19, 1999, 12:32 AM

One way of quickly generating silhouette edges is by changing your object representation
from polygons referencing shared vertices to polygons referencing shared edges, which then reference shared vertices. The edges also point to two polygons that share that edge (or more, if you want to allow it). Given that backfacing polygons have a flag set to specify that, you can just go through the edge list, looking for edges that are either referenced by just one polygon or are referenced by one polygon that is front facing and another that is backfacing.
Save all these edges into a list and you have a set of edges for drawing a silhouette edge.
You can further sort this into an array of vertices to form a polygon, rather than just a collection of arbitary edges.
I haven't tested this yet so it might not work, if there are any holes in my idea, let me know.

Tim.

 
Steph

August 19, 1999, 03:36 AM



Tim Lewis wrote:
>>One way of quickly generating silhouette edges is by changing your object representation
>>from polygons referencing shared vertices to polygons referencing shared edges, which then reference shared vertices. The edges also point to two polygons that share that edge (or more, if you want to allow it). Given that backfacing polygons have a flag set to specify that, you can just go through the edge list, looking for edges that are either referenced by just one polygon or are referenced by one polygon that is front facing and another that is backfacing.
>>Save all these edges into a list and you have a set of edges for drawing a silhouette edge.
>>You can further sort this into an array of vertices to form a polygon, rather than just a collection of arbitary edges.
>> I haven't tested this yet so it might not work, if there are any holes in my idea, let me know.
>>
>>Tim.

 
Steph

August 19, 1999, 03:39 AM


Thank you all for your answers, I am going to have a look at the opengl site and
try to find "Advanced animation and rendering techinques" book...

Steph
Raven wrote:
>>>>Dont know much about it really, however I was browsing today and found an article on
>>>> www.opengl.org, on stencil buffering. Not sure if that was what you were looking for or
>>>> not, but i hope it helps..
>>I read that doc(seen the slideshow actually). Stencil buffer is nice to put the shadows onto the polygons, but you still need the shadowvolumes in place, so its really no substitute for the actual algorithm. It is very educational however to check out the sample that comes with the little slideshow, since it uses almost all dynamic shadowing algorithms known to man that do not involve zbuffering. And, though i never actually looked at the sample, they promise that the source code for all the methods is in there. You might find a good example of how to do shadow volumes.
>>
>> - Raven

 
Tim Lewis

August 19, 1999, 05:28 AM

I think you pressed the reset message form button, I've done that too (pain in the arse :)

 
Tim Lewis

August 19, 1999, 05:28 AM

I think you pressed the reset message form button, I've done that too (pain in the arse :)

 
Jaap Suter

August 19, 1999, 03:39 PM

This is great!!!! I love it's simplicity!

It was just what I was looking for!!! Not perse for shadow generating but for calculating the visible set.

I'll keep you updated on any news.

THanks man!!!

Jaap Suter


 
Steph

August 20, 1999, 03:27 AM


Opps yes, I must have click the bad one??

The solution you explain is the one I am using at the moment, it works well
for convex and not too complex non convex object, I have fast shadows for
boxes, sphere and even torus... but for complex object ( human body ),
this solution don't work perfectly...

Thank you for your help

Steph

Steph wrote:
>>
>>
>>Tim Lewis wrote:
>>>>One way of quickly generating silhouette edges is by changing your object representation
>>>>from polygons referencing shared vertices to polygons referencing shared edges, which then reference shared vertices. The edges also point to two polygons that share that edge (or more, if you want to allow it). Given that backfacing polygons have a flag set to specify that, you can just go through the edge list, looking for edges that are either referenced by just one polygon or are referenced by one polygon that is front facing and another that is backfacing.
>>>>Save all these edges into a list and you have a set of edges for drawing a silhouette edge.
>>>>You can further sort this into an array of vertices to form a polygon, rather than just a collection of arbitary edges.
>>>> I haven't tested this yet so it might not work, if there are any holes in my idea, let me know.
>>>>
>>>>Tim.

 
Steph

August 20, 1999, 03:31 AM



Hey Jaap, how can you get the visible set with this method as you must have the visible
set first to have the silhouette? There's something not clear for me...

Steph


Jaap Suter wrote:
>>This is great!!!! I love it's simplicity!
>>
>>It was just what I was looking for!!! Not perse for shadow generating but for calculating the visible set.
>>
>>I'll keep you updated on any news.
>>
>>THanks man!!!
>>
>>Jaap Suter
>>
>>

 
Jaap Suter

August 20, 1999, 04:01 AM

Hi,


well, I won't say that this is all I needed to obtain the visible set. But my guess is that the silhouette of any object or wall or anything can be used as an occluder if it's big enough (in realtime I mean). I still have to work lots of things out though. For example the convex versus concave problem. I haven't found a way to test an convex poly against a concave beam (trough a concave silhouette), but on the other hand I don't feel like dividing very large concave silhouettes into more smaller convex ones.

How do you draw your concave silhouettes? Do you have a drawConcavePoly() method or something?

Jaap Suter

 
Steph

August 20, 1999, 05:46 AM




>>well, I won't say that this is all I needed to obtain the visible set. But my guess is that the silhouette of any object or wall or anything can be used as an occluder

OK I understand now...

>>How do you draw your concave silhouettes? Do you have a drawConcavePoly() method or something?

In fact I don't draw the silhouettes directly to have shadows, I use them to have some kind
of shadow volume to test with the other object's triangles.

Steph

 
Jaap Suter

August 20, 1999, 07:13 AM

>>In fact I don't draw the silhouettes directly to have shadows, I use them to have some kind
>>of shadow volume to test with the other object's triangles.

But then you construct concave beams (volumes). How are you testing triangles
against concave beams? I have no satisfactory solution for this. But it is exaclty what I was
looking for last night.

Maybe that is what is causing your gaps?

Jaap Suter

 
This thread contains 17 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.