googlevr / seurat

Seurat is a scene simplification technology designed to process very complex 3D scenes into a representation that renders efficiently on mobile 6DoF VR systems.
Apache License 2.0
872 stars 94 forks source link

ERROR: Headbox has zero extend along at least one dimension. #16

Open FrankEscobar opened 6 years ago

FrankEscobar commented 6 years ago

I've tried to replicate the maya script insinde 3dsmax but when I run the output file it triggers this error:

ERROR: Headbox has zero extend along at least one dimension. Arbitrarily setting binning near clipping plane to 0.1 units from headbox center. ... ERROR: Point is outside of the frustrum used for binning. Possible causes for this problem: geometry inside the headbox, incorrect matrices, incorrect depth values, other errors in the generation process. (Showing only the first error)

Any idea on this?

I'm not sure if the content of my file could help


{
    "view_groups": [
        {
            "views": [
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_f.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_f.exr",
                            "channel_0": "R"
                        }
                    }
                },
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            -1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_b.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_b.exr",
                            "channel_0": "R"
                        }
                    }
                },
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_l.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_l.exr",
                            "channel_0": "R"
                        }
                    }
                },
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_r.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_r.exr",
                            "channel_0": "R"
                        }
                    }
                },
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_d.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_d.exr",
                            "channel_0": "R"
                        }
                    }
                },
                {
                    "projective_camera": {
                        "image_width":512,
                        "image_height":512,
                        "clip_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            -1.00167,
                            -0.0200167,
                            0.0,
                            0.0,
                            -1.0,
                            0.0
                        ],
                        "world_from_eye_matrix": [
                            1.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0,
                            -0.5,
                            0.0,
                            0.0,
                            0.0,
                            0.0,
                            1.0
                        ],
                        "depth_type": "EYE_Z"
                    },
                    "depth_image_file": {
                        "color": {
                        "path": "cosita_color_1MM_u.png",
                            "channel_0": "R",
                            "channel_1": "G",
                            "channel_2": "B",
                            "channel_alpha": "CONSTANT_ONE"
                        },
                        "depth": {
                            "path": "cosita_depth_1MM_u.exr",
                            "channel_0": "R"
                        }
                    }
                }
            ]
        }
    ]
}
davejrichardson commented 6 years ago

Hi Frank, it looks like this capture has one sample location (but covering a cube in the various cube face directions). This means the captured headbox has no extent in any dimension. An empty or point-extent headbox foils some important calculations. Try at least two samples with differing positions on each axis.

davejrichardson commented 6 years ago

I'll try and clarify my comment. You need at least two view groups, and they need to be on different coordinates on each axis, like opposite corners of a cube. Otherwise the extent of the headbox will be zero on one or more axes.