[Chimera-users] get near/far clip positions?

Oliver Clarke olibclarke at gmail.com
Mon Sep 25 08:01:21 PDT 2017


I would like to write a script to progressively go through the current scene in n depth steps, saving an image with depth cueing off at each step. I want to do this so I can manually apply depth cueing and DoF effects in post processing.

For example, if the near and far clip position are at 0 and 100, and I want to split the scene into 4 depth slabs, I’d like to take images with (near,far)=(0,25),(25,50),(50,75),(75,100).

Is there any way in the scripting interface to get the positions of the global clipping planes, so I can calculate how thick each slab should be?


Script (example pseudocode):

scene tmp save

set depth cueing off


near_clip=0 (would like to get this position from current scene)

far_clip=100 (would like to get this position from current scene)



set far clipping plane to (near_clip+thickness_per_step)

for i in range (1,depth_steps+1):
  save image_%i
  section thickness_per_step

scene tmp reset.

More information about the Chimera-users mailing list