364 Commits

Author SHA1 Message Date
Syoyo Fujita
3c1b1735b7 raise C++ version requirement from C++14 to C++17
Update all CMakeLists.txt, Makefiles, meson.build, setup.py,
and documentation files to use C++17 standard.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 03:39:41 +09:00
Syoyo Fujita
5b74bb09aa Add YAML and JSON output formats for DumpRenderScene in Tydra
- Add --yaml and --json command-line options to tydra_to_renderscene
- Implement YAML format (human-readable, now default) with metadata header
- Implement JSON format (machine-readable) with metadata header
- Both formats include: format_version, generator, source_file, scene settings
  (upAxis, metersPerUnit, framesPerSecond, etc.), and summary counts
- Add configuration info output as comments (YAML: #, JSON: //)
- Config info includes: loading_method, input_file, triangulate,
  triangulation_method, build_vertex_indices, asset_resolver, timecode, etc.
- Keep original KDL format available via API with format="kdl"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 05:26:28 +09:00
Syoyo Fujita
4c6a78770e make no texture load and no usd print default.
add release build script.
2025-12-13 07:22:33 +09:00
Syoyo Fujita
39fbeca468 Add --inspect option to tusdcat for USD Layer/Stage inspection
Adds a new inspection feature similar to pxrUSD's sdfdump, providing
YAML-like tree output of USD Layer structure. New files:
- src/usd-dump.hh/cc: InspectLayer/InspectStage implementation
- GlobMatch/GlobMatchPath functions in str-util for pattern matching

New CLI options:
- --inspect: YAML-like Layer inspection output
- --inspect-json: JSON output (placeholder, not yet implemented)
- --value=MODE: Value printing mode (none/snip/full)
- --snip=N: Number of items to show in snip mode
- --path=PATTERN: Filter prims by path glob pattern (supports **)
- --attr=PATTERN: Filter attributes by name glob pattern
- --time=T or --time=S:E: TimeSamples time query

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 06:35:17 +09:00
Syoyo Fujita
887804bba8 Add --progress option to tusdcat for ASCII progress bar display
- Add progress_callback and progress_userptr to USDLoadOptions
- Add SetProgressCallback to USDAReader to forward to AsciiParser
- Integrate progress callback in LoadUSDCFromMemory and LoadUSDAFromMemory
- Implement ASCII progress bar [=====>    ] with percentage display
- Only show progress bar if loading takes > 3 seconds
- Reformat tusdcat help message to 80 character lines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 05:54:01 +09:00
Syoyo Fujita
2aeac6eb28 Fix reverse face orientation in Tydra earcut triangulation for 5+ gons
The mapbox earcut library returns triangles in clockwise winding order,
but USD expects counter-clockwise order. This was causing reversed face
orientation for polygons with 5 or more vertices when using the earcut
triangulation method.

Changes:
- src/tydra/render-data.cc: Reverse triangle winding order by swapping
  indices 1 and 2 when processing earcut results to convert from CW to CCW
- examples/tydra_to_renderscene/to-renderscene-main.cc: Add --trifan
  option to enable triangle fan triangulation method for testing

The triangle fan method was already producing correct CCW triangles and
did not require changes.

Tested with models/ngon.usdc containing pentagon, hexagon, and octagon.
Both triangulation methods now correctly produce CCW triangles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 11:14:43 +09:00
Syoyo Fujita
96827e7607 Add triangle fan triangulation method option for 5+ gons in Tydra RenderMesh
Summary:
- Added TriangulationMethod enum to MeshConverterConfig with two options:
  * Earcut (default): Robust algorithm for complex/concave polygons
  * TriangleFan: Fast algorithm for convex polygons (simple fan splitting)
- Implemented triangle fan splitting for 5+ vertex polygons
  * Creates triangles from first vertex as pivot: (0,1,2), (0,2,3), etc.
  * Much simpler and faster than earcut for convex polygons
- Updated TriangulatePolygon() function signature to accept triangulation method
- Preserved backward compatibility with earcut as default method
- Added triangulation_method_example.cc demonstrating usage of both methods

Benefits:
- Performance improvement for applications with convex polygon meshes
- Flexible triangulation strategy based on polygon characteristics
- Default behavior unchanged for backward compatibility

Test plan:
- Build successfully with no compilation errors
- Example program demonstrates switching between triangulation methods
- Can be tested with USD files containing 5+ vertex polygons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 02:39:15 +09:00
Syoyo Fujita
296c825820 DCOUT now only prints when TINYUSDZ_ENABLE_DCOUT env is set.
move optimization
2025-10-08 02:58:03 +09:00
Syoyo Fujita
6f773a6397 fix Layer to Stage convert. 2025-10-07 12:50:38 +09:00
Syoyo Fujita
9ac9b8792f Fix build errors: use std::move for set_value() calls
Fixed template deduction issues where set_value() was being called
with lvalue references, causing TypeTraits specialization errors.
Changed all problematic calls to use std::move() to ensure correct
non-reference type deduction.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 01:49:10 +09:00
Syoyo Fujita
496776dbe1 Merge branch 'js_mem_reduction' into async 2025-09-04 06:43:36 +09:00
Syoyo Fujita
b6012fa2a2 fix build. 2025-09-04 03:13:11 +09:00
Syoyo Fujita
3c54ca5d82 Add --memstat option to tusdcat for memory usage reporting
This commit adds memory usage statistics reporting to the tusdcat tool:

- Added Stage::estimate_memory_usage() method to calculate Stage memory usage
  including stage metadata, root prims, string storage, and prim ID management
- Enhanced tusdcat with --memstat command line option to display memory stats
- Added format_memory_size() helper function for human-readable memory display
  (shows sizes in B, KB, MB, GB, TB with both formatted and raw byte counts)
- Memory stats are reported for:
  - Layer memory usage (when using --flatten option)
  - Stage memory usage (regular mode and --loadOnly option)
  - Stage after composition (in flatten mode)
- Added layer.hh include to fix compilation issues with incomplete Layer type

Usage examples:
  tusdcat --memstat input.usda
  tusdcat --memstat --flatten input.usda
  tusdcat --memstat --loadOnly input.usdz

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 02:54:28 +09:00
Syoyo Fujita
3d5b8307aa fix non with_json build. 2025-09-02 23:31:12 +09:00
Syoyo Fujita
0ec0449dde fix compile. 2025-09-01 09:54:39 +09:00
Syoyo Fujita
701d99240a Add Layer-to-RenderScene. 2025-09-01 08:22:47 +09:00
Syoyo Fujita
3e50c7a84c add --json option to tusdcat.
add callback interface in USDA parser.
2025-08-26 22:28:46 +09:00
Syoyo Fujita
93150cc189 fix build.
revert str-util.cc
2025-08-22 10:27:35 +09:00
Syoyo Fujita
b50d35721f add missing files. 2025-08-22 08:21:40 +09:00
Syoyo Fujita
f85b4664d3 Implement USD Layer diff functionality and usddiff command-line tool
## Features Added

### Core diff-and-compare implementation:
- Complete rewrite of src/tydra/diff-and-compare.cc with full diff algorithm
- Hierarchical PrimSpec comparison (added/deleted/modified primitives)
- Property comparison for attributes and relationships
- Recursive traversal with depth limits for security
- Memory-safe implementation using standard containers

### Text and JSON output formats:
- DiffToText(): Unix diff-style output with +/- symbols
- DiffToJSON(): Structured JSON format for programmatic use
- Proper JSON escaping and formatting
- Sorted output for consistent results

### usddiff command-line tool:
- Full-featured CLI application in examples/usddiff/
- Support for --json and --help options
- USD file loading with error handling
- Support for all USD formats (.usd, .usda, .usdc, .usdz)
- Comprehensive documentation and usage examples

## Implementation Details

- Path-based diff organization using USD scene graph paths
- Efficient O(n log n) sorting for consistent output
- Configurable depth limits (default: 1M levels) for security
- Proper error handling and input validation
- CMake integration with TinyUSDZ build system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 03:21:43 +09:00
Syoyo Fujita
7cd0016526 optimzie base64
mcp w.i.p.
2025-07-25 05:11:04 +09:00
Syoyo Fujita
0ceb63b0dc mcp w.i.p. 2025-07-24 12:54:35 +09:00
Syoyo Fujita
2b6e790674 remove \r 2025-07-22 11:17:54 +09:00
Syoyo Fujita
95aa09bf69 handle mcp-session-id. 2025-07-17 12:24:10 +09:00
Syoyo Fujita
d4f63306d4 add MCP ping. 2025-07-13 12:05:22 +09:00
Syoyo Fujita
651e9d5b03 mcp w.i.p. 2025-07-12 11:51:18 +09:00
Syoyo Fujita
4e54395b90 MCP server w.i.p. 2025-07-11 12:00:47 +09:00
Syoyo Fujita
5d4610b447 add diff-and-compare 2025-07-08 05:42:29 +09:00
Syoyo Fujita
b00c2d11f6 cosmetics. 2025-07-06 07:46:13 +09:00
Syoyo Fujita
be3788e264 cosmetics. 2025-07-04 10:09:12 +09:00
Syoyo Fujita
c99b12fd97 add arg-parser 2025-07-03 04:10:26 +09:00
Syoyo Fujita
d620d26f02 add a small comment on subLayers 2025-06-14 11:24:10 +09:00
Syoyo Fujita
26e2a6afab add progressive composition example.
adding progressive composition feature to WASM.
2025-06-11 11:05:54 +09:00
Syoyo Fujita
06d28178b6 add Null asset resolution example. 2025-06-06 11:35:59 +09:00
Syoyo Fujita
53621eb291 --parse-only => --loadOnly 2024-09-18 04:38:29 +09:00
Syoyo Fujita
4f0a56e451 Add --parse-only flag(Read USD only)
Simplify USD load code.
2024-09-18 02:08:56 +09:00
Syoyo Fujita
c81fe002e7 simplify USD load code. 2024-08-11 23:27:54 +09:00
Syoyo Fujita
92c1ad436a refactoring RTRenderScene... 2024-08-07 06:04:00 +09:00
Syoyo Fujita
92319a096a Load USD and build RenderMesh using Tydra API. 2024-08-05 04:05:45 +09:00
Syoyo Fujita
374d33f48b cosmetics. 2024-08-04 05:17:49 +09:00
Syoyo Fujita
98f6af46c8 Add note on SDL2. 2024-08-04 04:41:49 +09:00
Syoyo Fujita
2c9d94419c Remove SDL2 sources to diet tinyusdz repo. 2024-08-04 03:12:24 +09:00
Syoyo Fujita
7d194d4eed Simplify USD load code.
Remove unused `using`
2024-08-01 07:35:54 +09:00
Syoyo Fujita
f403f8204c Make Tydra build optional. 2024-07-17 02:12:58 +09:00
Syoyo Fujita
ef2355890e Merge branch 'dev' of github.com:syoyo/tinyusdz into dev 2024-07-07 04:21:08 +09:00
Syoyo Fujita
f89a18e172 w.i.p. 2024-07-07 02:08:34 +09:00
Syoyo Fujita
ed64e343c3 refactor sdlrender example a bit(still w.i.p.) 2024-07-01 04:52:24 +09:00
Syoyo Fujita
54c42fb0cf print timecode 2024-05-08 04:57:15 +09:00
Syoyo Fujita
6856933913 Merge branch 'dev' into rendermesh-refactor 2024-05-07 09:23:34 +09:00
Syoyo Fujita
52372dc32a fix compile. 2024-05-05 22:08:00 +09:00