A Houdini plugin that provides seamless integration with the CamDB (Camera Database) API, allowing artists to browse, filter, and create cameras in Houdini with real-world camera specifications and sensor configurations.
- Real-time Camera Database Access: Connect directly to the CamDB API to browse thousands of camera models
- Intelligent Caching System: Automatic local caching with smart update detection to minimize API calls
- Advanced Filtering: Filter cameras by make, type, and search by name
- Detailed Sensor Configurations: View and select from multiple sensor modes for each camera
- One-Click Camera Creation: Automatically create Houdini cameras with correct sensor dimensions and resolution settings
- Cross-Platform Cache Management: Intelligent cache location selection for Windows, macOS, and Linux
- Download the
camDB.pyscript - Place it in your Houdini scripts directory or any accessible location
- Create a shelf tool in Houdini with the following Python code:
exec(open('/path/to/camDB.py').read())
- Alternatively, run directly from the Python Source Editor in Houdini
- Houdini: 18.0 or later (tested with versions supporting PySide2)
- Internet Connection: Required for initial data loading and cache updates
- Launch the Plugin: Click your shelf tool or run the script
- Load Camera Data:
- Click "Load All Cameras from CamDB" for fresh data
- Or use "Use Cached Data" if you have previously loaded cameras
- Browse and Filter: Use the filtering controls to find your desired camera
- Load Sensor Data: Select a camera and click "Load Sensor Data"
- Create Camera: Choose a sensor configuration and click "Create Camera in Houdini"
- Load All Cameras: Fetches the complete camera database from the API
- Status Display: Shows current operation status and data information
- Cache Info: Displays cache timestamp and file size
- Use Cached Data: Load previously downloaded camera data
- Update Cache: Refresh cache with latest API data
- Clear Cache: Remove all cached data
- Browse Location: Change cache storage location
- Filter by Make: Dropdown to filter cameras by manufacturer (Canon, Sony, RED, etc.)
- Filter by Type: Dropdown to filter by camera type (DSLR, Cinema, etc.)
- Search Name: Text field to search camera names
- Camera List: Displays filtered cameras with make and model
- Camera Details: Shows selected camera specifications
- Sensor Configurations: Lists available sensor modes for the selected camera
- Sensor Details: Displays technical specifications for the selected sensor mode
The plugin features an intelligent caching system that:
-
Automatically detects the appropriate cache location for your OS:
- Windows:
%APPDATA%\CamDB\ - macOS:
~/Library/Application Support/CamDB/ - Linux:
~/.local/share/CamDB/
- Windows:
-
Checks for updates by comparing data hashes to avoid unnecessary downloads
-
Stores metadata including timestamps and version information
-
Allows custom locations via the browse function
When you create a camera in Houdini, the plugin:
- Creates a new camera node with an appropriate name
- Sets resolution based on the sensor configuration
- Calculates aperture using the sensor width (converted to Houdini's format)
- Sets aspect ratio if available in the sensor data
- Adds detailed comments with camera and sensor information
- Positions the camera slightly away from the origin
- Offers to set the new camera as the current viewport camera
The plugin connects to https://camdb.matchmovemachine.com and handles:
- Compressed responses (gzip/deflate)
- Proper HTTP headers for reliable connections
- Error handling with user-friendly messages
- Rate limiting through intelligent caching
Enable debug logging by changing the debug flag in the script:
DEBUG_MODE = True # Set to True for detailed console outputDebug mode provides detailed information about:
- API requests and responses
- Cache operations
- Data processing steps
- Error diagnostics
You can change the cache location through the UI or by modifying the script. The cache stores:
camdb_cameras.json: The main camera databasecamdb_cache_info.json: Cache metadata and version information
"Error loading cameras: API request failed"
- Check your internet connection
- Verify the CamDB API is accessible
- Enable debug mode for detailed error information
"No sensor configurations found"
- Some cameras may not have sensor data in the database
- Try a different camera model
- Check the debug output for API response details
Cache-related errors
- Ensure you have write permissions to the cache directory
- Try clearing the cache and reloading
- Check available disk space
Enable DEBUG_MODE = True to see detailed information about:
- API endpoints being called
- Raw API responses
- Data processing steps
- Cache operations
- Error stack traces
The plugin performs several conversions to match Houdini's camera system:
- Aperture Calculation: Converts sensor width (mm) to Houdini's aperture value using the formula:
(sensor_width / 36.0) * 41.4214 - Resolution Mapping: Directly maps sensor resolution to Houdini's resolution parameters
- Aspect Ratio: Uses the format aspect ratio when available
The plugin handles camera data with the following key fields:
id: Unique camera identifiermake: Camera manufacturername: Camera model namecam_type: Camera category- Sensor configurations with resolution, sensor dimensions, and format specifications
Contributions are welcome! Areas for improvement:
- Additional camera parameter mappings
- Extended sensor configuration options
- UI enhancements
- Performance optimizations
- Error handling improvements
- Initial release with core functionality
- Cache management system
- Complete UI implementation
- Cross-platform support
For issues and feature requests, please [create an issue on GitHub].
Note: This plugin requires an active internet connection for initial data loading. The CamDB service provides camera specifications for educational and professional use.
