Skip to content
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

Add options for bevel amount #48

Closed
jayfield1979 opened this issue Jul 22, 2021 · 4 comments
Closed

Add options for bevel amount #48

jayfield1979 opened this issue Jul 22, 2021 · 4 comments

Comments

@jayfield1979
Copy link

jayfield1979 commented Jul 22, 2021

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
Copy link
Owner

friggog commented Jul 22, 2021

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
Copy link
Author

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 friggog changed the title Could you add 'Bevel Modifier' option? Add options for bevel amount Jul 24, 2021
@friggog
Copy link
Owner

friggog commented Jul 27, 2021

Regarding bevel amount, currently hardcoded for object here:

tree-gen/parametric/gen.py

Lines 231 to 234 in 0b0bc62

self.branches_curve.resolution_u = 4
self.branches_curve.fill_mode = 'FULL'
self.branches_curve.bevel_depth = 1
self.branches_curve.bevel_resolution = 10

Curve resolution also hard-coded in a couple places

new_spline.resolution_u = 6

trunk.resolution_u = 2

@samipfjo
Copy link
Contributor

Awesome, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants