Skip to content

CreatePLYMesh #27

@wahn

Description

@wahn

From the pbrt-v3 Input File Format documentation:

Shapes are specified with the Shape directive:

> rg 'Shape "plymesh"' assets/scenes/veach-mis/mis.pbrt
53:    Shape "plymesh" "string filename" ["geometry/plate1.ply"]
58:    Shape "plymesh" "string filename" ["geometry/plate2.ply"]
63:    Shape "plymesh" "string filename" ["geometry/plate3.ply"]
68:    Shape "plymesh" "string filename" ["geometry/plate4.ply"]
73:    Shape "plymesh" "string filename" ["geometry/floor.ply"]

A few additional shapes are available for convenience; these immediately convert themselves to instances of the Triangle shape when the scene description is loaded.

pbrt can also directly read triangle meshes specified in the PLY mesh file format, via the "plymesh" shape.

There are a couple of scene files using this method, so it would be nice to implement the C++ function CreatePLYMesh:

std::vector<std::shared_ptr<Shape>> CreatePLYMesh(
    const Transform *o2w, const Transform *w2o, bool reverseOrientation,
    const ParamSet &params,
    std::map<std::string, std::shared_ptr<Texture<Float>>> *floatTextures =
        nullptr);

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions