Alpine-DAV / ascent

A flyweight in situ visualization and analysis runtime for multi-physics HPC simulations
https://alpine-dav.github.io/ascent/
Other
191 stars 65 forks source link

Renderer size and image size #1312

Open FrankFrank9 opened 3 months ago

FrankFrank9 commented 3 months ago

Hello,

is there any way to set the render width and height the same of the image width and height? I was able to modify the image_width and image_depth in a render but the camera placement is never the one I would like (I try to find it from Paraview) because the render width and height are not the same of the image that I'm saving. For example in Paraview I can achieve this by modifying "window_size" in a renderer object and I set screenshot size the same as "window_size" so that the views are those I expect

Best

cyrush commented 3 months ago

@FrankFrank9. The render image width and height should be the output size of the image. Is it that the camera doesn't match what you expect with respect to a ParaView default view? Are you trying to convert a ParaView camera to an Ascent camera? Can you share any pictures with differences.

FrankFrank9 commented 3 months ago

@cyrush Thanks for the reply. I was remapping from paraview:

  1. position -> camera/position
  2. focal point -> camera/look_at
  3. view_up -> camera/up

But ascent visualization looks a bit zoomed out

Any idea on the possible reason causing this?

nicolemarsaglia commented 3 months ago

@FrankFrank9 It is difficult to say what could be happening without more information.

We still can't be sure the cameras are exactly the same or if they differ slightly. The camera information will be stored in an information node that can be accessed via the API: https://github.com/Alpine-DAV/ascent/blob/756ba13ef6f27134ce6d03b58a9383977d280219/src/tests/ascent/t_ascent_info.cpp#L79

This should give you an exhaustive list of camera properties (near plane, far plane, azimuth, zoom, elevation, etc.). Then if there is a way to get a similarly detailed camera output from Paraview we can do a better comparison.