<div dir="ltr">Hi Jian,<div><br></div><div>You may create a field using the calculator and use a lookup table. This should work if you managed to get the color rights based on real scalar field.</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 4:21 PM, Jian Cheng <span dir="ltr"><<a href="mailto:jian.cheng.1983@gmail.com" target="_blank">jian.cheng.1983@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 bgcolor="#FFFFFF" text="#000000">
    <div>Hi Sebastien, <br>
      <br>
      Thanks very much for your reply. <br>
      I think you gave a correct reason. <br>
      <br>
      Based on your suggestion on Paraview, I tried paraview 3.98.1 in
      my laptop, it visualized the vtk file correctly. <br>
      However when I save the file into webgl, then opened the html
      file, the color of the result is not correct (i.e. not the rgba
      color), maybe because the same reason you just mentioned. <br>
      For paraview 3.98.1, I noticed that no matter how I changed the
      second <span lang="en">Drop-down menu</span> (magnitude,
      0,1,2,3), the visualization does not change. <br>
      <img src="cid:part1.04030405.04000909@gmail.com" alt=""><br>
      <br>
      Then I downloaded the latest paraview 4.3.1, both the color of
      visualization in paraview and color of saved html file are not
      correct. <br>
      I noticed that when I changed the second <span lang="en">Drop-down
        menu</span> (magnitude, 0,1,2,3), the visualization color now
      changes, because paraview uses one of the scalar values. <br>
      <img src="cid:part1.04030405.04000909@gmail.com" alt=""><br>
      <br>
      Do you have any suggestion on how to solve the issue the paraview?
      Thanks. <br>
      <br>
      best,<br>
      Jian Cheng<span class=""><br>
      <br>
      On 07/27/2015 02:13 PM, Sebastien Jourdain wrote:<br>
    </span></div>
    <blockquote type="cite"><span class="">
      <div dir="ltr">Hi Jian,
        <div><br>
        </div>
        <div>the reason here is that the data you try to look at is not
          a scalar field but a RGBA type of information. </div>
        <div>The WebGL exported is looking for a field (I think) and get
          confused.</div>
        <div><br>
        </div>
        <div>You may need to generate a field here and use a lookup
          table with it. You can also try to use ParaView to load and
          export the data in WebGL.</div>
        <div><br>
        </div>
        <div>Seb </div>
      </div>
      </span><div class="gmail_extra"><br>
        <div class="gmail_quote"><br><span class="">
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<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/opensource/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_FAQ</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=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/mailman/listinfo/vtkusers</a><br>
            <br>
          </blockquote>
        </span></div>
        <br>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>