meshing-around is a configurable rendering library for the Uiua language, with a goal of providing Uiuic methods for common rendering operations.
The library provides the following functionality:
- Mesh importing/exporting from/to Wavefront OBJ and STL files
- A
Suzanneconstant! - Output of rendered normal, color, and lighting maps (and more)
- Generation of texture coordinates
- Material system supporting textures
Want to jump right in? Read the guide!
It is recommended that you familiarize yourself with data definitions and quaternion rotations.
To use the library, include the following at the top of your file:
# Experimental!
M ~ "gh: Dguto9/meshing-around"
Create a RenderConfig with a resolution, and create a Mesh instance by importing from a 3D file format:
M~RenderConfig 500_500
°M~OBJ &fras "assets/suzanne.obj"
With only these as arguments, calling M~RenderMeshPreview will yield an image result.
# Experimental!
M ~ "gh: Dguto9/meshing-around"
~ "gh: Omnikar/uiua-math" ~ RQuat
RC ← M~RenderConfig
RO ← M~RenderOutput
RC 500_500
°M~OBJ &fras "assets/suzanne.obj"
°⊸M!Mesh~Transform≈Scale ↯3 0.7
°⊸M!Mesh~Transform≈Rotation RQuat ¯η 1_0_0
⧋⊂⧋÷⟜⇡⊸△◿₂⧋/+⇡100_100 # Rainbow tiles texture
⍉˙⊟₃°(-⊸¬)◿₂⧋/+⇡50_50 # Checker pattern
⊟∩M~Material # Make some materials
°⊸M~Mesh~Materials
⍜M~Mesh~MaterialIndex(◿₂⇡⧻) # Assign materials to triangles
⤚M~RenderMesh # This one does the rendering!
⊸RO~GenUVs # Generate texture coordinates
RO~GenMaterials # Apply the textures
×⊃RO~Albedo RO~Light # Multiply color and lighting to get shading
&ims
- uiua-math quaternions are used for all rotations; you will be importing it often
- Defining aliases like
ROandRCis useful, but to remain explicit, these aliases will not be provided by the library

