<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks guys that's roughly what I wanted to get to.<br>althought he image should fill in the window viewport. :) instead of staying right there<br><br>Many thanks!!!<br><br>&gt; From: david.gobbi@gmail.com<br>&gt; Date: Thu, 11 Feb 2010 09:24:39 -0700<br>&gt; Subject: Re: [vtkusers] set image as background<br>&gt; To: ilferraresebono@hotmail.it<br>&gt; CC: daviddoria+vtk@gmail.com; vtkusers@vtk.org<br>&gt; <br>&gt; I don't think that it is enough to just set up the layers, because by<br>&gt; default the Renderer will always erase everything and set the<br>&gt; background color.<br>&gt; <br>&gt; Try renderer-&gt;EraseOff() on all but the rear-most renderer.<br>&gt; <br>&gt; Note that EraseOff will also keep the depth buffer from being cleared<br>&gt; between renders, so you will have to manually set the camera position<br>&gt; and camera clipping planes in your background renderer so that the<br>&gt; image is just barely in front of the rear clipping plane.<br>&gt; <br>&gt;   David<br>&gt; <br>&gt; <br>&gt; On Thu, Feb 11, 2010 at 9:20 AM, Giancarlo Amati<br>&gt; &lt;ilferraresebono@hotmail.it&gt; wrote:<br>&gt; &gt; Yup, it's roughly the same structure my code has.<br>&gt; &gt; But apparently whatever is the order or the AddRenderer..... the one<br>&gt; &gt; containing the image seems prevailing over the other one<br>&gt; &gt;<br>&gt; &gt; Many thanks anyway!<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Date: Thu, 11 Feb 2010 11:08:50 -0500<br>&gt; &gt; From: daviddoria+vtk@gmail.com<br>&gt; &gt; CC: vtkusers@vtk.org<br>&gt; &gt; Subject: Re: [vtkusers] set image as background<br>&gt; &gt;<br>&gt; &gt; On Thu, Feb 11, 2010 at 10:54 AM, Giancarlo Amati<br>&gt; &gt; &lt;ilferraresebono@hotmail.it&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; mmm now it get confusing because that's the style of my code:<br>&gt; &gt;<br>&gt; &gt; this is the declaration:<br>&gt; &gt; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkRenderer&gt; L0= vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>&gt; &gt; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkCamera&gt; camL0 = vtkCamera::New();<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkRenderer&gt; L1 = vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>&gt; &gt; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkCamera&gt; camL1 = vtkCamera::New();<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkRenderWindow&gt; renderWindow =<br>&gt; &gt; vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>&gt; &gt; &nbsp;&nbsp;&nbsp; renderWindow-&gt;SetSize(720,576);<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Than I create a plane with texture the image I load up and then... I add the<br>&gt; &gt; plane to L1;<br>&gt; &gt; L0-&gt;AddActor(Scene);<br>&gt; &gt; L1-&gt;AddActor(texturedPlane);<br>&gt; &gt;<br>&gt; &gt; renderWindow-&gt;AddRenderer(L0);<br>&gt; &gt; renderWindow-&gt;AddRenderer(L1);<br>&gt; &gt;<br>&gt; &gt; and I call start() of the interactor.<br>&gt; &gt;<br>&gt; &gt; but I just got my Texture rendered..but not the 3D Model. so what u mean<br>&gt; &gt; with Layers?<br>&gt; &gt;<br>&gt; &gt; Regards.<br>&gt; &gt; Giancarlo<br>&gt; &gt;<br>&gt; &gt; I tried to make a demo of this:<br>&gt; &gt; http://www.vtk.org/Wiki/VTK/Examples/BackgroundImage<br>&gt; &gt; However, it seems like one renderer covers up the other. For now it is just<br>&gt; &gt; trying to display an ImageActor in backgroundRenderer and then a sphere in<br>&gt; &gt; sceneRenderer.<br>&gt; &gt; Thanks,<br>&gt; &gt;<br>&gt; &gt; David<br>                                               <br /><hr />Troppe caselle di posta? <a href='http://www.windowslive.it/hotmail/GestisciAltriAccount.aspx' target='_new'>Gestiscile da Hotmail!</a></body>
</html>