Skip to content

Growth node enhancement#10

Merged
GoodPie merged 21 commits intomasterfrom
growth-node-fixes
Jan 31, 2026
Merged

Growth node enhancement#10
GoodPie merged 21 commits intomasterfrom
growth-node-fixes

Conversation

@GoodPie
Copy link
Owner

@GoodPie GoodPie commented Jan 31, 2026

Description

This involved a lot of investigating the current implementation and how the L-System worked. While fairly simple, the implementation wasn't quite there and involved a bit of a rewrite to get it to where I thought it needed to be to be usable but it's still probably a bit off.

This pull request introduces significant improvements and new features to the tree growth simulation, focusing on enhanced biological realism, user control, and flexibility. The most notable changes include the addition of lateral branching and flowering capabilities, new parameters for fine-tuning growth, and improved documentation for the Growth Node. These updates allow users to simulate a wider variety of tree forms and growth behaviors.

Major Feature Additions:

  • Lateral Branching Support: Added new parameters and logic to enable dormant lateral buds along trunk and branches, allowing for more realistic tree shapes and bushier forms. (main.cpp, GrowthFunction.cpp, GrowthFunction.hpp) [1] [2] [3]
  • Flowering Support: Introduced parameters and logic to convert low-vigor tips into flower attachment points, increasing biological accuracy for flowering trees. (main.cpp, GrowthFunction.cpp) [1] [2]

Parameter and API Enhancements:

  • Preview Iteration Parameter: Added preview_iteration to control how many growth cycles are simulated, supporting intermediate previews and more interactive modeling. (main.cpp, GrowthFunction.hpp, GrowthFunction.cpp) [1] [2] [3]
  • Extended Python Bindings: Exposed all new parameters (lateral branching, flowering, preview iteration) to Python, making them accessible for scripting and UI integration. (main.cpp) [1] [2]

Algorithm and Simulation Improvements:

  • Improved Vigor and Growth Logic: Updated energy distribution and growth activation for dormant buds, flower points, and branch tapering, resulting in more natural growth patterns. (GrowthFunction.cpp) [1] [2] [3] [4] [5] [6] [7]
  • Gravity Application Refinement: Gravity bending is now only applied to growth nodes (not the original trunk), improving physical realism. (GrowthFunction.cpp) [1] [2]

Documentation Updates:

  • Comprehensive Growth Node Reference: Added a detailed markdown reference explaining all parameters, concepts (vigor, apical dominance, meristem, dormant bud, gravitropism), and presets for common tree forms. (docs/growth_node_reference.md)

Version Updates:

  • Version Bump to 5.2.0: Updated all relevant version numbers to reflect the new release and features. (VERSION, blender_manifest.toml, pyproject.toml) [1] [2] [3]

@GoodPie GoodPie self-assigned this Jan 31, 2026
Copilot AI review requested due to automatic review settings January 31, 2026 12:32
@GoodPie GoodPie added the enhancement New feature or request label Jan 31, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Growth Node with lateral branching and flowering capabilities, making tree growth simulation more biologically realistic and versatile. It introduces new parameters for controlling dormant bud activation, flower formation, and growth preview, along with improved documentation and UI organization.

Changes:

  • Added lateral branching system with dormant buds that activate based on vigor thresholds
  • Introduced flowering support to convert low-vigor meristems into flower attachment points
  • Added preview_iteration parameter for intermediate growth visualization
  • Enhanced UI with collapsible parameter sections and preset buttons

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
python_classes/presets/tree_presets.py Added growth presets dictionary and functions for applying presets
python_classes/presets/init.py Exported new growth preset utilities
python_classes/operators.py Added ApplyGrowthNodePreset operator for UI integration
python_classes/nodes/tree_function_nodes/growth_node.py Enhanced node with lateral/flowering parameters and collapsible UI sections
python_classes/nodes/sockets/bool_socket.py Created new boolean socket type for growth parameters
python_classes/nodes/sockets/init.py Registered MtreeBoolSocket class
pyproject.toml Updated version to 5.2.0
m_tree/source/tree_functions/GrowthFunction.hpp Added lateral branching and flowering fields
m_tree/source/tree_functions/GrowthFunction.cpp Implemented lateral bud creation and activation logic
m_tree/python_bindings/main.cpp Exposed new parameters to Python bindings
m_tree/pyproject.toml Updated version to 5.2.0
docs/growth_node_reference.md Added comprehensive documentation for all parameters and concepts
blender_manifest.toml Updated version to 5.2.0
VERSION Updated version to 5_2_0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@GoodPie GoodPie merged commit 32abe88 into master Jan 31, 2026
10 checks passed
@GoodPie GoodPie deleted the growth-node-fixes branch January 31, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants