G-VRML(1)
π g-vrml β your girl's guide to yeeting BRL-CAD geometry into VRML 2.0
okay so first things first: this is page one of the BRL-CAD manual, section 1, and it's literally called g-vrml. she converts stuff. she slays. let's get into it π
β¨ NAME β¨
g-vrml β convert a BRL-CAD geometry database to a VRML 2.0 file π¦
πΈ SYNOPSIS πΈ
g-vrml [-b | -e] [-v] [-d calc_dist_tol] [-a abs_tess_tol] [-r rel_tess_tol] [-n norm_tess_tol] [-u units] [-x librt_debug_flag] [-X NMG_debug_flag] [-o output.wrl] database.g object [object ...]
like, that's the whole mood. database.g in, object(s) named, VRML out. periodt π
π DESCRIPTION π
so g-vrml takes the objects you name from a BRL-CAD geometry database (database.g) and turns them into a faceted Virtual Reality Modeling Language (VRML) version 2.0 file. iconic behavior honestly.
by default, each region gets tessellated and its Boolean operations get evaluated through the NMG routines, which produces a triangulated IndexedFaceSet per region. region colors and shaders β plastic, glass, texture β get translated into VRML material and texture nodes, and regions using the light shader get emitted as VRML light sources. the way that all justβ¦ works π«Ά
the result goes to the file you name with -o, or to standard output if you don't give -o. output units default to millimeters; peep -u if you want a different unit. and ngl, this conversion is the inverse direction of what importers like vrml-g would be β it complements other geometry exporters like g-stl(1) and g-obj(1). bestie squad of converters fr fr π
π₯ OPTIONS π₯
-bβ dump BOT (Bag of Triangles) primitives straight to the VRML file with zero Boolean evaluation happening; non-BOT (CSG) primitives just get skipped. heads up: this is mutually exclusive with-eπ«-eβ evaluate all the geometry, tessellating and doing the Boolean evaluation of both CSG and BOT primitives. also mutually exclusive with-b, pick a lane bestie π-vβ verbose mode; reports conversion progress on standard error. she's chatty, we love her π-dcalc_dist_tolβ calculational distance tolerance in millimeters, used to tell neighboring vertices apart. the default is0.005π-aabs_tess_tolβ absolute tessellation tolerance in millimeters (that's the maximum chord error). setting this disables the relative tolerance β οΈ-rrel_tess_tolβ relative tessellation tolerance, expressed as a fraction of the bounding box of each primitive. the default is0.01β¨-nnorm_tess_tolβ surface normal tessellation tolerance in degrees (the maximum allowed angle between approximated and true surface normals). setting this disables the relative tolerance too β οΈ-uunitsβ units for the resulting VRML file. default ismm. literally any unit name BRL-CAD accepts works (for examplem,cm,in,ft) π-xlibrt_debug_flagβ set the librt debug flag (hexadecimal). seeraytrace.hfor the bit values π-XNMG_debug_flagβ set the NMG debug flag (hexadecimal). seenmg.hfor the bit values π-ooutput.wrlβ write output to the named file. if you omit it, output goes to standard output π―-h,-?β print a usage message and exit. the classic escape hatch π
π§ EXAMPLES π§
Example 1. Convert specific tops objects to a VRML file
g-vrml -o havoc.wrl -u m havoc.g havoc
tessellates and Boolean-evaluates the havoc object from havoc.g and writes a VRML 2.0 model in meters to havoc.wrl β ready to load in a web or desktop VRML viewer. chef's kiss, no notes π
Example 2. Export only the triangle meshes from a model
g-vrml -b -o meshes.wrl model.g body wheels
dumps the BOT meshes contained under the body and wheels objects directly, skipping CSG primitives and the comparatively slow Boolean evaluation. this is the move when a model is already mostly faceted and you just want a fast export β‘
π¦ SEE ALSO π¦
brlcad(1), mged(1), g-stl(1), g-obj(1), g-dxf(1)
(the whole friend group, go say hi π)
π AUTHOR π
BRL-CAD Team β icons, legends, the whole vibe π«Ά
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
πΊ BUG REPORTS πΊ
found a bug? a problem? a little oopsie? reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org π¬ β they wanna hear it, fr fr.
and that's the whole page bestie!! this was page G-VRML(1) from the BRL-CAD manual set, dated at the bottom like a little signature β same version, same date, same energy. mwah πβ¨
π¦ 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