<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>If I run the following script, the text actor (set
to white) picks up color from the texture. I've tried this on a GeForce2
and an ATI Rage-Pro with the same results. Has any one else observed this
behaviour? I'm prototyping a dynamic environment, in which the user can
arbitrarily add pipelines, so I can't control the order of actor creation. I'm
using 3.1 - if this vanishes on later versions I guess it's time to upgrade
:)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks for any assistance</FONT></DIV>
<DIV><FONT face=Arial size=2>Malcolm</FONT></DIV>
<DIV><FONT face=Arial
size=2>-----------------------------------------------------------------------------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>catch {load vtktcl}<BR>if { [catch {set VTK_TCL
$env(VTK_TCL)}] != 0} { set VTK_TCL "../../examplesTcl" }<BR>if { [catch {set
VTK_DATA $env(VTK_DATA)}] != 0} { set VTK_DATA "../../../vtkdata" }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># get the interactor ui<BR>#source
$VTK_TCL/vtkInt.tcl</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># Create the RenderWindow, Renderer and both
Actors<BR>vtkRenderer ren1<BR>vtkRenderWindow renWin<BR>
renWin AddRenderer ren1<BR>vtkRenderWindowInteractor iren<BR>
iren SetRenderWindow renWin</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>vtkTextMapper mapText<BR> mapText
SetFontFamilyToArial<BR> mapText SetFontSize 11<BR> mapText
BoldOn<BR> mapText ShadowOff<BR>vtkActor2D actText<BR> actText
SetMapper mapText<BR>ren1 AddActor2D actText</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>mapText SetInput "This should be white"<BR>mapText
SetJustificationToCentered <BR>actText SetPosition 250 50 <BR>eval [actText
GetProperty] SetColor 1 1 1</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># create a plane source and actor<BR>vtkPlaneSource
plane<BR>vtkPolyDataMapper planeMapper<BR>planeMapper SetInput [plane
GetOutput]<BR>vtkActor planeActor<BR>planeActor SetMapper
planeMapper</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR># load in the texture map<BR>#<BR>vtkTexture
atext<BR>vtkPNMReader pnmReader<BR>pnmReader SetFileName
"$VTK_DATA/masonry.ppm"<BR>atext SetInput [pnmReader GetOutput]<BR>atext
InterpolateOn<BR>planeActor SetTexture atext</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># Add the actors to the renderer, set the
background and size<BR>ren1 AddActor planeActor<BR>ren1 SetBackground 0.1 0.2
0.4<BR>renWin SetSize 500 500</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># render the image<BR>iren SetUserMethod {wm
deiconify .vtkInteract}<BR>renWin Render</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>set cam1 [ren1 GetActiveCamera]<BR>$cam1 Elevation
-30<BR>$cam1 Roll -20<BR>ren1 ResetCameraClippingRange<BR>renWin
Render</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#renWin SetFileName "TPlane.tcl.ppm"<BR>#renWin
SaveImageAsPPM</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># prevent the tk window from showing up then start
the event loop<BR>wm withdraw .<BR></FONT></DIV></BODY></HTML>