Opened 6 years ago

Closed 6 years ago

#2560 closed defect (fixed)

Unexpected lighting change when volume morphing

Reported by: jaremko@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Graphics Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 0.91 (2019-10-10)
Description
When using scaleFactors (with any values other than 1,1) in volume morph, the lighting changes from lighting soft to a flat volume.

Log:
> ui mousemode rightMode zoom

> lighting soft

> graphics silhouettes true

> hide atoms

> show cartoons

> surface dust all

Error running startup command 'surface dust all': No surfaces specified  
UCSF ChimeraX version: 0.91 (2019-10-10)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open "C:\Users\mattj\Google
Drive\CSHL\papers\x108\figures\fig3\focus_refine_res.cxs" format session

opened ChimeraX session  

> close session

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job297/run_it010_class001.mrc

Opened run_it010_class001.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.000576, step 2, values float32  

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job297/run_it010_class002.mrc

Opened run_it010_class002.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.000639, step 2, values float32  

> morph #1 #2

Require at least 2 structures for morph  

> morph #1,2

Require at least 2 structures for morph  

> volume morph #1,2

> volume morph #3

Traceback (most recent call last):  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\core\triggerset.py", line 130, in invoke  
return self._func(self._name, data)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 153, in next_frame_cb  
if not self.interpolate(next_f):  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 67, in interpolate  
f1, f2, v1, v2 = self.coefficients(f)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 89, in coefficients  
f0 = float(i0)/(n-1)  
ZeroDivisionError: float division by zero  
  
Error processing trigger "new frame":  
ZeroDivisionError: float division by zero  
  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 89, in coefficients  
f0 = float(i0)/(n-1)  
  
See log for complete Python traceback.  
  

> volume morph #1,2

> hide #!3 models

> close #3

> close #4

> volume morph #1,2 frames 50

> volume morph #1,2 frames 50 modelId #3

> volume morph #1,2 frames 50 modelId #3

> volume morph #1,2 frames 50 modelId #3

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class001.mrc
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class002.mrc
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class003.mrc
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class004.mrc
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class005.mrc

Opened run_it010_class001.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.00105, step 2, values float32  

> volume all level .002

> volume all level .0025

> volume all level .0018

> volume all step 1

> surface dust all

> tile

> tile spacingFactor 1.2

> tile spacingFactor 1.3

> tile spacingFactor 1.4

> tile spacingFactor 1.4

> volume morph #4.4,4.3,4.1 frames 50

Traceback (most recent call last):  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 254, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2837, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\vopcommand.py", line 633, in volume_morph  
hide_original_maps, interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 271, in morph_maps  
interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
IndexError: list index out of range  
  
IndexError: list index out of range  
  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
  
See log for complete Python traceback.  
  

> tile spacingFactor 0

> volume morph #4.4,4.3,4.1 frames 50

Traceback (most recent call last):  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 254, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2837, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\vopcommand.py", line 633, in volume_morph  
hide_original_maps, interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 271, in morph_maps  
interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
IndexError: list index out of range  
  
IndexError: list index out of range  
  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
  
See log for complete Python traceback.  
  

> volume morph #4.4,4.3,4.1

Traceback (most recent call last):  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 254, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2837, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\vopcommand.py", line 633, in volume_morph  
hide_original_maps, interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 271, in morph_maps  
interpolate_colors, subregion, step, model_id)  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
IndexError: list index out of range  
  
IndexError: list index out of range  
  
File "C:\Program Files\ChimeraX_20191014\bin\lib\site-
packages\chimerax\map\filter\morph.py", line 21, in __init__  
v0 = volumes[0]  
  
See log for complete Python traceback.  
  

> close #4

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class001.mrc

Opened run_it010_class001.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.00105, step 2, values float32  

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class002.mrc

Opened run_it010_class002.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.000883, step 2, values float32  

> open
C:/Users/mattj/Documents/cryoem_chimera/2018-12-27_x108/relionnew/Class3D/job296/run_it010_class004.mrc

Opened run_it010_class004.mrc, grid size 320,320,320, pixel 1.07, shown at
level 0.000894, step 2, values float32  

> surface dust all

> volume all level .0018

> volume all step 1

> volume morph #4,5,6

> volume morph #4,5,6 modelId #7

> volume morph #4,5,6 modelId #7

> volume morph #4,5,6 modelId #7

> volume morph #4,5 modelId #7

> volume morph #4,5 modelId #7

> volume morph #4,5 modelId #7 constantVolume true

> volume morph #4,6 modelId #7

> volume morph #4,6 modelId #7

> volume morph #4,6 modelId #7 scaleFactors 1, 1.2

> volume morph #4,6 modelId #7 scaleFactors 1,1.1

> volume morph #4,6 modelId #7 scaleFactors 1,1.1

> volume morph #4,6 modelId #7 scaleFactors 1,1

> volume morph #4,6 modelId #7 scaleFactors 1,2

> volume morph #4,6 modelId #7 scaleFactors 1,1

> volume morph #4,5,6 modelId #7 scaleFactors 1,1.2,1

> volume morph #4,5,6 modelId #7 scaleFactors 1,1.2,1

> volume morph #4,6 modelId #7 scaleFactors 1,1

> volume morph #4,6 modelId #7 scaleFactors 1,1

> volume morph #4,6 modelId #7 scaleFactors 1,1

> volume morph #4,6 modelId #7 scaleFactors 1,1 frames 20

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .02

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .08

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .08

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,.8 playStep .16

> lighting soft

> lighting soft

> volume #!7 style surface

> volume #!7 style mesh

> volume #!7 style surface

> volume morph #4,6 modelId #7 scaleFactors 1,.8 playStep .16

> close #7

> volume morph #4,6 modelId #7 scaleFactors 1,.8 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,.9 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> close #7

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors .9,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors .9,1 playStep .16

> close #7

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors 1,1 playStep .16

> volume morph #4,6 modelId #7 scaleFactors .9,1 playStep .16

> lighting simple

> lighting soft

> lighting full

> lighting soft




OpenGL version: 3.3.0 NVIDIA 430.86
OpenGL renderer: GeForce GTX 1050 Ti with Max-Q Design/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
File attachment: Annotation 2019-11-11 120741.png

Annotation 2019-11-11 120741.png

Attachments (1)

Annotation 2019-11-11 120741.png (189.7 KB ) - added by jaremko@… 6 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (4)

by jaremko@…, 6 years ago

Added by email2trac

comment:1 by pett, 6 years ago

Component: UnassignedGraphics
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionUnexpected lighting change when volume morphing

Reported by Matt Jaremko

comment:2 by Tom Goddard, 6 years ago

The problem is the morph surface has some transparency. This is a bug in the morph code when scaleFactors are not 1 it was producing a partially transparent surface, and ambient shadows are not shown on transparent surfaces. It works correctly if the volume morph option "interpolateColors false" is used. I'll fix this problem today.

comment:3 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Color interpolation was incorrectly using scale factors.

Also fixed volume morph to give a sensible error if less than 2 volumes are specified. These caused the tracebacks in this bug report.

Note: See TracTickets for help on using tickets.