IvyGen: Generating Ivy in Blender (Updated 2 Aug 2011)

Hi All,

Version 0.0.3 now uploaded, changes include;

  • Better control over ivy growth as all parameters are now measured in Blender Units and do not change with the size of the object.
  • Better error checking (thanks to PKHG) to ensure no infinite looping.
  • New default values for parameters to give nice results as default.

Cheers,
Truman

@Truman
Indeed, works much nicer now, and all others should update too!

It still seems to act funny. For instance, the parameters appear in the upper portion of the Tool panel. I had expected them in the lower portion of the tool shelf where scripts generally run. But thats Ok, I clicked Generate Ivy and it did make some ivy, but then the lower portion of the tool shelf changed it’s heading to Ivy Generator and the parameters in the upper portion of the tool shelf disappeared. So I ran the script again and got nothing. I checked the console and did not see any errors reported. But On Windows XP64 it looks like you can only run it once.

Thanks for porting this script, I do like it, I hope this feedback helps.

Hi Atom,

Feedback is the best possible thing in the beta stage so please keep it coming!

The parameters most likely disappeared because the cube is automatically deselected by the script, I think this should change in future. If you reselect the cube (or any mesh), the parameters for a new ivy object should reappear in the upper portion of the toolshelf. However, at this stage hitting generate ivy again will create a new ivy object rather than modifying the old one. This because the generation is slow.

Cheers and hope that clears a few things up,
Truman

Maybe we shouldn’t use a poll of the … but give only an error-message, if no suitable mesh is selected.
Or in the Panel is shown, which (suitable) object is selected or NONE :wink: this by sure would be helpful, wouldn’t it?

Hi All,

Version 0.0.4 has been uploaded with the following changes:

  • Removed deselection of object after generation
  • Removed panel and property group
  • Added ivy update button
  • Cleaned up registration

Please see the first post for updated usage instructions.

Cheers,
Truman

Hi All,

Version 0.0.5 has been uploaded, changes include;

  • Added a “Add New Ivy” button to make adding new ivy with the same properties easy
  • Fixed code to be able to work with objects that have not had their transformations applied

Cheers,
Truman

With version 5 I get an error about matrix multiplication on line 405.
Using Blender 2.5.8 r38533 x32

Here is the mesh geometry I used.

Attachments

25_ivy_generator-5.blend (432 KB)

I think it has something to do with this from the Developers Meeting Notes, July 24, 2011:

Python math utilities: there’s a bug in the code that treats “matrix * vector” and “vector * matrix” the same. They mean something else mathematically though. Campbell added a warning in console for wrong usage. Final fix then will happen 13th of September.

@Atom
The SVN of about sunday changed the matrix vector implementation and TrumanBlending used that already.
Two ‘remedies’ possible: get a rather fresh Blender (say of yesterday or ) or revert the matrix * vector into vector * matrix in the code
at the lines (there are at least 3 places, where I did it too, after learning about the change , comipiled the trunk and no error :wink: )

@Atom.
Change of API … either get newest Blender (e.g. of yesterday) or change matrix * vector (for a while) back to vector * matrix

Attachments


Hi All,

Version 0.0.6 is now uploaded, there are no extra features this time but a significant speed increase of around 40%.

Also, as noted above I’ve used the new Matrix/Vector multiplication requirements. This means a version of Blender post r38676 is now required.

Cheers,
Truman

awesome!
This is way too much fun!
http://www.pasteall.org/pic/show.php?id=15602
ooh, look flowers! my mesh is so happy!

Here’s my quick little test:

Great Job guys!
http://img190.imageshack.us/img190/5395/tmpyvci99.png

Hi All,

Version 0.0.7 has been uploaded and includes some more optimisations and different property max/min/precision.

Keep the images coming too!

Cheers,
Truman

Hello Truman,

I’ve been playing with this quite a bit since yesterday! very cool so far!

I think it’d be great if it auto saved the settings out to a text file (default addons path) when run and when the user hits the “update ivy” button. so the next time you open it it could autoload the last used settings…(with a set to defaults button too!)

I think that’s be useful when you want to re-use the same settings from multiple different start points… you could “tab” into edit mode to snap the cursor to a new position, tab out and then just add a new ivy!

Also +1 on users saving/loading presets!

@Michael
Truman did already a very good job, but I couldn’t see the difference of choices of the parameters …

I changed it using (again ) a panel, and your question for reuse is available too.

The image shows (a screen capture only, no further manipulation!) what happens if the cursor comes closer and closer to the cube :smiley:
E.g. the leaves get automatically that very green colour!

Here to be found: https://svn.blender.org/svnroot/bf-extensions/branches/ivygen/pkhg_ivy/
2197_pkhg.py is the version I refer to …

Attachments


@Michael
Truman did already a very good job,

Yep, where did I say otherwise?

As for moving the cursor…Well, sort of… of I want to snap the cursor to a vertex I can’t without losing the panel because i have to go into edit mode to snap it… I can move the cursor, sure!

I just think that some level of persistence between sessions would be a good thing and is actually fairly trivial to add with your own custom text file format…

Another approach:
the preset system is also well known by now with plenty of examples to reference… although that usually relies on outputting py scripts that set properties when run(on selection from the ui list)… it could also be a way to give persistence… have a “last used” preset auto saved on pressing the “update ivy” button and auto load it when running a session… then you can just load the default preset if you want to start over.

Oh, and the main difference i noticed was a shorter max length for ivy (now limited to3)

You can manually enter higher values by clicking the parameter though.

@Michael,
At my version I do not loose the panel! Or are you still referring to Trumans version, THAT is not a panel, but operator related GUI, which is closed, if you go into edit-mode (my reason to use a Panel!)

Would you be so kind and show us your ‘save’ code, please?