generated from nathanfranke/gdextension
-
-
Notifications
You must be signed in to change notification settings - Fork 233
Non-Destructive Layer System #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
lokejonatan
wants to merge
45
commits into
TokisanGames:main
Choose a base branch
from
lokejonatan:feat/non-destructive-layers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Non-Destructive Layer System #863
lokejonatan
wants to merge
45
commits into
TokisanGames:main
from
lokejonatan:feat/non-destructive-layers
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced Terrain3DLayer class with properties for map type, intensity, feather radius, and blend mode. - Implemented Terrain3DCurveLayer for handling curves with width, depth, and dual groove options. - Added methods for managing layers in Terrain3DRegion, including adding, removing, and clearing layers. - Enhanced Terrain3DRegion to support multiple layer types (height, control, color) and their respective operations. - Updated methods to mark layers as dirty when changes occur, ensuring proper updates to baked maps. - Created utility functions for managing map types and their corresponding formats and colors. - Added bindings for new methods in the Godot scripting API.
…ionality in Terrain3D editor
…d updating active layer handling in Terrain3D editor
…ustment calculations
…age and add_curve_layer methods
…with coverage clamping and logging
…ty range in Terrain3DCurveLayer
…undant region modification calls
…ight handling and depth management
- Introduced falloff_curve property to Terrain3DCurveLayerPath for cross-section profile shaping. - Updated Terrain3DCurveLayer methods to handle falloff_curve for enhanced sculpting control.
…er for improved performance and accuracy
…nge and update collision handling logic
…Terrain3DData and Terrain3DLayer
…ced payload handling
…pdating layer stack logic in UI
…ons in Terrain3DData and Terrain3DLayer
… stack updates in UI
…thods and associated UI elements
…ndling and map update logic
…esh queue and clamping logic for dirty regions
… calculations in Terrain3DRegion
…stamps with enhanced texture handling and redeployment logic
…thods and introducing mesh snap request logic
529cfc0 to
5d04d56
Compare
- Introduce set_map_layer method for creating and updating non-user-editable layers. - Implement release_map_layer method for recycling tracked layer IDs. - Enhance _external_layers dictionary to track layers created by external tools.
…erPath / StampProjector)
…al tool integration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is currently a DRAFT and is intended for design review ONLY. Please do not merge.
This branch introduces non-destructive layer system for Terrain3D. The system supports multiple layer types, blending modes, and user-defined coverage areas, all composited in real-time.
Work In Progress Status
Please note that this is a prototype, and there are currently many known bugs and performance issues. Reviewers should focus solely on the architecture and code structure rather than testing for final stability.
Key Architectural Changes (Review Focus)
Given the feedback on infrastructure changes, I've prioritized an architecture that is flexible and performant. Your review of these core structural decisions is critical:
Layer Architecture: Introduces a Terrain3DLayer base class and specialized types (Stamp, Curve, LocalNode). This is the primary architectural change—review is needed on how this class structure integrates with the existing Terrain3D node.
Data Organization: The MapType enum has been refactored into a standalone terrain_3d_map.h to improve code organization and support the new layer logic.
Performance & Dirty-Tracking: Implemented a new layer compositing system with aggressive caching and dirty-tracking. This is essential for real-time performance—I'd appreciate feedback on the caching strategy.
Editor Integration: Basic UI elements have been added for layer management and active layer selection within the editor.
Next Steps (Pending Design Approval): Once the core design is approved, I will focus on bug fixing, performance stabilization, and breaking this into smaller, production-ready PRs for merge.