Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8520 closed defect (not a bug)

View matrix issue

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

Description

Hello,

The view matrix camera values are not applying the correct zoom. Do you have the same issue on your end? Am I doing something wrong? The x and y coordinates seem to be fine.

Example command after view matrix to collect values:
view matrix camera 0.41708,0.090116,0.90439,476.77,-0.90887,0.039777,0.41518,316.79,0.0014406,-0.99514,0.098494,204.14

Thank you,
Matt

Matt J. Jaremko, Ph.D. (He|Him)
Senior Scientist | Protein & Structural Chemistry
Merck Research Labs | 2000 Galloping Hill Rd. | Kenilworth, NJ 07033
Office:  908.740.5613 | Cell:  808.741.6277 | Email:  matt.jaremko@merck.com<mailto:matt.jaremko@merck.com>

This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (126 East Lincoln Ave., P.O. Box 2000, Rahway, NJ USA 07065) and/or its affiliates, that may be confidential, proprietary copyrighted and/or legally privileged.   (Direct contact information for affiliates is available at - Contact us - MSD<https://www.msd.com/contact-us/>.)  It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

Change History (11)

comment:1 by pett, 3 years ago

Component: UnassignedGraphics
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned

comment:2 by Tom Goddard, 3 years ago

You'll need to provide more info. Are you saying that you use the "view matrix" command to report the camera position and then immediately use those parameters to in another "view matrix camera ..." and it changes the camera view? It doesn't change the view in my tests.

comment:3 by Tom Goddard, 3 years ago

By the way, the more common way to set the camera position of a specific view is to use the "view name myview1" command the current camera and model positions then later restore them with "view myview1". But if you just want the camera position restored without changing model positions then "view matrix" is the way to go.

in reply to:  4 ; comment:4 by matt.jaremko@…, 3 years ago

Hi Tom,

Yes, this is what I am asking. The z axis (zoom) dimension is not changing on my end. My Mac automatically update to Ventura and maybe this messed up the ChimeraX graphics (everything else is working though). Would this happen? Would it be worth re-installing ChimeraX?

BTW, I used to use the view command, but I prefer relying on scripts, not sessions.

Thanks,
Matt

On 2/17/23, 2:08 PM, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote:


EXTERNAL EMAIL– Use caution with any links or file attachments.


#8520: View matrix issue
-------------------------------------+-------------------------
Reporter: matt.jaremko@… | Owner: Tom Goddard
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: Graphics | Version:
Resolution: | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
-------------------------------------+-------------------------


Comment (by Tom Goddard):


You'll need to provide more info. Are you saying that you use the "view
matrix" command to report the camera position and then immediately use
those parameters to in another "view matrix camera ..." and it changes the
camera view? It doesn't change the view in my tests.


--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:2> <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:2&gt;>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> <https://www.rbvi.ucsf.edu/chimerax/&gt;>
ChimeraX Issue Tracker



This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (126 East Lincoln Ave., P.O. Box 2000, Rahway, NJ USA 07065) and/or its affiliates, that may be confidential, proprietary copyrighted and/or legally privileged.   (Direct contact information for affiliates is available at - Contact us - MSD<https://www.msd.com/contact-us/>.)  It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

comment:5 by Tom Goddard, 3 years ago

Updating your ChimeraX installation will not help.

I still need a clear description of the problem, exact steps for how to reproduce it. The view matrix camera setting is quite simple and it is unlikely there is any problem with it. Things that might change the level of zoom you see are 1) your graphics window aspect ratio is different, or 2) the model you are looking at is placed closer or further from the camera. The "view matrix camera" command places the camera in a specified position in the scene (x,y,z center, and specified orientation) so if models are at different distances from the camera they will appear zoomed differently since it is a perspective camera -- far objects look smaller than near objects.

in reply to:  6 ; comment:6 by matt.jaremko@…, 3 years ago

Hi Tom,

Here are my steps:

1. run 'view matrix'
2. copy values for view matrix camera
3. zoom out view
4. run 'view matrix camera VALUES

The view zoom (z-axis) to does not reset to the view I had during step #1. The X and Y coordinates will reset though if I happened to change those.

Hopefully that makes sense.

Thanks,
Matt

On 2/17/23, 3:36 PM, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote:


EXTERNAL EMAIL– Use caution with any links or file attachments.


#8520: View matrix issue
-------------------------------------+-------------------------
Reporter: matt.jaremko@… | Owner: Tom Goddard
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: Graphics | Version:
Resolution: | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
-------------------------------------+-------------------------


Comment (by Tom Goddard):


Updating your ChimeraX installation will not help.


I still need a clear description of the problem, exact steps for how to
reproduce it. The view matrix camera setting is quite simple and it is
unlikely there is any problem with it. Things that might change the level
of zoom you see are 1) your graphics window aspect ratio is different, or
2) the model you are looking at is placed closer or further from the
camera. The "view matrix camera" command places the camera in a specified
position in the scene (x,y,z center, and specified orientation) so if
models are at different distances from the camera they will appear zoomed
differently since it is a perspective camera -- far objects look smaller
than near objects.


--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:5> <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:5&gt;>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> <https://www.rbvi.ucsf.edu/chimerax/&gt;>
ChimeraX Issue Tracker



This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (126 East Lincoln Ave., P.O. Box 2000, Rahway, NJ USA 07065) and/or its affiliates, that may be confidential, proprietary copyrighted and/or legally privileged.   (Direct contact information for affiliates is available at - Contact us - MSD<https://www.msd.com/contact-us/>.)  It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

comment:7 by Tom Goddard, 3 years ago

Ok, I tried your 4 steps and it produced the correct original zoom level. Provide a complete set of commands, including for example opening a PDB model that produces your incorrect zoom.

comment:8 by Tom Goddard, 3 years ago

Are you using an orthographic camera instead of the default perspective camera? If so then the camera position and orientation does not determine the zoom level since distance to the models does not effect zoom in orthographic projection. The orthographic camera has a separate field width setting that controls zoom level. The camera command should have an option to control the field width, but currently it does not have that.

in reply to:  9 ; comment:9 by matt.jaremko@…, 3 years ago

Hi Tom,

That’s it! I was definitely in ortho, once I switched back to 'mono' everything worked as before. Not sure how that setting changed, but glad you made me aware of this.

Thanks!
Matt

On 2/17/23, 5:05 PM, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote:


EXTERNAL EMAIL– Use caution with any links or file attachments.


#8520: View matrix issue
-------------------------------------+-------------------------
Reporter: matt.jaremko@… | Owner: Tom Goddard
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: Graphics | Version:
Resolution: | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
-------------------------------------+-------------------------


Comment (by Tom Goddard):


Are you using an orthographic camera instead of the default perspective
camera? If so then the camera position and orientation does not determine
the zoom level since distance to the models does not effect zoom in
orthographic projection. The orthographic camera has a separate field
width setting that controls zoom level. The camera command should have an
option to control the field width, but currently it does not have that.


--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:8> <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:8&gt;>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> <https://www.rbvi.ucsf.edu/chimerax/&gt;>
ChimeraX Issue Tracker



This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (126 East Lincoln Ave., P.O. Box 2000, Rahway, NJ USA 07065) and/or its affiliates, that may be confidential, proprietary copyrighted and/or legally privileged.   (Direct contact information for affiliates is available at - Contact us - MSD<https://www.msd.com/contact-us/>.)  It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

comment:10 by Tom Goddard, 3 years ago

Resolution: not a bug
Status: assignedclosed

Glad we figured it out. I made a request to add a camera command option to set the field width (zoom level) when using the ortho camera.

in reply to:  11 ; comment:11 by matt.jaremko@…, 3 years ago

Thanks Tom!

On 2/21/23, 1:30 PM, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> wrote:


EXTERNAL EMAIL– Use caution with any links or file attachments.


#8520: View matrix issue
-------------------------------------+-------------------------
Reporter: matt.jaremko@… | Owner: Tom Goddard
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Graphics | Version:
Resolution: not a bug | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
-------------------------------------+-------------------------
Changes (by Tom Goddard):


* status: assigned => closed
* resolution: => not a bug




Comment:


Glad we figured it out. I made a request to add a camera command option
to set the field width (zoom level) when using the ortho camera.


--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:10> <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/8520#comment:10&gt;>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> <https://www.rbvi.ucsf.edu/chimerax/&gt;>
ChimeraX Issue Tracker



This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (126 East Lincoln Ave., P.O. Box 2000, Rahway, NJ USA 07065) and/or its affiliates, that may be confidential, proprietary copyrighted and/or legally privileged.   (Direct contact information for affiliates is available at - Contact us - MSD<https://www.msd.com/contact-us/>.)  It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
Note: See TracTickets for help on using tickets.