friggog / tree-gen

Procedural generation of tree models in blender
GNU General Public License v3.0
827 stars 74 forks source link

Add options for bevel amount #48

Closed jayfield1979 closed 3 years ago

jayfield1979 commented 3 years ago

Hi,

Love the add-on. Really useful and better results than Sapling.

This is more of a feature request:

I really think you could provide the option to set the 'Bevel' amount of the spline for the tree instead of hard-coding it at 10.

It seems excessive and an oversight considering you are able to change the Curve Resolution.

I've had to manually adjust your code to reduce the Bevel amount to 2.

Could you please either:

a) add a global Bevel amount option to the 'Tree Parameters'?

or (even better)

b) add the option to adjust the Bevel amount for each of the 4 'levels' and add this to the 'Branch Parameters'?

I appreciate option b might be a bit more involved, but it would add a huge amount of control for those of us using the add-on for mid-distance range trees.

Oh, and one last thing, when the tree is automatically converted to a mesh, is there a way you could run a 'merge by distance' for the verts? Set it to something really low like 0.0001m. That would be useful. Maybe offer it as a tick box?

Thanks for your work on this. Keep it up!

friggog commented 3 years ago

Glad to hear you like the add on 🙂 these are all great suggestions and certainly something we can look at. Can’t promise anything in terms of ETA unless @luketimothyjones can take a look sooner, or you’re welcome to have a go at implementing the changes yourself and submitting a pull request!

jayfield1979 commented 3 years ago

Thanks for getting back to me.

I'm not very experienced in Python for Blender, or Python in general. I come from a JavaScript background which is how I was able to modify the hardcoded Bevel amount. But, I'll take a look as it doesn't look too daunting. Hopefully you'll beat me to it :)

One last suggestion:

Consider adding the ability to add your own leaf object (like offered in Sapling). If your add-on had that, I think it'd be the perfect tree generation package.

friggog commented 3 years ago

Regarding bevel amount, currently hardcoded for object here: https://github.com/friggog/tree-gen/blob/0b0bc62a5af67fe6d8c86ab3a8a1bda3714407d0/parametric/gen.py#L231-L234

Curve resolution also hard-coded in a couple places https://github.com/friggog/tree-gen/blob/0b0bc62a5af67fe6d8c86ab3a8a1bda3714407d0/parametric/gen.py#L922 https://github.com/friggog/tree-gen/blob/0b0bc62a5af67fe6d8c86ab3a8a1bda3714407d0/parametric/gen.py#L266

samipfjo commented 3 years ago

Awesome, thanks.