Skip to content

Chapter 11 Section 11.2 Fast Rendering by Rasterization coding errors #8

@elliotskim

Description

@elliotskim

The following issues are present in section 11.2 only.

The conversion from local space to world space for vertex points is missing a cast and therefore fails to compile:

[original code]
vertex_points = [v + xform.GetTranslateOp().Get() for v in vertex_points]

[modified code]
vertex_points = [v + Gf.Vec3f(xform.GetTranslateOp().Get()) for v in vertex_points]

The cast is present in section 11.3 - Rendering via Ray Tracing

The initialization of the image buffer does not compile due to the trailing '=' sign:

[original code]
image_data = np.zeros(shape = (resolution, resolution, 3), dtype=np.uint8)=

[modified code]
image_data = np.zeros(shape = (resolution, resolution, 3), dtype=np.uint8)

The trailing equal sign is not present in section 11.3 - Rendering via Ray Tracing

These errors are present in both chapters/11.md and code_and_assets/Ch11/code_ch11.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions