ObjReader Community
ObjReader & 3D Collection => Get ObjReader & Documentation => Topic started by: Patrice Terrier on August 25, 2025, 12:18:51 pm
-
ObjReader 4.00 - the .ORB challenge
TL;DR: A compact binary format for Wavefront models that loads faster, takes less disk space, needs no extra DLLs, and stays fully compatible with OBJ/MTL.
What is .ORB?
.ORB = ObjReader Binary. It’s a compound file format for ObjReader that preserves Wavefront OBJ/MTL compatibility while dramatically reducing size and load time.
File layout
- PNG thumbnail — preview of the model (visible in Windows Explorer thumbnail view).
- Header — a small block storing internal offsets to each data section.
- Compressed geometry — mesh data matching the source Wavefront OBJ.
- Compressed MTL trailer — verbatim copy of the original .mtl file, stored at the end.
Compression: to avoid extra dependencies, .orb uses Windows’ built-in LZNT1 (NTDLL, LZ77-based). No external DLL required.
Explorer thumbnail
(http://www.objreader.com/download/images/ORB_thumbnail.png)
The thumbnail embedded in a [.orb] file is created the first time you open the model in ObjReader.
ObjReader renders the current viewport with its OpenGL pipeline (gl_DrawScene) and stores that live capture as the file’s preview.
What it reflects:
- Geometry, materials, and textures actually loaded
- Camera position and FOV
- Active lighting preset and background
- The model’s current pose/orientation
Why it matters: it lets you recognize models at a glance in Explorer and file pickers. The thumbnail is only a preview—it does not affect the model data.
Integration
- File association: .orb is registered to launch ObjReader directly from Explorer.
- ObjReader 4.00 size: the new executable is 14 KB smaller than v3.00+, thanks to aggressive code optimization and compiler settings.
- ORDLL64 / ORV64: ORV64 and ORDLL64.dll are updated to understand .orb directly; ORV64 can open .orb even if no .mtl is present on disk.
Round-trip compatibility
- Export from .ORB: ObjReader adds a menu option: File ? Export .ORB to .MTL/.OBJ.
- Console tool: orbtool.exe provides standalone compile/decompile:
Compile (OBJ ? ORB): orbtool -c <input.obj> -o <output.orb>
Decompile(ORB ? OBJ): orbtool -x <input.orb> -o <outputBase>
(produces <outputBase>.obj and <outputBase>.mtl)
Why this is good
- Smaller files on disk.
- Faster loads in memory.
- No extra runtime dependencies (uses Windows’ own LZNT1).
- Still Wavefront-compatible (verbatim .mtl preserved; lossless geometry).
Overall performance
- Disk space: ~50% of the original OBJ/MTL size (typical).
- Loading speed: Up to 10× faster on large models (no text parsing; contiguous, precompiled geometry).
...
Attachments
- ObjReader Version 4.00, is attached to this post.
- Orbtool console utility, is attached to this post.
-
About ORV_64 v3.10
(sample app for embedding ObjReader via ORDLL64.dll.)
(http://www.objreader.com/download/images/ORV64.png)
What it is
ORV_64 is a complete C/C++ (VS2022, x64) example that hosts the ObjReader engine through ORDLL64.dll.
The DLL exposes a focused C API, just enough to create a viewer window, load a model, animate it, and query stats.
So you can render ObjReader content inside your own application UI.
What ORDLL64.dll is
- The embeddable runtime of ObjReader (Win64).
- Owns the renderer, model loading (.orb, .obj/.mtl), animation timer, and optional audio sync.
- You supply the top-level window and message loop; the DLL creates and manages its child viewport.
Why v3.10 matters, native .ORB compatibility
- Cuts startup time (no text parsing/reindexing).
- Reduces disk size for large meshes.
- Simplifies packaging: ship model.orb + textures in the same folder.
Your code can prefer .orb and automatically fall back to .obj when needed.
Typical integration flow
- Create your main window (CreateWindowExW).
- Call OR_CreateWindow(...) to create the viewer child HWND.
- (Optional) OR_SetSwapInterval(TRUE) for V-sync, OR_TimerEnable(TRUE) to animate.
- Load a file via:
OR_ProcessCommandLine(L"path\\to\\model.orb");
- On WM_SIZE, resize the child window.
- Populate your UI with getters (OR_Vertices(), OR_Triangles(), …).
- Offer controls: OR_ViewReset(), OR_Get/SetAudioVolume(), OR_Screen_Shot().
- On exit, call OR_CloseAll().
API at a glance (what you’ll actually use)
- Create/host: OR_CreateWindow, OR_CloseAll
- Open model: OR_ProcessCommandLine (accepts .orb and .obj)
- Animation & timing: OR_TimerEnable, OR_GetAniTick
- Display options: OR_SetSwapInterval, OR_ViewReset, OR_Screen_Shot
- Info for UI:
- OR_Version, OR_ObjFileName
- OR_Vertices, OR_Triangles, OR_Indices
- OR_Meshes, OR_Materials, OR_ObjSize, OR_LoadTime
- OR_DetectGPU, OR_GPUinfo, OR_GPU, OR_CPU
- Audio: OR_GetAudioVolume, OR_SetAudioVolume
Attachment
- ORV_64 Version 3.10, is attached to this post.