MATER(nged)
Assigns shader parameters, RGB color, and inheritance to an existing combination.
πΈ NAME πΈ
okay so bestie, this is MATER(nged) from the BRL-CAD User Commands corner, and the main character is the mater command. It assigns shader parameters, RGB color, and inheritance to an existing combination. That's the whole NAME vibe. Periodt. π
π¦ SYNOPSIS π¦
Here's the exact shape of the command, no cap:
mater [-s] {combination} [shader_parameters [RGB [inheritance]]]
mater {-d} {source}
mater {-d} {clear}
mater {-d} {import} [-v] {file.density}
mater {-d} {export} {file.density}
mater {-d} {validate} {file.density}
mater {-d} {get} [--tol <tolerance>] [--id [[>|<][=]id]|[id pattern]] [--density [[>|<][=]val] [--name pattern] [pattern]
mater {-d} {set} {id,density,name}
mater {-d} {map} {--ids-from-names} {-d density_file} {-m map_file} [density_file] [map_file]
mater {-d} {map} {--names-from-ids} [density_file]
bestie, we are preserving the brackets and spacing exactly as printed, even when they look like they're doing a little too much. π
β¨ DESCRIPTION β¨
In its default mode, mater assigns shader parameters, RGB color, and inheritance to an existing combination. The information may be included on the command line; otherwise the user will be prompted for it. Some available shaders are:
bumpβ bump maps.bwtextureβ black and white texture maps.camoβ camouflage.checkerβ checkerboard design.cloudβ 2D Geoffrey Gardner style cloud texture map.envmapβ environment mapping.fakestarβ a fake star pattern.fbmbumpβ fbm noise applied to surface normal.fbmcolorβ fbm noise applied to color.fireβ flames simulated with turbulence noise.glassβ Phong shader with values set to simulate glass.gravelβ turbulence noise applied to color and surface normal.lightβ light source.marbleβ marble texture.mirrorβ Phong shader with values set to simulate mirror.plasticβ Phong shader with values set to simulate plastic.rtransβ random transparency.scloudβ 3D cloud shader.spmβ spherical texture maps.stackβ allows stacking of shaders.stxtβ shape texture mapping.textureβ full color texture mapping.turbumpβ turbulence noise applied to surface normals.turcolorβ turbulence noise applied to color.woodβ wood texture.
that's the shader menu, bestie β no gatekeeping, all 24 of them are right there. π«Ά
π§ DENSITY DATABASE MANIPULATION π§
In the event the .g file has an internal density database defined (or the user wishes to define such a database) the mater command provides a number of options.
importβ To import a density file into the.gfile, use theimportsubcommand. By default this will update and append to an existing database if present. If the-vis added, a validation will be performed on the specified density file before import.clearβ To completely replace any pre-existing definitions in the database, first run theclearsubcommand.exportβ To write out the current density definitions to a file use theexportsubcommand.validateβ To simply test a density file for validity without attempting to import it, use thevalidatesubcommand.sourceβ Thesourcesubcommand will report where commands using density information will draw their data from β if data is present in the.gfile the current database name will be returned, otherwise the system path to the currently active.densityfile will be returned.getandsetβ For manipulation of subsets of the data, thegetandsetsubcommands are provided.getwill return either one or a set of tuples matching the provided patterns. For density matching a tolerance may be specified to allow for approximate matches. The glob style of pattern matching is supported.
lowkey iconic how get can pull one tuple or a whole little squad of them, matching patterns and tolerance and all that. π
π DENSITY DATABASE MANIPULATION - MAPPING MODE π
The map mode of operation uses density information (either from a file or from the current database) to syncronize the material_id and material_name properties of objects.
- The
βids-from-namesmode will usematerial_nameproperties, perform a lookup on the density database to find a corresponding id number, and update thematerial_id. If an optional mapping file is supplied, the name lookup will also find id assignments based on the name equivalencies specified by the map. - For situations where a file has
material_idattributes but no names, theβnames-from-idsoption will use density information to assignmaterial_nameattributes to those objects whosematerial_idvalues are present. It will also update existingmaterial_namevalues.
dash check, bestie: the synopsis uses--ids-from-namesand--names-from-idswith two hyphens, while the mapping prose and examples on this page show a long dash (βids-from-names,βnames-from-ids). We kept both exactly as printed, so copy-paste with care. π
π EXAMPLES π
The example shows the use of the mater command to assign shader parameters, color, and inheritance to a region.
πΈ Example 1. Assigning shader parameters, color, and inheritance to a region.
mged> mater region1 "plastic {tr 0.5 re 0.2}" 210 100 100 0
Sets region1 to use the plastic shader with 50% transparency, 20% reflectivity, a base color of (210 100 100), and inheritance set to 0.
slay β one line and the region's whole material vibe is updated. π₯
π¦ Example 2. Importing Density Data
mged> mater -d import /home/user/.density
After this operation, the density valued defined in /home/user/.density are now stored in the .g file.
π Example 3. View Full Density Table
mged> mater -d get \*
Lists all entries in the density table.
π§ Example 4. View Name-Specific Density Data
mged> mater -d get βname \*Rubber\*
Lists all density entries with a material name containing "Rubber".
π Example 5. Names from IDs
mged> mater -d map βnames-from-ids /home/user/.density
Assigns material_name names from a density file assuming existing material_id attributes.
β Example 6. IDs from Names
mged> mater -d map βids-from-names /home/user/.density
/home/user/mapping_file
Assigning or updating material_id attributes based on material_name attribute values, density file names, and mapping file associations.
π AUTHOR π
BRL-CAD Team
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
π cute little footer sign-off, bestie: the source/version line is BRL-CAD, the page is MATER(nged), and there's no date on this footer β so that's the whole sendoff. πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms