Project Title : Improving Regression Testing Framework for Blender’s Geometry Nodes
Name: Karishnii Kuber
Contact
- Email: [email protected]
- Blender Chat Username:@titania:blender.org
- GitHub:karish-123 (karishnii kuber) · GitHub
Synopsis
This project aims to enhance Blender’s regression testing infrastructure for Geometry Nodes, focusing on improving backward compatibility and stability as more complex assets are built using this system. The project will expand test coverage, extend the testing framework to include node tools and baking functionality, and create a suite of production-ready test files that represent real-world use cases.
Benefits
As Geometry Nodes becomes increasingly central to Blender workflows, ensuring its stability and backward compatibility is crucial for both artists and developers. This project will:
- Prevent regressions: Catch compatibility issues and bugs before they reach production releases
- Improve user confidence: Artists can update to newer versions knowing their node setups won’t break
- Facilitate faster development: Developers can make changes with greater confidence, knowing that comprehensive tests will catch potential issues
- Enable complex feature additions: A robust testing framework allows more ambitious feature development without fear of breaking existing functionality
- Standardized testing approaches: Creating reusable testing patterns that can be applied to other areas of Blender
The impact extends beyond immediate stability improvements, as it creates a foundation for sustainable long-term development of the Geometry Nodes system.
Deliverables
- Extended test coverage:
- A comprehensive suite of new tests for existing Geometry Nodes functionality
- Coverage for edge cases and common usage patterns
- Tests for node interactions and complex node trees
- Framework enhancements:
- Extended testing framework to cover node tools (creation, manipulation, organization)
- Baking functionality tests (geometry to mesh, field to vertex groups, etc.)
- Documentation on how to create and run tests for developers
- Production file test suite:
- Collection of real-world Geometry Nodes setups for regression testing
- Varied complexity levels representing different use cases
- Documented expected outputs and critical functionality
- User documentation:
- Guide explaining the testing system for future contributors
- Documentation of common failure patterns and how to diagnose them
- Process documentation for adding new tests
Project Details
Current Testing Limitations
After examining Blender’s source code (particularly in the source/blender/geometry/tests directory), I’ve observed that the existing Geometry Nodes regression testing primarily focuses on basic node functionality in isolation rather than complex interactions, tools, or baking processes. While the current framework effectively tests individual nodes, it leaves gaps in testing real-world usage patterns, where artists connect dozens of nodes in complex arrangements.
For example, the tests in test_geometry_nodes_attribute_transfer.cc and similar files check fundamental functionality, but don’t capture how these nodes behave when chained together in production scenarios. As users create increasingly complex node setups for procedural modeling and animation, there’s a higher risk of undetected regressions when modifying the codebase.
Implementation Approach
1. Expanding Basic Test Coverage
I will first analyze the current test coverage to identify gaps, particularly focusing on:
- Node combinations that aren’t currently tested
- Edge cases in parameter values and connections
- Commonly used node patterns from real-world examples
I’ve already identified several specific areas that need better coverage:
- Testing interactions between geometry operation nodes and attribute manipulation nodes
- Validating results when multiple geometry sets are joined or separated
- Testing how field operations behave when nested several levels deep
- Verifying that instance nodes correctly handle attributes from their instance geometry
For example, a test I would implement early on would validate that when attributes are transferred between geometries and then those geometries are joined, the attributes remain intact and accessible:
The implementation will leverage Blender’s existing Python testing framework, adding structured tests that:
- Create specific node setups programmatically
- Execute the node tree
- Verify outputs against expected results
- Test parameter changes and their effects
2. Testing Framework Extensions
The current framework will be extended to test:
Node Tools:
- Creation of nodes via UI operations
- Organization tools (frames, reroute nodes)
- Copy/paste functionality
- Search operations
- Node replacement operations
Baking Functionality:
- Geometry baking to mesh
- Attribute baking to vertex groups, UV maps, etc.
- Validation of baked results against node evaluations
This requires extending the testing framework with:
- UI interaction simulation
- Result comparison methods for baked data
- Integration with Blender’s file I/O systems for validation
3. Production File Testing
For complex real-world testing:
- Collect and curate diverse Geometry Nodes setups from Blender artists and the community
- Develop validation methods for complex outputs that can detect subtle changes in geometry
- Create automated tests that load files, perform operations, and verify results
I’ve already identified several production-quality Geometry Nodes setups that would make excellent test cases:
- Procedural terrain generator - Tests complex interactions between multiple noise textures, displacement operations, and instance scattering
- Character rigging helpers - Tests how Geometry Nodes handle deformations and attribute transfers in animation contexts
- Procedural building generator - Tests instancing and complex boolean operations
For each test file, I would create a structured test that:
- Loads the .blend file
- Executes the node tree with predetermined inputs
- Captures key metrics like vertex count, bounding box dimensions, and specific attribute values
- Compares these against known-good baseline values
- Generates visual diffs for geometry outputs when tests fail
This approach would catch regressions that might be missed by more isolated unit tests while providing clear visual feedback on what changed when tests fail.
Technical Challenges
- Output verification: Developing robust comparison methods for geometric outputs that can handle floating-point precision issues. This is particularly important for operations like mesh deformation where exact equality checks would fail due to numerical precision.
- UI testing: Extending the framework to properly test tools that involve UI interactions, which will require methods to programmatically trigger and validate UI operations from Python.
- Performance considerations: Ensuring tests run efficiently while remaining comprehensive. Some complex Geometry Node setups take significant processing time, so the test framework needs intelligent ways to sample critical aspects without testing every possible combination.
- Backward compatibility: Creating tests that account for deliberate API changes vs. unintended regressions. For example, distinguishing between a node output format change that’s intentional versus one that breaks existing setups.
To address these challenges, I’ll need to explore Blender’s existing test utilities like BLI_assert_float_equal for geometric comparisons and develop new utilities specific to Geometry Nodes testing.
Project Schedule
The project will be structured to deliver incremental value throughout the GSoC period:
Community Bonding Period (2-4 weeks before coding begins)
- Familiarize with Blender’s testing infrastructure
- Analyze existing tests and identify gaps
- Communicate with mentors to refine approach
- Set up development environment and workflow
Week 1-2: Analysis and Basic Test Expansion
- Analyze current test coverage
- Create and submit initial batch of basic functionality tests
- Document test patterns for reuse
Week 3-4: Framework Enhancement for Node Tools
- Extend framework to support tool testing
- Implement tests for node creation and manipulation tools
- Submit PR with initial tool tests
Week 5-6: Baking Functionality Tests
- Develop test methods for baking operations
- Implement comprehensive baking tests
- Submit PR with baking test suite
Week 7-8: Production File Test Suite
- Collect and document complex Geometry Nodes setups
- Create validation methods for complex outputs
- Implement automated tests for production files
Week 9-10: Documentation and Refinement
- Document the testing system
- Address feedback from mentors
- Refine tests based on code review
- Create user guide for future test contributors
Buffer Week
- Extra time for unforeseen challenges
- Final documentation updates
- Code cleanup and optimization
Bio
I am a 3rd year Computer Science and Engineering student at PES University in Bengaluru, India. As an aspiring developer with a strong academic background, I’m excited to contribute to an open-source project like Blender that combines my interests in computer graphics and software development.
Experience with Blender
I have been using Blender since my second year of college, creating various animations and 3D models as a hobby. My experience includes:
- Creating character animations and simple scene compositions
- Exploring procedural modeling workflows
- Conducting a workshop at my university to teach fellow students the basics of animation using Blender
Through these experiences, I’ve developed an appreciation for Blender’s architecture and the importance of reliable tools for artists.
Programming Experience
- C/C++: I completed a 5-credit course in C programming with an A grade. I’ve built several projects including a typing speed tester and a phone book application. I’m currently expanding my skills in C++ with a focus on object-oriented programming principles and memory management.
- Python: I earned an A grade in a 5-credit Python course and have used Python extensively for data analytics and machine learning projects. My experience with Python makes me well-suited to enhance Blender’s Python-based testing infrastructure.
- Testing Frameworks: While I don’t have professional experience with testing frameworks, I’ve studied testing methodologies in my coursework and understand the importance of comprehensive test coverage for ensuring software quality.
- Other relevant skills: I’m proficient with Git and GitHub for version control and collaboration. I hold a certification in Jira for project management, which will help me track progress and milestones throughout the GSoC period.
Relevant Projects
I am currently working on a project to optimize ray tracing using heterogeneous parallelism, which has given me insights into graphics rendering pipelines and performance optimization techniques. This experience relates well to understanding the computational aspects of Geometry Nodes.
Contributions to Blender
While I haven’t made code contributions to Blender yet, I’ve been actively exploring the codebase to understand how the testing framework functions. I’m eager to start contributing and see this project as an excellent opportunity to make a meaningful first contribution to Blender.
Why I’m the Right Person for This Project
Even though I’m still developing my skills in C++ and Python, I have a strong foundation in programming fundamentals and a genuine interest in computer graphics. I’m passionate about improving software quality and ensuring backward compatibility, which are at the heart of this project.
What I may lack in experience with Blender’s codebase, I make up for with enthusiasm and a methodical approach to learning. This project is an ideal opportunity for me to grow my skills while making a meaningful contribution to a tool I’m passionate about. The mentorship from experienced Blender developers would be invaluable in helping me bridge knowledge gaps while allowing me to apply my existing strengths in problem-solving and attention to detail.
I’ve already begun familiarizing myself with Blender’s testing approach by studying the existing Geometry Nodes tests, and I’m eager to expand this knowledge and contribute to making Blender’s Geometry Nodes system more robust for all users.