Dark area in the paraview python screen shot

痴心易碎 提交于 2019-12-08 11:02:04

问题


I was working on a python script which runs with pvbatch on a server.

It create a slice of a vtm file and store it as a png file.

The screen shot looks fine when I run the script directly on the server. However, when I remotely log on the server via ssh, the screen shot looks dark:

left image: remote, right image: direct I tired to change the lighting using:

 slice1Display.Specular = 0.0
 slice1Display.Opacity = 1.0

But it doesn't work. Any thought?


回答1:


NVM guys, just found a helpful link: enter link description here

Looks like this solved my problem:

RenderView1 = GetRenderView() 

# Turn off "Head Light" 
RenderView1.LightSwitch = 0 

# Turn off "Light Kit" 
RenderView1.UseLight = 0 

r = GetDisplayProperties(slice,RenderView1) 
r.Ambient = 1.0 
r.Diffuse = 0.0


来源:https://stackoverflow.com/questions/34146768/dark-area-in-the-paraview-python-screen-shot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!