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?