Closed rusu24edward closed 3 years ago
Hi Blaise,
I'm not aware of a tool in Visit that outputs the View3DAttributes from the inputs you specify. You may be able to derive something yourself from a couple of samples. If you open the gui and record your commands (Controls->Command), you can set the view in the Viewer, and Visit will produce the View3DAttributes for that view. Here is a list of View3DAttributes that you can tweak.
Eddie
Hi Eddie,
Do you happen to have a picture that describe the meaning of these vectors?
I assume that if C is the camera and F is the focus point, viewNormal is parallel to CF and that viewUp is orthogonal to CF and points up in the camera coordinate system. Assuming that viewAngle is either the solid angle of the field of view or the angle of a cone containing the field of view, I can compute the distance from the camera to the focus point, but don’t know how to pass this value.
Also, what do are nearPlane, farPlane, parallelScale, imagePan, imageZoom?
Regards, Blaise
On Sep 8, 2020, at 12:16 PM, Edward Rusu via visit-users visit-users@elist.ornl.gov wrote:
Hi Blaise,
I'm not aware of a tool in Visit that outputs the View3DAttributes from the inputs you specify. You may be able to derive something yourself from a couple of samples. If you open the gui and record your commands (Controls->Command), you can set the view in the Viewer, and Visit will produce the View3DAttributes for that view. Here is a list of View3DAttributes that you can tweak.
Eddie
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
-- VisIt Users Wiki: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvisitusers.org%2F&data=02%7C01%7Cbourdin%40lsu.edu%7C1293e2ade5c24533828908d8541ae72c%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351821814376014&sdata=1aTEipPZ0oz0gPDSMIKc527ElRf5RWdUQfPMZoJJCls%3D&reserved=0 Frequently Asked Questions for VisIt: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwci.llnl.gov%2Fsimulation%2Fcomputer-codes%2Fvisit%2FFAQ.html&data=02%7C01%7Cbourdin%40lsu.edu%7C1293e2ade5c24533828908d8541ae72c%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351821814376014&sdata=1k6%2FJq8ItGjztwX2xbHYs5ndIl2UTj4ai%2F8K0mSPAOQ%3D&reserved=0 To Unsubscribe: send a blank email to visit-users-unsubscribe@elist.ornl.gov More Options: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Felist.ornl.gov%2Fmailman%2Flistinfo%2Fvisit-users&data=02%7C01%7Cbourdin%40lsu.edu%7C1293e2ade5c24533828908d8541ae72c%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351821814376014&sdata=8QduaJV%2Bq4uS382nuuBsCGOvXneMyKemp6bNzboQSbo%3D&reserved=0
-- A.K. & Shirley Barton Professor of Mathematics Adjunct Professor of Mechanical Engineering Adjunct of the Center for Computation & Technology Louisiana State University, Lockett Hall Room 344, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 Web http://www.math.lsu.edu/~bourdin
Hi Blaise,
This link provides detailed information on how the View works in Visit. In particular, here is an image describing the vectors. Your description sounds accurate. I believe the value you are computing is related to near clipping, far clipping, and parallel scale (all of which are described in the docs I linked to), but I'm not sure exactly how those should be filled once you've computed the distance. Try playing around with a few different situations and see what works for you.
To save time, this can be scripted via the CLI using the SetView3D command.
Eddie
Hi,
Thanks, for the link.
I guess all I need is to figure out the meaning of parallelScale and how to compute it so that the region of interest fits into the view.
I am doing batch rendering with variable geometries, and was hoping to be able to compute the view properties myself. I don’t want to have to play around with the GUI for each geometry I am interested in.
Regards, Blaise
On Sep 8, 2020, at 1:52 PM, Edward Rusu via visit-users visit-users@elist.ornl.gov wrote:
Hi Blaise,
This link provides detailed information on how the View works in Visit. In particular, here is an image describing the vectors. Your description sounds accurate. I believe the value you are computing is related to near clipping, far clipping, and parallel scale (all of which are described in the docs I linked to), but I'm not sure exactly how those should be filled once you've computed the distance. Try playing around with a few different situations and see what works for you.
To save time, this can be scripted via the CLI using the SetView3D command.
Eddie
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
-- VisIt Users Wiki: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvisitusers.org%2F&data=02%7C01%7Cbourdin%40lsu.edu%7Cf68c61e243c5484a3f4f08d854286035%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351879677271754&sdata=rxWdRitf2NA9XErht0OZIvmbMf5DScj63RQzZC%2B7Ltw%3D&reserved=0 Frequently Asked Questions for VisIt: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwci.llnl.gov%2Fsimulation%2Fcomputer-codes%2Fvisit%2FFAQ.html&data=02%7C01%7Cbourdin%40lsu.edu%7Cf68c61e243c5484a3f4f08d854286035%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351879677271754&sdata=%2FEYJ8pGIBEhcCp65emhASYg0fpEC0yW0AqMHF%2FaqRQA%3D&reserved=0 To Unsubscribe: send a blank email to visit-users-unsubscribe@elist.ornl.gov More Options: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Felist.ornl.gov%2Fmailman%2Flistinfo%2Fvisit-users&data=02%7C01%7Cbourdin%40lsu.edu%7Cf68c61e243c5484a3f4f08d854286035%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351879677271754&sdata=RnONK13TMHKfiqMuzXSqdMAFfrpfkERbl5FbU3eg1lw%3D&reserved=0
-- A.K. & Shirley Barton Professor of Mathematics Adjunct Professor of Mechanical Engineering Adjunct of the Center for Computation & Technology Louisiana State University, Lockett Hall Room 344, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 Web http://www.math.lsu.edu/~bourdin
The parallel scale is best explained for a parallel projection. It is the half the height of an object in the window. For example, if you had a sphere of radius 10, setting the parallel scale to 10, would result in the top and bottom of the sphere touching the top and bottom of the image. Where the sphere touches on the left and right edges depends on the aspect ratio of the image. If it was 1:1, then the sphere would also touch the left and right edges of the image. When doing a perspective image, it attempts to have the top and bottom of the sphere touch the top and bottom of the image.
Here is an image with a sphere of radius 10 with a parallel scale of 10, first in parallel projection mode then in perspective projection mode.
parallel projection
perspective projection
For the perspective case, the height of the object would correspond to the height in the plane containing the focus. This isn't quite right, but it should be close.
Perfect. This really help!
Blaise
On Sep 8, 2020, at 3:03 PM, Eric Brugger via visit-users visit-users@elist.ornl.gov wrote:
The parallel scale is best explained for a parallel projection. It is the half the height of an object in the window. For example, if you had a sphere of radius 10, setting the parallel scale to 10, would result in the top and bottom of the sphere touching the top and bottom of the image. Where the sphere touches on the left and right edges depends on the aspect ratio of the image. If it was 1:1, then the sphere would also touch the left and right edges of the image. When doing a perspective image, it attempts to have the top and bottom of the sphere touch the top and bottom of the image.
Here is an image with a sphere of radius 10 with a parallel scale of 10, first in parallel projection mode then in perspective projection mode.
parallel projection
perspective projection
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
-- VisIt Users Wiki: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvisitusers.org%2F&data=02%7C01%7Cbourdin%40lsu.edu%7C031b09ec10864168246608d854324af6%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351922282455187&sdata=M5QLz7Q7NNJ%2BQS9M4HOJu5yfLmlUarG1c2%2FyoGpw%2FN4%3D&reserved=0 Frequently Asked Questions for VisIt: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwci.llnl.gov%2Fsimulation%2Fcomputer-codes%2Fvisit%2FFAQ.html&data=02%7C01%7Cbourdin%40lsu.edu%7C031b09ec10864168246608d854324af6%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351922282455187&sdata=qfbSG6WYg2y0vlXtp3mzp6Gc8i7jw16b7a540lIuWpc%3D&reserved=0 To Unsubscribe: send a blank email to visit-users-unsubscribe@elist.ornl.gov More Options: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Felist.ornl.gov%2Fmailman%2Flistinfo%2Fvisit-users&data=02%7C01%7Cbourdin%40lsu.edu%7C031b09ec10864168246608d854324af6%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637351922282455187&sdata=bjhNILB1IXgy5KLR1h4h5M%2FxAbEGCgKQd7%2BBSWqgUdc%3D&reserved=0
-- A.K. & Shirley Barton Professor of Mathematics Adjunct Professor of Mechanical Engineering Adjunct of the Center for Computation & Technology Louisiana State University, Lockett Hall Room 344, Baton Rouge, LA 70803, USA Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 Web http://www.math.lsu.edu/~bourdin
We're trying to combine
visit-users
email list with GitHub issues. When replying onvisit-users
, please reply only to emails with a Subject line that includes[visit-dav/live-customer-response]
.Hi,
Is there a easy way to compute View3D attributes knowing the relative position of the observer and focus point (preferably relative azimuth and polar angle) and the bounding box of the region to be observed assuming a standard field of view (say the equivalent of a standard 50mm lens or typical human eye)?
Regards, Blaise