GithubHelp home page GithubHelp logo

abpy / improved-sapling-tree-generator Goto Github PK

View Code? Open in Web Editor NEW
139.0 29.0 24.0 520 KB

A new version of Blenders sapling tree generator addon with improvements, new features, and bug fixes

License: GNU General Public License v2.0

Python 100.00%
blender 3d tree generator procedural-generation plants

improved-sapling-tree-generator's Introduction

Improved Sapling Tree Generator

A new version of Blenders sapling tree generator addon with improvements, new features, and bug fixes

  • For blender 2.7: add_curve_sapling_3
  • For blender 2.8: add_curve_sapling_3_2_8
  • Latest: sapling_4

New Alternate Version "sapling_4"

  • includes many changes to improve usability and appearance of trees
  • breaks backwards compatibility with older presets
  • Change Log:

  • rearrange interface, remove, add, rename settings
  • add alternate / opposite attachment setting
  • smoother interpolation for custom shape
  • removed pruning
  • splits alternate direction
  • remove taper crown
  • improve split radius ratio
  • split angle is now actual angle and half as much as before
  • branch straightness affects all levels
  • positive curvature now curves branches up
  • curvature variation is consistent with resolution
  • length variation affects branches without splits
  • removed curve back
  • improve distance mode
  • change to radius calculation
  • change distribution function
For tips on using the tree generator see tips in the wiki.

The blender 2.7 version of this addon has been added to blender master as of version f7cca89 with small changes.

improved-sapling-tree-generator's People

Contributors

abpy avatar garfield96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

improved-sapling-tree-generator's Issues

Multiple anims

Hello @abpy !
Do you know a way to have more than one animation for a tree? It is very useful when we want blend from one animation (like idle) to another (like wind).

Adjust trunk height

Hi, I have tested the current sapling tree generator found in experimental 2.8 (not sure if they are the same as you said it been merged to master), and I would like to know if it were possible to adjust trunk height or the part of the tree that's not branched out. It's a bit difficult to do that right now as you have to experiment with many control until it looks just right. If it were possible to just adjust trunk height with no changes to other part of the tree, that'd be a improvement.

The best way I can do this is to change the first box below branch: under Branch Growth. The problem is that it dramatically affects the tree outcome.

sapling-tree-generator menu is unresponsive after curve-add

Greyed. See ?
screen shot 2018-03-26 at 8 31 41 pm

Happened first time, only today.
Tested the existing game files where it worked (ie., tried to add a new tree) and then empty file: Each time, the menu is inaccessbile and always grey.

Did something go missing in the source??

It's not an important issue

Hello @abpy !
I'm happy you continue to improve this addon.
Do you know a way to edit (modify) specification of tree, even after creation?

[B]Presets are now saved to the user presets folder

I noticed in your updates that presets are now save to the user preset folder. Yet this isnt the case if the addon is installed within the Blender app, like the prior version.

I test this by adding this 3.1 version on OSX in the blender.app>scripts>addons

When i than save a preset it is saved to scripts>presets>operator>add_curve_sapling_3 just like before. Why not add a custom folder within the addon folder and save them there?

add on runs very slow to me

I have an 2011 iMac i5 with 8GB of ram in the office. And a i7 4930k (6 cores and 12 threads), with 32GB of ram and a GTX 980 ti in my home. The add on works very smoothly in the imac, but extremely slow in my very capable PC with the same tree assets.

Someone else has this issue?

Thanks in advance.

Question on the shape of the leaves.

Снимок
I wanted to make such leaves. But not very comfortable with "Leaf Objects"
Objects must be in the scene. In the center of the scene. Their size affects the size of the leaves. Objects do not hide (H) and do not throw on another layer. Stop working. Why not add a rhombus to "Leaf Shape". Also add a function - double and double with reverse rotation. The first function rotates two shapes together around an axis, and the second rotates the shapes in different directions along the same axis. Like it is folding.
    You have a cool addon. Very useful.
    Previously, a familiar programmer was making me a diamond. :) And I lost :)
     Sorry if I write like a fool. Googletranslit. Thank you for your patience.

Exception when increasing Radius Scale Variation

Hi,

Great addon. Thanks for picking up the development of this. I'm still learning my way around but it looks pretty potent.

I ran into an error and thought you might find this stacktrace useful:

tree bug

saspling_4 - not sure if issue or user fault ;)

I downloaded the new zip but couldn't install. I pulled out "sapling_4" folder and placed it within the Plugins folder. I even replaced files ion the 3.4 version. I did this in versions:
2.93
2.935
3.0 alpaha
I cannot get it to show in plugins or work. :(
Any suggestions would be greatly appreciated.

Recover edition mode

Could you add an option or the ability to recover the edition of tree when we handle other opxtions like move the light ??

DupliFaces leaves after tree creation.

Hello:) As usual - thank you for your amazing work on this powerful add-on.

I do however have a big problem with the leaves when I use an object (dupli faces). After the tree creation I would like to separate the generated leaves in to a full object (not just the faces which from the duplis are created but as a complete mesh - similar to what would happen if you'd convert a particle system to be "real"). And here is the problem - from the Blender UI perspective the dupli objects seem to not exist. I guess there is a particle system in the background (because adding a new one makes the sampling duplis disappear) however there is no way to fiddle with the particle system through the UI or the addon menus before completing the creation of the sapling tree. The outliner doesn't register any particle system on the leaves and yet it is there.

Why is it a problem? Well, with this state of things the baking option is broken to the point of simply crashing blender. What I want to do is bake (to a plane - normal, specular, smoothness, albedo etc.) a small branch of an alien tree with large leaves I made, to then use it as a basis for a more detailed/low-poly leaf system for the final tree. Do you know any solution for this? Or can you direct me to a way of "materializing" the particle system behind the dupli faces?
ciennik soczewkowy drzewo

Wrong resolution for last-level branches

Some splits at the end of branches appear to be unaffected by the resolution settings specified in the splitting settings. This is quite inconvenient when trying to make low-poly trees.

TreeGen

[Q]Do you mind if i use the code save presets

Hi there,

Im trying to make an add to the rigify addon so users can make presets of bone groups and load these with their own set of colors.

My question is, is it okay if i use the part of code where you save / load presets?

Material place holder for branch levels

Great add-on!

Would there be a way to easily add a material place holder for each branch level?

Example - I want to add a large scale bark texture to the trunk and main branch limbs, I then want to add a medium scale bark texture to the second level of branches and finally just a grey/brown color to the third level (twigs) of branches.

Having a material setup for each level of branches, by defalut, would make this easy to do. Without material place holders I have to select individual curves to assign the different materials. This is ok for trunk and main branch limbs but gets quite time consuming for all the smaller branches at levels 2 and 3. The material place holders don't need to be anything more than just a material name assigned to the branch levels, so you can select the branches by material.

Thanks for all your work on this! Especially dupliverts for leaf objects!! Much appreciated!

Wrong Leaf Object Name with Prune activated

The option Prune creates an extra object (envelope) making the name of the objects not corresponding to the actual object. The position of the object name is offsetted by one.

image

Rotate world

Hi,
I love this addon and i like to create with it branches as well.
but to have good results i need to rotate the the whole Tree 90 deg in x or y but with gravity still pointing upwards. so leafes and branches bend and point up
is such a thing possible?

Likely future

Hello @abpy !
I show BGE work flow in this clip:
http://www.aparat.com/v/n93le

1- Clear parent tree from treearm
2- Clear parent leaves from tree
3- Convert tree and leaves to mesh (leaves conversion is optional)(Texturing and other stuffs can be now or later)
4- Parent leaves to tree
5- Parent tree to treearm with automatic weight (automatic weight is necessary and if we parent with object and keep transform and then add armature modifier to tree, then we have to set to bone envelop in modifier and not work on BGE)
6- Add armature modifier to leaves (if leaves converted to mesh manually)
7- In this step, if we add logic bricks to treearm, leaves animation works in render mode and don't work on BGE.
8- The solution is change the parent of the leaves from tree to treearm.

So this work flow can be reduced if there is an option in menu for auto conversion tree to mesh.

Current state of tree gen is random seed based. How we can have more control on tree specifications, like this (as inspiration not adoption):
https://www.youtube.com/watch?v=LrGt27UIPxk

There are some easy tricks like this:
http://www.aparat.com/v/vYlzQ
But how implement armatures and leaves!!!

Future plans can be:

1- Wind direction (Wind effect on leaves and thin branches and subbranches is greater than thick branches and trunk and main brancjes, so armature animation must be differ)
2- Underwater vegetation physics (slow movement)
3- Growth improvements (This script can be useful as inspiration and ideas https://github.com/Tlousky/ivy_growth_animator)
4- Animation optimization for BGE (more or less like current control on wind speed and etc in menu)
5- Grass gen (optimized armature and size and ... for render and BGE) and grass growth (more or less In current state can be done but with time-consuming and grass textures can insert on leaves but for BGE this is resource-consuming because of branches overhead)
6- Change specification any time (Current state is first produce and use for all time without change parameters. It is better to be: first produce and change parameters and optimize any time) -> armatures and leaves and vertices is a challenge.

Finally some gnarled trees. Do you have any idea?
gnarled-tree-roots-and-trunk-by-lake-mendocino
149921_ac75f7b429ad3ab7a1a5433e35c8e3a1_large
gnarled-tree-wales
and fantasy persian tree (artist: Mahmoud Farshchian):
mahmood farshchian

leaf object

First,Thanks for your addon!I love it!
I try to replace leaves with crossed planes(one object,origin in the buttom of plane center),and I chooes DupliFaces but nothing happened only some random rectangular in the branch , also show leaf was checked.
How to use leaf object?

Simple update may be needed.

Hey there!

I just wanted to say thanks for all the work you are putting into this. It has helped me tremendously in porting to 2.8. I have been skimming through the code to work with my addon script and noticed that for the 'wind' property, it may have been overlooked (converting it to a keyword argument). See below:

image

Obviously not a huge deal but figured it was worth mentioning for future iterations!

EDIT: Hey sorry, I don't mean to pile on but figured since I was going through the code line by line for my own code I would keep tabs on anything I spotted: In the init.py file, when you are unregistering your menus, you have an '.append' where it should be '.remove'. See below:

image

Top branch

Hey, great job! Is there an option to turn off that top branch sitting directly on top of the stem? The old sapling didn't have it and I think sometimes it's useful but then sometimes it's not. Thanks!

re update sapling addon

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.
Brendon..

ramification of the armature

Hello, there is a feature that I think is missing, the depth of ramification of the armature, this would optimize models for use in video games

Sapling: Add Tree settings will not reappear after clicking on another menu

I'm sorry if this issue has already been reported, but it's a bit of a pain. I heard this is standard Blender behavior and maybe there's no way around it...but if it's possible, that would make this plugin perfect!!

I guess for now we just have to reallyyy make sure we're happy with our tree before we click out of it. Thanks!

"Curve Back" is missing

I think this "improved" version of the Sapling Tree Generator is trully improved, it offers more control on many things, like the whorls (didn't knew I missed that option until I used this addon).

But one thing I miss is the ability to make branches (and trunks) in a S like shape using the curvature and back curvature. Would love to have that feature in this version.

Sapling Tree Gen DupliVerts/Armature Problems using custom leaves

This problem seems occur in all the sapling tree versions!!

If we use the leaves preset all works fine but if we choose to use custom leaves object when we choose add armature all of the leaves on my tree stand straight up is same direction broking all the random rotations that i had before i add the armature! and choosing to be animated the leaves nothing happens to them they get frozed can't be animated. None of the leaf scale options seem to work either. This happens no matter which object I use as a leaf.

Impossible to preview armature animation?

Hello friends,

First let me state this is a phenomenal add-on, and your work on improving it is definitely paying off.

I would like to bring an issue to your attention; perhaps it will help the developers here.
When trying to use an animated armature for my plant (which has 3 levels and 21, 21, 14, 1 for curve resolution) the "Use Armature" "Armature Animation" and "Leaf Animation" check boxes all take 30+ seconds to update after initiating, then, trying to preview the animation is impossible.

Now I understand with so much curve resolution this would be understandable. However, all I need to see is the armature itself animated, nothing else. This, unfortunately, is impossible to achieve at present.

At some point in the old sapling add-on, you were able to preview your wind speed changes, etc. thanks to the fact that ONLY the armature was animated while the add-on was still active in the toolshelf. However, in the new sapling add-on, the curve's armature modifier also becomes activated by default, forcing the framerate to drop to zero (or simply freeze). I've tried disabling the armature modifier, hoping to preview only the armature animation, but unfortunately, as long as the add-on is active, the same problem persists.

As soon as the add-on is no longer active, however, you can happily disable the armature modifier on the plant and watch the motion of just the armature with relative ease.I've included my preset file which shows the issue. I've also included my oat husk primitive which serves as the dupliface object. While this issue is visible even without the primitive, I've noticed you can't adjust most of the settings in the Leaves tab if "Leaves" is set to -1 (not sure if this is a bug or intended, as I'm still learning this add-on). One other small thing I noticed is that some (not all) of the stems appear to be partially severed (cracked) just before the tips, and in general, are too pointy when cap ends is selected. I'm not sure how to avoid these other smaller issues.

Many thanks for reading this and for all your hard work!

~Adam Janz
P.S. Please remember to disable "Limit Import" when you load my preset in the starter file, as it has 3 levels.
Oat_husk_starter_file.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.