Hi all:
If there is a complex object in the 3D scene, how can I calculate the outlier sihouette of the object displayed on the image please?
Is there any paper about this??
Thanks
how to calculate the object sihouette?
Quote:Original post by rfterdarc
Like calculating the convex hull?
http://en.wikipedia.org/wiki/Convex_hull
kind of similar, but that's finding the convex hull for a set of 2D points, but my problem is to find the border of a 3D object on the plane.
For example, if there is a cow object in the 3D scene, after rendering, the cow is displayed on the image, but how can I calculate the border of the cow on the image?
I don't want a edge extraction algorithm but instead I want to calculate the border of the cow from the perspective of projection.
Do I make myself clear?
If this is just to render the silhouette, you could just (in the modeling too, or a vertex shader) create a shell around the object. Copy the mesh. Push every vertex out along it's normal as wide as you want the silhouette. Invert the normals, and render. If you render this to it's own texture, you could then blur or otherwise filter it to get that nice "glow" that say the Left 4 Dead shader does.
Quote:Original post by KulSeran
If this is just to render the silhouette, you could just (in the modeling too, or a vertex shader) create a shell around the object. Copy the mesh. Push every vertex out along it's normal as wide as you want the silhouette. Invert the normals, and render. If you render this to it's own texture, you could then blur or otherwise filter it to get that nice "glow" that say the Left 4 Dead shader does.
Sorry, I am afraid don't quite get it. I don't really care about rendering of the silhouette. Instead I am wondering how to extract the silhouette with the information of the viewing frustum, view point and the object information.
Project each polygon and compute the union. Is that what you want? What do you need the silhouette for?
Quote:Original post by alvaro
Project each polygon and compute the union. Is that what you want? What do you need the silhouette for?
Yes, project the polygon to the front plane of the frustum. But how should I do it? As it is not a orthogonal projection, what's the matrix of calculating the projection? Also, if the projection of every polygon is computed, it could be very slow. How to accelerate it?
I need the silhouette for object description stuff.
Hey dude, there is an article in the old flipcode archive on how to calculate an outline of an object, maybe you can get something out of it?
http://www.flipcode.com/archives/Object_Outlining.shtml
http://www.flipcode.com/archives/Object_Outlining.shtml
Quote:Original post by zeeli
Hey dude, there is an article in the old flipcode archive on how to calculate an outline of an object, maybe you can get something out of it?
http://www.flipcode.com/archives/Object_Outlining.shtml
Thanks, I think that's what I am looking for. I still need to read the details though.
You could calculate the viewspace coordinates of every point of the mesh and then build a convex hull around that.
Doing it on the CPU might be a bit slow with very complex meshes though. Do you want to get the actual values back so you can use them or do you just want to render it to the screen?
Doing it on the CPU might be a bit slow with very complex meshes though. Do you want to get the actual values back so you can use them or do you just want to render it to the screen?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement