Commit Graph
3 Commits
Author SHA1 Message Date
Dylan M. TaylorandNetterSilver e3c6ec4a23 craft-mesh: ignore empty OBJ material assignments
* Ignore empty OBJ material assignments

* Preserve empty material resets in OBJ writes

Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>

---------

Co-authored-by: NetterSilver <133535268+Silvertree2010@users.noreply.github.com>
2026-11-12 06:26:04 -05:00
Dylan M. TaylorandLloyd Nicholson b72cb4d68c craft-mesh OBJ: map options by argument count, material libraries read once (from open EffectCraft PRs) (#854)
* craft-mesh OBJ: map_* options are passed over by their argument counts

A map line with options named its image by its final token, so
'map_Kd -o 0.5 0.5 my checker.png' named 'checker.png'. Options are now
skipped by the arguments they take (-o, -s and -t take one to three
numbers), so a name with spaces after options is one name. After an option
the reader does not know, the name is still the final token.

Ported from storytold/effectcraft#1324.

* craft-mesh OBJ: a material library named again is read once

Exporters repeat the mtllib line for every object. Each repeat asked the
resolver again, read the library again, added its materials and images a
second time, and counted its bytes against max_data_bytes once per line, so
a legitimate file with many objects could reach the limit.

Ported from storytold/effectcraft#2965 (its OBJ part: 'a library already
loaded is skipped').

---------

Co-authored-by: Lloyd Nicholson <nichlloyd@gmail.com>
2026-11-11 14:58:24 -05:00
Dylan M. Taylor 8f3e83aaee Add craft-mesh: STL, OBJ/MTL, PLY and glTF/GLB behind one neutral mesh model (#819)
* Add craft-mesh: neutral mesh model with STL, OBJ/MTL and PLY

* craft-mesh: glTF 2.0 and GLB

* craft-mesh: README, crate list entry, a test for the UV set bound
2026-11-11 13:04:03 -05:00