Can I make a mirror?

Tom G. Smith smitty at kcc.com
Mon Dec 6 08:36:30 EST 1999


Yes, it really has been fun.  The Moebius Strip is for a logo to be
used in an html document announcing an internal symposium my company is
conducting in the year 2000.  There's probably an easier way of doing
it with a vtkWriter, when I get that far learning vtk, but what I'm
doing now is repeatedly capturing the display into GIF files using the
import utility of ImageMagick, using the interactor between captures
to rotate the object about 8 or 9 degrees.  Then I use another utility
called whirlgif (available at http://www.msg.net/utility/whirlgif)
to combine the all the GIFs into a single animated gif that shows
the Moebius Strip whirling around its vertical axis.

I'm not afraid of a little work, but what you describe sounds a bit
daunting.  If I understand correctly, I'd have to build a different
texture map image of the underside perspective each time the Moebius
Strip is rotated around its vertical axis, and map that onto the
mirror for that frame of the animation.

Before I go that route, I want to make sure I understand
correctly.  The book, "The Visualization ToolKit" on page 46 says,
referring to ambient, diffuse and specular lighting for an object,
"Different combinations of these property values can simulate
dull plastic and polished metal."  Based on that, I figured I'm just
doing something wrong in my vtk script.  Is it true I can't model a
perfectly reflective surface, i.e. a mirror, in vtk by manipulating
surface material properties?

> 
> Hey Tom, 
> 
> 	Sounds like fun! :)  I think more of what you may want to do however, is
> like environment mapping... one way that you could support this in vtk is
> to actually pre-render an image from the viewpoint of the mirror... so that
> you could use this image as a texture map to apply to the mirror when
> rendering from your real camera's viewpoint...  This will work fine if this
> is some precomputed animation... however, if you want a more interactive
> session then you would probably want something like a
> vtkOpenGL/MesaOffscreenRenderWindow...  I don't know if these are available
> in the current distribution, but if your interested... I think we have some
> that I could share with a little clean up work...  
> 	I hope this reply has been helpful to you, and not just added more work to
> your plate! :)
> 
> Sincerely, 
> 
> Rob Stein
> 
> 
> At 02:33 PM 12/3/99 -0600, you wrote:
> >You'll see in the attached Tcl script, I'm displaying a Moebius Strip,
> >and I'm trying to implement a refective mirror underneath it that
> >remains oriented to the camera, and shows the reflection of the
> >underside of the Moebius Strip as the camera rotates around it.
> >But regardless of what I do with the Specular, Ambient, and Diffuse
> >parameters, nothing shows up in the mirror.
> >
> >A second problem I'm having is, the mirror seems to wobble as I
> >move the camera.  I suspect this is because I'm using the wrong
> >coordinate system to orient the mirror, but if anybody has a suggestion,
> >it'd be appreciated.
> 
> Robert J. Stein
> National Center For Supercomputing Applications
> 405 N. Matthews, Urbana, IL
> (217) 244-7584
> rstein at ncsa.uiuc.edu
> 


-- 


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list