improved sapling tree generator (Release Ahoy) #46559
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#46559
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Improved Sapling Tree Generator
new version of the sapling tree generator
github: https://github.com/abpy/improved-sapling-tree-generator
version numbers and file names could be changed if needed
(right now everything has a '3' on the end to differentiate it from the original version)
improved-sapling-tree-generator.zip
Changed status to: 'Open'
Added subscriber: @Abpy
Added subscriber: @BrendonMurphy
hi, this is a great update & it's wonderful to have a new maintainer for this addon.
Added subscriber: @Blendify
I cant seem to install the addon it never appears after installing it, I tried with overwrite both on and off and did not change anything
Added subscriber: @Harvester
Aaron (Abpy) to let your addon live together the official one, and considering that I store all non-official addons like your inside the ...\scripts\addons_extern folder (as it was available in the past, patching the file addon_utils.py), I modified the init.py file of your addon at line 93 and 792 respectively as follows:
presetpath = os.path.join(p, 'addons_extern', 'add_curve_sapling_3', 'presets')
self.layout.operator(AddTree.bl_idname, text="Add Tree 3.1", icon='PLUGIN') #To distinguish between the two
It would be nice if the script would be directory agnostic instead of hardcoding it's inside the \addons one. I forgot to tell you that I use only the zipped version of Blender.
Anyway, your script works fine to me at a first sight, and if it's planned to replace the old one then just disregard what I wrote previously.
@Harvester,
hi, yes the plan is to replace original sapling with the new version. It's interesting that you use addons extern still. I also use this folder extensively for my addons repo. However, most users will fail at this & it's not a recommended action to take.
@Blendify, try to manually install the addon, you will need to add the folder add_curve_sapling_3 into the addons folder.
@Abpy, hello & welcome, it might make it easier for people testing if you have only the add_curve_sapling_3 addon folder in your zip file. If you could list some of the changes (improved branching algo, new presets, usability improvements) it would be good too. I'll test out the presets & remake the existing presets as close as I can soon.
Thanks
@BrendonMurphy there is a change log on the git hub page
@Abpy It will be helpful if you create a differential https://developer.blender.org/differential/diff/create/ that way it will be easier to review the code. I got the addon to install finally, I think your file structure is confusing Blender. After a little bit of testing I got a crash of the addon when trying to change the trunk height. To reproduce this I used try to drag the truck height to a value of 1 or more. Trace back
Another issue is the F6 menu does not work correctly with the addon
hi, I don't know what the best way to do the paths is. It may depend on where its installed. So if someone knows the right way, it can be changed.
Remove the two documents in the first folder rename the zip to
add_curve_sapling_3
don't have the nextimproved-sapling-tree-generator-master
folder and delete the the license and other document. This worked for me. Here is what it should look like with these changes:add_curve_sapling_3.zip
Oh!, I didn't realize I zipped the whole thing, sorry, yea that stuff wasn't supposed to be there.
Glad to help :)
Another feature that would be helpful is an update armature button, that way you only have to update the armature once when doing edits and changing different armature settings.
@Blendify, I'll confirm the float division by zero error. Whilst your armature suggestion is valid, it's also workflow related. The order of the settings directly relates to the order that tasks should be completed in.
@Abpy, With the float division by zero error on trunk height, check commits on sapling, it rings a bell that we have fixed similar error already,
https://developer.blender.org/diffusion/BA/history/master/add_curve_sapling/
There's an issue with armatures & animation, in my test on a fairly heavy tree the armature had not collected all verts causing artifacts. (possibly wrong verts attached to wrong armature due to the heavy tree), maybe some limitations need to apply here as it was quite a heavy mesh & slowed my fast computer to unusable. (unable to playback animation in viewport.)
Also there still exists (same as Sapling) an issue with pruning & armatures. Possibly a button to apply pruning would solve this. (unable to add armature to pruned tree)
A note also, please try to work on the addon using builds from buildbot https://builder.blender.org/download/ this way the addon is prepared for the next release as api changes occur during this time. most serious testers will be using these builds.
thanks.
Armatures are limited in a few ways:
1, doesn't work with with auto curve handles or intersecting branches because of bone envelopes.
2, doesn't work with pruning, this should be fixable
Heres the latest version with trunk height fixed:
add_curve_sapling_3.zip
Hi Brendon. Yes, I have very good reasons to still use \addons_extern, which are to keep in sync the \addons and \addons_contrib with the GIT repositories, and because from day one I discovered Blender four years ago I've NEVER installed it but always used the zipped version, which works perfectly, and it's out of control by Windows OS and its user rights management.
Therefore, I'm not relying on the local user C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender folder but instead I isolate Blender adding four folders inside it: \autosave, \cache, \config and \temp. This means that I simply need to create a \2.7x tree directory structure somewhere with all the "other stuff" I want inside it, including the \scripts\addons_extern folder and when I unzip a new version of Blender I "simply" copy over my custom content (including those four folders above mentioned and a customized addon_utils.py file).
The good thing about open source projects like Blender is that I have access to all the files' content in plain text and I can read them ... because I'm too curious and I want to understand. Therefore, the reason the "normal" user fails on using the \addons_extern is because they leave to Windows the control of the installation or are afraid to change anything inside Blender. I'm not and I love this freedom.
This is the customized addon_utils.py file I use (double checking every time if anything has been changed in the original one to keep it consistent, comparing them with Notepad++) and only two lines have to be added/modified: 58 and 162.
addon_utils.py
@Abpy can you add this to the differential tool? https://developer.blender.org/differential/diff/create/
Added subscriber: @FraYoshi-2
Added subscriber: @truman
@truman
good to go.
no activity here, changing to Normal priority.
there's enough time spent on this seemingly simple upgrade already.
Ok, so what do I still need to do. Do you want to use the most recent version from the [github ]]? Also should the [ https:*developer.blender.org/T46718 | preset bug be fixed first in master? Maybe I could provide a diff.
Hi @Abpy I would like to see the preset bug fixed in your file & yes will use the most recent version from your github. I*'ve spoken to @truman & he's happy your updating.
One interesting thing may be worth adding is: In Edit mode the Merge Bones Alt/M could be useful with the Sapling Armature I have used/tested this & it works very well. My workflow was create tree, add armature, animate, merge bones & the animation was still intact, not as precise but working with very few bones. might be worth a try.
Thanks for your help here.
hi, i've been testing your sapling addon again & have been very pleased. I'm happy to commit to blender asap, just a couple of small things.
maybe 1 or 2 lines too long in utils
really would like a way to apply then delete the prune "envelope" object. (from a user perspective it's bad to set up your prune & try to rig & have failure)
That's it, hope your well.
Note: I wouldn't be concerned with feature requests at this stage, rather have stable improved code sooner, As it stands it's a comprehensive addon.
Edit: If pruning operator (menu element) is above the armature the menu workflow is better. In fact the pruning works on the armature. It only appears to fail (create a single line of bones) when the pruning reaches a certain threshold. It's easy to see once the workflow is create armature first, then go to pruning & adjust the levels. Quite cool really but quite touchy too, taking only small variables.
So that's pretty good, I can fix the smaller issues, a way to delete or apply the pruning object "envelope" would still be good, but not needed for this to proceed.
Hi, I've updated the Sapling Addon to fix issues.
My fixes on top of @Abpy
Clean up whitespace,
Fix long line lengths.
File renaming.
Fix Armature, Tree location generation to 0,0,0 (this was causing fails with armature weights & probably pruning)
Move Animation UI to own ui section.
Organize ui so it works in a linear fashion. (Each menu used consecutively builds the tree & leaves & armature, then Pruning & Animation.)
File: add_curve_sapling.zip
Tests welcome, will commit in a few days if no-one objects.
hi, I've tested your version and heres what I found.
Armatures and pruning still do not work in 2.76 or 2.77.
I don't think there is any change to attractup.
I like armature and animation in separate panels, I was starting to get too crowded.
I think the prune settings should be after branch growth and before leaves, because pruning is applied to the branches, then leaves and armature are applied to the resulting tree.
@Abpy
Thanks for input, I made your suggested changes It works well & less error prone for sure.
I was comparing the "willow" preset from the original sapling, to see if it can be recreated in your version, It looked like attractup & changes to vertical attraction, but might be just how the new algo handles them, we move on from that.
One final code suggestion: Is it possible to put in some error checks? As you said Armatures and pruning still do not work in 2.76 or 2.77., at least not well. Is there a way to warn user of potential errors & stop them?
That said, overall there's a great improvement in functionality, reduction in errors & I think it's worth making the change now to get feedback.
Lastly, did you have any presets you wanted to include? There have been requests for Pine & Fir. If you have any, send here within next 2 days please so we can commit this.
Thanks very much, I'll do a release ahoy for this addon now & change priority.
File: add_curve_sapling.7z
Note: This update breaks backwards compatibility with current presets, they may still be used but results will vary from original.
improved sapling tree generatorto improved sapling tree generator (Release Ahoy)Ok, looks good.
Just 1 little change 'Fast Preview' should be in the animation panel.
Heres the presets I would like to add including my own japanese maple to replace the current one.
presets to add.zip
@Abpy
Added your change & small ui change in animation.
Added your latest commit from here: https://github.com/abpy/improved-sapling-tree-generator
Added Presets.
File: add_curve_sapling.zip
Are you going to update your git to match this version?
Note: found small issue, In Leaves dupli object if there's no object available for the menu it adds a warning to the console:
RNA Warning: Current value "0" matches no enum in 'CURVE_OT_tree_add', '(Null)', 'leafDupliObj'
this seems harmless, but maybe a better way to handle?
Thanks for patience & hard work
I adjusted the settings and changed the name of some presets:
("Weeping Willow.py" to replace "Willow.py")
adjusted presets.zip
I will probably maintain my own version separately.
Changed status from 'Open' to: 'Resolved'
Committed:
c3a6d9132a
@Abpy Thanks again, If you have any future updates please start a new Task, I'll look at your repo regularly, but best if you can periodically send your updates here.
If you would like access to commit directly to Blender Addons please send a request Attention: Ideasman42 to bf-committers@blender.org
"Hi, I'm the new developer of sapling, I would like commit access to Blender addons repo." will be enough to get the ball rolling.
Closing as resolved.
Added subscriber: @MarcoArdito
HI, I've just answered a question on BSE about this addon, about the origin being always 0,0,0 instead of the current 3d cursor location.
I've read the comment above stating that about "location generation to 0,0,0 (this was causing fails with armature weights & probably pruning)" and I thought that if there is no better solution, maybe you could store the initial 3d cursor location, then generate all at 0,0,0 and finally translate the completed object at the save location...
Added subscriber: @zebus3dream
Is it possible to make the sapling settings not be in the recently used tools panel, is it very easy to unintentionally do any other action and lose the configuration panel?. Is there a possibility that the trunks have uvs and/or textures?
In my work we have ruled out using sapling for those two reasons alone. I think it would be ideal to be able to solve them.
Thank you.