tobj
tobj copied to clipboard
Tiny OBJ Loader in Rust
**Backstory:** For reasons of needing more precision, I have forked this library and made some modifications to allow it to parse coordinates as something other than `f32`. I am not...
Using CornellBox-Original.obj from https://casual-effects.com/data/ the following snippet: ``` let meshes = models .iter() .map(|m| { let mesh = &m.mesh; println!("{}: {}", m.name, mesh.indices.len()); ... }) .collect(); ``` shows: ``` floor:...
The code already handles `Line`s but just stashes them as normal faces (as triangles even, if `triangulate_faces` is on). Points need to be added and then two more indices.
Add support for reading smoothing groups. Just another index with length `num_face_indices` (aka _number of faces of the mesh_). Each entry is the number of the smoothing group that the...
In some models, their colors are in the vertex lines, currently they are ignored. I propose to add a reading of colors from such models. Also I attached the test...
Hi! As assumed in line 655, https://github.com/Twinklebear/tobj/blob/023076f013036fda28a3399b2fdd0a86be4a3030/src/lib.rs#L655 Objects and groups are not the same and should, in theory, be handled differently. Probably, only few people will need it. Nevertheless, I'll...
I exported the default cube from Blender: cube.obj ``` # Blender 3.5.0 # www.blender.org mtllib cube.mtl o Cube v 1.000000 1.000000 -1.000000 v 1.000000 -1.000000 -1.000000 v 1.000000 1.000000 1.000000...
Pixar has an [undocumented extension for OBJ files](https://github.com/PixarAnimationStudios/OpenSubdiv/issues/1291) where tags can be stored in the OBJ. Commonly those are attached to vertices (or edges/edge chains, by specifying them through the...
Import/export of OBJ is built in to Blender 3.3 onwards https://docs.blender.org/manual/en/latest/files/import_export/obj.html When exporting a model with a mix of textured meshes and attribute color meshes, the resulting .obj will start...
Add feature to calculate tangents and bitangents.