MCPcopy Create free account
hub / github.com/XPandora/PhysGaussian / initialize_resterize

Function initialize_resterize

utils/render_utils.py:29–56  ·  view source on GitHub ↗
(
    viewpoint_camera,
    pc: GaussianModel,
    pipe,
    bg_color: torch.Tensor,
    scaling_modifier=1.0,
)

Source from the content-addressed store, hash-verified

27
28
29def initialize_resterize(
30 viewpoint_camera,
31 pc: GaussianModel,
32 pipe,
33 bg_color: torch.Tensor,
34 scaling_modifier=1.0,
35):
36 # Set up rasterization configuration
37 tanfovx = math.tan(viewpoint_camera.FoVx * 0.5)
38 tanfovy = math.tan(viewpoint_camera.FoVy * 0.5)
39
40 raster_settings = GaussianRasterizationSettings(
41 image_height=int(viewpoint_camera.image_height),
42 image_width=int(viewpoint_camera.image_width),
43 tanfovx=tanfovx,
44 tanfovy=tanfovy,
45 bg=bg_color,
46 scale_modifier=scaling_modifier,
47 viewmatrix=viewpoint_camera.world_view_transform,
48 projmatrix=viewpoint_camera.full_proj_transform,
49 sh_degree=pc.active_sh_degree,
50 campos=viewpoint_camera.camera_center,
51 prefiltered=False,
52 debug=pipe.debug,
53 )
54
55 rasterize = GaussianRasterizer(raster_settings=raster_settings)
56 return rasterize
57
58
59def load_params_from_gs(

Callers 1

gs_simulation.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected