Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

surfaces are rendered in parallel that should not be visible #1297

Open
mlohry opened this issue May 15, 2024 · 4 comments
Open

surfaces are rendered in parallel that should not be visible #1297

mlohry opened this issue May 15, 2024 · 4 comments

Comments

@mlohry
Copy link

mlohry commented May 15, 2024

this image is a render of a field with a camera positioned above a wing, where the surface topology is defined by tris in 3D space. geometric entities on the lower side that shouldn't be visible are seen in the render -- the flap farings, and the aft part of the engine nacelle. this was done on 28 ranks:

image

running the same flow on 1 rank i see the expected output:

image

@mlohry
Copy link
Author

mlohry commented May 16, 2024

In the above bad image, I was giving conduit/ascent only the connectivity for the surface elements, but it still had all the solution and coordinate information for the volume vertexes. I removed all that and left only those on the surface, purely to make the file exports smaller, but that seems to have inadvertently fixed the render issue so now it looks fine in parallel.

image

@mlohry
Copy link
Author

mlohry commented May 17, 2024

Digging deeper I think there might be an issue here related to multiple topologies. I have the following input:

-
  action: "add_scenes"
  scenes:
    s2:
      plots:
        p1:
          type: "pseudocolor"
          field: "p_surface"
      renders:
        r1:
          image_width: 1600
          image_height: 2400
          image_prefix: "./pressure_planform_view_surface_only_%06d"
          camera:
            fov: 30.0
            look_at: [1440.0,686.0,182.0]
            position: [1440.0,686.0,8274.0]
            up: [0.0, 1.0, 0.0]
            zoom: [2.7]

I'm providing conduit with two topologies and corresponding solutions named like data["topologies/volume/coordset"] = "volume_coords" and data["topologies/surface/coordset"] = "surface_coords" along with their own connectivities. Field data is specified like data["fields/p/topology"] = "volume" and data["fields/p_surface/topology"] = "surface".

When rendering p_surface (and only in parallel) I'm getting the above bad image with artifacts of the back side showing through. Then when I simply removed all the volume data leaving only the one surface topology, I get the correct render. So somehow the p_surface render is "seeing" the volume topology when my understanding from discussion in #1296 that these should effectively be separate. Maybe some place not checking for topology name and just taking the first available by default?

@cyrush
Copy link
Member

cyrush commented May 17, 2024

Thanks for the updated info, I will see if I can reproduce and get to the bottom of this.

@cyrush
Copy link
Member

cyrush commented May 21, 2024

There issue here is the original spatial extents of the overall dataset are impacting the camera.

Specifically the near and far clipping plane.
The volume is very large compared to the other dataset, leading to a near clipping plane that is beyond the dataset.
That is what causes the mesh to render in a way that looks inside out.

This can be avoided by providing the near_plane and far_plane camera options, or by providing dataset_bounds

Here is an example set of actions:

-
  action: "add_scenes"
  scenes:
    s2:
      plots:
        p1:
          type: "pseudocolor"
          field: "p_surface"
      renders:
        r1:
          image_width: 1600
          image_height: 2400
          image_prefix: "./tout_pressure_view_surface_and_volume_%06d"
          camera:
            fov: 30.0
            look_at: [1440.0,686.0,182.0]
            position: [1440.0,686.0,8274.0]
            up: [0.0, 1.0, 0.0]
            zoom: [2.7]
            # GOOD SETTINGS!
            # near_plane: 274.769
            # far_plane: 27476.9
            # BAD SETTINGS
            # near_plane: 8274
            # far_plane: 827400
            # fix with dataset bounds
            dataset_bounds: [92.5, 2562, 0, 1159.93, 17.7024, 343.14]

While exploring this I noticed that the near_plane and far_plane camera params were not being output as part of Ascent::info(). #1299 resolves that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants