<div dir="ltr">I used the example provided by Oliver (in his email)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 12:37 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ken,<div><br></div><div>Can you send me the code? I'll make a VTKExample...</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 12:27 PM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I just tested this and it seems to work on master. This is the image I get. Maybe this is an issue that has been fixed since 8.0 was cut?<div><br></div><div><br><div><br></div><div><img src="cid:ii_15e5d2a92357c6a0" alt="Inline image 1" width="302" height="332"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-2496824932567432611h5">On Wed, Sep 6, 2017 at 2:17 PM, Oliver Natt <span dir="ltr"><<a href="mailto:onatt@gmx.de" target="_blank">onatt@gmx.de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-2496824932567432611h5">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Dear vtkusers,</p>
    <p>I encountered a weird problem when using more than one positional
      light source in vtk. I am pretty sure that it worked with vtk 7.1
      but it stopped working with vtk 8.0.0 and 8.0.1. An example in
      python is given below. The scene contains a plane which should be
      illuminated by two spot lights. However, only one spotlight is
      rendered. It seems that this is always the first spotlight that is
      added to the renderer. Is there any workaround for this problem?</p>
    <p>Many thanks<br>
      Oliver</p>
    <p><br>
    </p>
    <pre style="background-color:#ffffff;color:#000000;font-family:'Source Code Pro';font-size:10,5pt"><span style="color:#0000dd">import </span>vtk

<span style="color:#808080"># create a rendering window and renderer
</span>renderer = vtk.vtkRenderer()
render_window = vtk.vtkRenderWindow()
render_window.AddRenderer(rend<wbr>erer)

<span style="color:#808080"># create a renderwindowinteractor
</span>iren = vtk.vtkRenderWindowInteractor(<wbr>)
iren.SetRenderWindow(render_wi<wbr>ndow)

<span style="color:#808080"># create a plane and add it to the renderer
</span>rectangle_source = vtk.vtkPlaneSource()
rectangle_source.SetOrigin(-<span style="color:#0000dd">5.<wbr>0</span>, <span style="color:#0000dd">0.0</span>, <span style="color:#0000dd">5.0</span>)
rectangle_source.SetPoint1(<span style="color:#0000dd">5.0</span><wbr>, <span style="color:#0000dd">0.0</span>, <span style="color:#0000dd">5.0</span>)
rectangle_source.SetPoint2(-<span style="color:#0000dd">5.<wbr>0</span>, <span style="color:#0000dd">0.0</span>, -<span style="color:#0000dd">5.0</span>)
rectangle_source.SetResolution<wbr>(<span style="color:#0000dd">100</span>, <span style="color:#0000dd">100</span>)
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(rect<wbr>angle_source.GetOutputPort())
actor = vtk.vtkActor()
actor.SetMapper(mapper)
renderer.AddActor(actor)

<span style="color:#808080"># set camera view
</span>renderer.ResetCamera()
camera = renderer.GetActiveCamera()
camera.Azimuth(<span style="color:#0000dd">40.0</span>)
camera.Elevation(<span style="color:#0000dd">30.0</span>)

<span style="color:#808080"># create a green light
</span>light_green = vtk.vtkLight()
light_green.SetPositional(<span style="color:#0000dd">1</span>)
light_green.SetPosition(-<span style="color:#0000dd">4.0</span>, <span style="color:#0000dd">4.0</span>, -<span style="color:#0000dd">1.0</span>)
light_green.SetColor(<span style="color:#0000dd">0.0</span>, <span style="color:#0000dd">1.0</span>, <span style="color:#0000dd">0.0</span>)
light_green.SetIntensity(<span style="color:#0000dd">0.5</span>)

<span style="color:#808080"># create a pink ligh
</span>light_pink = vtk.vtkLight()
light_pink.SetPositional(<span style="color:#0000dd">1</span>)
light_pink.SetPosition(<span style="color:#0000dd">4.0</span>, <span style="color:#0000dd">5.0</span>, <span style="color:#0000dd">1.0</span>)
light_pink.SetColor(<span style="color:#0000dd">1.0</span>, <span style="color:#0000dd">0.0</span>, <span style="color:#0000dd">1.0</span>)
light_pink.SetIntensity(<span style="color:#0000dd">0.6</span>)

<span style="color:#808080"># add lights to the renderer
</span><span style="color:#808080">#
</span><span style="color:#808080"># This is interesting in vtk 8.0.0 and 8.0.1:
</span><span style="color:#808080"># Only the pink light spot is visible. If the two statements are swapped,
</span><span style="color:#808080"># only the green light is visible. It seems that always only the first
</span><span style="color:#808080"># light can be active.
</span>renderer.AddLight(light_pink)
renderer.AddLight(light_green)

<span style="color:#808080"># define a background for better visibility
</span>renderer.SetBackground(<span style="color:#0000dd">0.2</span>, <span style="color:#0000dd">0.2</span>, <span style="color:#0000dd">0.5</span>)
renderer.SetBackground2(<span style="color:#0000dd">0.4</span>, <span style="color:#0000dd">0.4</span>, <span style="color:#0000dd">1.0</span>)
renderer.SetGradientBackground<wbr>(<span style="color:#0000dd">True</span>)

<span style="color:#808080"># enable interactor
</span>iren.Initialize()
render_window.Render()
iren.Start()
</pre>
    <pre class="m_-2496824932567432611m_-7393604587993773197m_-8368904557531736395moz-signature" cols="72"></pre>
  </div>

<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="m_-2496824932567432611HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-2496824932567432611m_-7393604587993773197gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-2496824932567432611gmail_signature" data-smartmail="gmail_signature">Unpaid intern in BillsBasement at noware dot com<br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div></div></div>
</div>