From: Raphael Grasset (raphael.grasset++at++imag.fr)
Date: 09/11/2002 03:56:29
Marc Mendez wrote:
> Hi Performers,
>
> I m sorry about my previous question about the culling and drawing, I
> doesn t
> appear to have been clear... holidays haven t been enough.
>
> What I m trying to do is Augmented Reality:
> - I ve got a video in the scene background,
> - I d like to display on top of it some synthetic objects positionned at
> the
> right place in the "real" scene.
>
> The simplest problem I m facing is:
> - imagine a movie where you can see a room with a table,
> - I d like to display a chair behind the table.
> I ve got the video camera position driving the Performer synthetic scene
> camera.
>
> If I simply display the chair with Performer, it will always be seen in
> front of
> the table (no culling because no Z-information in the video).
> So I m thinking about using a synthetic scene of the real scene with:
> - the real objects (for culling),
> - the augmenting objects (for the display).
>
> How, with Performer, can I cull efficiently the augmenting objects to
> only draw
> the seen part of the chair that is not behind the table ?
> What is the way to do it with Performer ? Can I just disable a draw flag
> for the
> real objects ? Or should I first "manually" cull the synthetic objects
> and then,
> retrieving the remaining parts of the synthetic objects, draw it ???
>
> Thank you again,
> pfRegards,
> Marc.
>
Hello,
I'm also do AR with Performer.
The best solution is to just do a z-render of the table (you need a
geometric model of the table) and not modified your virtual element.
for this define a predraw and postdraw of the table (and all your real
object).
static int
preDraw(pfTraverser*,void* data)
{
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
return PFTRAV_CONT;
}
static int
postDraw(pfTraverser*,void* data)
{
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
return PFTRAV_CONT;
}
and draw your scene : automatically the chair is occlude by the table due
to z-buffer render.
My main problem is for shadow : how with only two pass have shadow
Virtual<->Virtual R<->R V<->R and R<->V ?
if you have a global solution write to me.
(look at
http://www-imagis.imag.fr/~Raphael.Grasset/RECHERCHE/RESULTATS/VisualIntegration.html
for an image result).
-- __________________________________________________________________________ Raphaël GRASSET | Doctorant (Phd Student) | iMAGIS-GRAVIR -------------------------------------------------------------------------- raphael.grasset++at++imag.fr http://www-imagis.imag.fr/Membres/Raphael.Grasset Tel:+33(0)4.76.61.55.17 Fax:+33(0)4.76.61.54.40 iMAGIS- Laboratoire GRAVIR INRIA Rhône-Alpes 655, avenue de l'Europe 38330 Saint-Ismier Cedex FRANCE __________________________________________________________________________
This archive was generated by hypermail 2b29 : Wed Sep 11 2002 - 03:56:45 PDT