问题
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