- mesh
A `mesh3d` or `shapelist3d` object. Pulls the vertex, index, texture coordinates,
normals, and material information. If the material references an image texture, the
`mesh$material$texture` argument should be set to the image filename. The `mesh3d` format
only supports one image texture per mesh. All quads will be triangulated.
- x
Default `0`. x-coordinate to offset the model.
- y
Default `0`. y-coordinate to offset the model.
- z
Default `0`. z-coordinate to offset the model.
- swap_yz
Default `FALSE`. Swap the Y and Z coordinates.
- reverse
Default `FALSE`. Reverse the orientation of the indices, flipping their normals.
- subdivision_levels
Default `1`. Number of Loop subdivisions to be applied to the mesh.
- verbose
Default `FALSE`. If `TRUE`, prints information about the mesh to the console.
- displacement_texture
Default `""`. File path to the displacement texture.
This texture is used to displace the vertices of the mesh based on the texture's pixel values.
- displacement_intensity
Default `1`. Intensity of the displacement effect.
Higher values result in greater displacement.
- displacement_vector
Default `FALSE`. Whether to use vector displacement.
If `TRUE`, the displacement texture is interpreted as providing a 3D displacement vector.
Otherwise, the texture is interpreted as providing a scalar displacement.
- recalculate_normals
Default `FALSE`. Whether to recalculate vertex normals based on the
connecting face orientations. This can be used to compute normals for meshes lacking them or
to calculate new normals after a displacement map has been applied to the mesh.
- override_material
Default `FALSE`. If `TRUE`, overrides the material specified in the
`mesh3d` object with the one specified in `material`.
- material
Default diffuse
.The material, called from one of the material
functions diffuse
, metal
, or dielectric
.
- angle
Default `c(0, 0, 0)`. Angle of rotation around the x, y, and z axes, applied in the order specified in `order_rotation`.
- order_rotation
Default `c(1, 2, 3)`. The order to apply the rotations, referring to "x", "y", and "z".
- flipped
Default `FALSE`. Whether to flip the normals.
- scale
Default `c(1, 1, 1)`. Scale transformation in the x, y, and z directions. If this is a single value,
number, the object will be scaled uniformly.
Note: emissive objects may not currently function correctly when scaled.