Re: Adding 2nd view for holoscreen floor projection

Hi Bill, hi list,

thanks for your answer Bill. I spend some time to take a deeper look into the
VisAD source code before writing this reply.
The major problem in adding one or more views to VisAD to get a
holoscreen/cave-ready projection is the fact, that the VisAD design is layouted
to have one View and one VisADCanvasJ3D (assuming the api is JPANEL).

It is no problem do a "dirty" step and add second view+canvas by getting the
scenegraph root from the display renderer.
Here just a snippet of code to make it clearer:

----- snip ----
display = new DisplayImplJ3D(getTitle());

// repace original view transform of first (vertical) view
TransformGroup tg
    ((DisplayRendererJ3D) display.getDisplayRenderer())

VisADCanvasJ3D c
    new VisADCanvasJ3D(
        (DisplayRendererJ3D) display.getDisplayRenderer());

BranchGroup b = createView(c, getVertViewingTrans());
    ((DisplayRendererJ3D) display.getDisplayRenderer())
getContentPane().setLayout(new GridLayout(2,1));

protected BranchGroup createView(VisADCanvasJ3D c, Transform3D viewingTrans) {
    ViewPlatform vp = new ViewPlatform();
    View v = new View();
    v.setPhysicalBody(new PhysicalBody());
    v.setPhysicalEnvironment(new PhysicalEnvironment());

    TransformGroup viewTG = new TransformGroup();

    BranchGroup viewBG = new BranchGroup();
    return viewBG;

--- snip ---

So far so good. We got our second view with a working MouseBehavior. But this
attemp has some sideeffects (and some more I haven't discovered - I'm pretty
sure) i.e. the cursor string is incorrectly drawn on the second canvas. VisAD
isn't aware of the second canvas. I've tried to extend some classes (i.e.
DisplayRendererJ3D, DisplayImpl, DisplayPanelJ3D...) to add a multi canvas
support, but while doing this, I realized that this a lot of work because all
the VisAD is working with only _one_ VisAdCanvasJ3D. Beside this it turns out
that VisAdCanvasJ3D is only working with DisplayImplJ3D and not with my
extention of DisplayImpl because of the type cast to DisplayImplJ3D in the
contructor of VisAdCanvasJ3D - if I'am right.

I really don't know what I should do. Adding a full functional multi
view/projection support to VisAD is too much work for me in my project. So, I
guess I will use the way I described and try to bypass the sideeffects with
some workarounds. But I'am still very intrested in a more "VisAD conform"
solution of this problem. If anyone got a good idea to integrate another
view/projection into VisAD I would be very happy and thankfull.


----- Original Message -----
From: "Bill Hibbard" <billh@xxxxxxxxxxxxx>
To: "Finn Klug" <finn.klug@xxxxxxxxx>
Sent: Thursday, May 01, 2003 5:16 PM
Subject: Re: Adding 2nd view for holoscreen floor projection

> Hi Finn,
> I'm at a meeting and can't devote much time to this, but
> what you need for this is to develop a new extension of
> DisplayRendererJ3D. Use that class and DefaultDisplayRendererJ3D
> as guides. You would pass an instance of your extenson to
> the DisplayImplJ3D constructor. It is in the DisplayRenderer
> that the scene graph is created and linked to Java3D. You'd
> need to figure out how to have two Views in your scene
> graph.
> Good luck,
> Bill
> ----------------------------------------------------------
> Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
> hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
> On Thu, 1 May 2003, Finn Klug wrote:
> > Hello,
> >
> > I'am trying to figure out how the best way is to add a second
> > view/perspective of a visad scene to the Java3D scenegraph (or JFrame).
> > This second view needs to have a different viewing transformation, but that
> > didn't seem to be the problem. It's just a different view of the scene,
> > transformed to be the floor projection of a 2-sided (wall+floor) holobench.
> > I'am still having problems to find the common way to add this second
> > perspective. Later the two views need to be linked in a way to do the same
> > interaction with the scene (orbit/translate) on both screens. But atm I'am
> > happy for every hint to add this second view in a proper way.
> >
> > Thanks in advance,
> > Finn
> >
> >
> >
> >
> >

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: