ngPlant - new plant generator

Hi, all! First of all, excuse me, if this message is an offtopic here…
After several months of development I’ve made first public release of ngPlant - cross-platform standalone application for plant model generation. Unlike my previous project - Gen3, this project is written on C++ and besides plant designer contains platform and 3D API - independent library which (in the future of course :wink: may be used as a base for creating plant plugins for different 3D applications.
Since this is first release, it is not feature-rich and bug free, but if somebody find it useful, I’l know that my time was not wasted ;))
Project homepage:

Looks interesting. I liked your Gen3 alot! It taught me how to model high-def trees.
I’m trying it out as we speak.

Cheers and keep up your good work! :wink:


Slowly I am figuring out how this works. This may well be useful to me! That said it would be more useful if I had some example files to work with. ; - )


I’ve just uploaded current version of User Manual to, it is not complete, but may be it helps…

i dont know if this is the right place but here it goes, i was trying to compile it and got this error, if you dont like me to post it here just ask and i can delete it.

ngplant/p3dwx.cpp: In member function ‘void wxSpinSliderCtrl::OnPaint(wxPaintEvent&)’:
ngplant/p3dwx.cpp:203: error: no matching function for call to ‘wxString::Printf(const char [3], int)’
/usr/include/wx/string.h:733: note: candidates are: int wxString::Printf(const wxChar*, …)
ngplant/p3dwx.cpp:207: error: no matching function for call to ‘wxString::Printf(const char [6], float&)’
/usr/include/wx/string.h:733: note: candidates are: int wxString::Printf(const wxChar*, …)
scons: *** [ngplant/p3dwx.o] Error 1
scons: building terminated because of errors.

If you have account, you can post messages in ngPlant forums…
As for your problem, can you post info about your OS, compiler and wxWidgets version? Anyway, I must fix this problem…
Edit: it looks like you are using wxWidgets 2.8.0… - I didn’t check compilation with this version. Current ngPlant version is not UNICODE-ready right now :frowning: Is it possible for you to use older version of wxWidgets, since 2.8.0 is not stable yet (RC1 only)?

Second public version of ngPlant (0.9.1) have been released. I think that most important thing in this release (for Blender users) is a fix for bug with incorrect texture coordinate exporting to .OBJ file. In this version this bug is fixed and it is now possible to use plants designed in ngPlant in Blender scenes (export model as .OBJ from ngPlant and import it into Blender). Additionaly this version contain utility ngpshot which can create TGA images of designed plants - these images can be used to create forest backgrounds and so on…
This version contains two sample plant models also (not very realistic - I’m just a developer :slight_smile: )
New version can be downloaded from
If someone find a bug, or have some ideas about improvements, please let me know - it will help to improve future versions…

To greboide: this version supports compilation with wxWidgets 2.8.0 in ANSI and UNICODE modes (thanks to Kai Schroeder who send a patch for this).


Glad to see an open source plant generator useable with Blender. I’ll need trees at some point for my current project so this may be useful.

What would be very useful would be to have some Blender renders of the plants generated to help gauge quality. From the website, for example, I was left wondering whether alpha-mapped/geometry leaves are supported by ngplant.

Anyway, keep up the good work. Programs like these are invaluable when you find yourself needing them (seeing how rare they are!).


Hi, i got a compilation problem too.

i just downloaded the recent version and tried to compile it.

By the way, i’m using SuSE Linux 10.2

ngplant/p3dcanvas3d.h:33: error: expected class-name before ‘{’ token
ngplant/main.cpp: In constructor ‘P3DMainFrame::P3DMainFrame(const wxChar*)’:
ngplant/main.cpp:83: error: invalid conversion from ‘P3DCanvas3D*’ to ‘int’
ngplant/main.cpp:83: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’
ngplant/main.cpp: In member function ‘void P3DMainFrame::InvalidatePlant()’:
ngplant/main.cpp:221: error: ‘class P3DCanvas3D’ has no member named ‘Refresh’
scons: *** [ngplant/main.o] Error 1
scons: building terminated because of errors.

Alpha-mapped (semi-transparent) textures are supported, but there is no support for custom leaves geometry - rectangles only. You can see such leaves on first three screenshots on website.

Thanks for reply!

It looks like your wxWidgets installation has no OpenGL support (was configured without --with-opengl switch), so wxGLCanvas class is not available. Do you use wxWidgets from SUSE packages or you build it yourself? If you use SUSE packages, do you have wxGTK-devel… and wxGTK-gl… packages installed?

This is very usefull application. I really appreciate your work!

Compiles nicely on Ubuntu Edgy Eft. All I had to install was libwxgtk2.6-dev


Thanks for report, since I have only Debian and Mandriva to test.
I’ve tested compilation on Debian Sarge with wxWidgets-2.4 and wxWidgets-2.8.0 and on Mandriva 2007 (do not remember what wxWidgets version it uses). Additionaly Windows executables were builded on Debian using mingw cross-compiler (wxWidgets-2.8 was cross-compiled too). I had no problems on these systems.
But it looks like on SUSE 9.2 something is wrong with wxWidgets installation since Linny got errors on compilation. Did anybody successfully compiled ngPlant on SUSE?

hi stager13 thanks for your promptly answer and now error free compilation i dont have enough time to proper test ngplant now but as soon as i have it i will let you know what i think, i would also like to apologize myself for taking so much time to answer but i didnt had a net connection in this meantime.i have gentoo here on amd64.

Hi, thanks for this great tool,
i realy love it :yes: , it’ s almost like Xfrog, now finaly i can make some realistic trees.
Only it’s still hard to make some plant types, maybe you can add a leave mesh instead of a square for creating larger realistic leaves, and maybe a fruit object (sphere), flowers are also hard to make, but one thing it does fine and that is creating trees:yes:
again thanks, and maybe i will post some pictures and models in the future.
greetings, Jim.

Thank you! This program looks like it will be great.


Yes, we have some problems with leaves :wink: Next version will have some improvements in this area, such as an ability to give some curvature to ‘Quad’-leaves and new stem model - ‘Wings’. This will not solve all problems, so implementing support for generic leave and fruit objects is in my todo list (not for 0.9.2 version, since it’s almost ready)…

It would be interesting to look at your work, since I have no enough time to use ngplant - I have to develop it :wink:

Thanks for your message!

Hi! ngPlant 0.9.2 is ready. You can download it from
Some major features and improvements in this version:

  • Wings stem model implementation. This stem model is useful for modeling palm leaves, ferns and similar ones.
  • Quad stem model improvements. Now Quad stem can be bent along its Y axis and scaled depending on its location on parent branch.
  • “simplefern” plant model - example of Wings stem model usage.
  • High-level interface for C++. This programming interface allows to use ngPlant models in real-time 3D applications. Documentation for HLI can be found in source code distribution or at project website. ngpshow application (very simple plant viewer) is an example of using HLI in real-time 3D application.
  • Python bindings for ngPlant HLI. Now it is possible to create plant models exporters and viewers using Python programming language. Python extension module documentation can be found in source code distribution or at project website. script (.ngp to .obj exporter) shows how to create .ngp exporters using Python.
  • Other small bugfixes and improvements. Thanks to everyone who helps me to develop and improve this application! As always your comments, suggestions and bug reports are welcome. Sorry if some of your feature request have not been implemented in this version.

What I really like about Gen3 was the ability to immediately create a usuable tree for a scene. A few button presses and several hundred billion CPU cycles later a tree appeared as a model within the Blender scene.

I had no such experience with ngPlant – although I can appreciate just how much more control over the tree is available. Unfortunately, that complexity has overshadowed the simplicity of the Gen3 interface. Hopefully there will be some middle ground in the future releases. Now it might be a wet-ware (or documentation) problem, however I was not able to quickly generate a plain ol’ North American maple in a few minutes. It’d be wonderful if there was a number of preset configurations for different trees that people could give you for integration in subsequent versions. That way, if a person wanted a maple tree, they could just select the type of tree from a simple database of tree settings.

You could even post the database on a website. The Python interface could download the new database of tree shapes, and then everyone could (1) help build a database of trees (and leaves); and (2) provide a quick-and-dirty drop-down list that is dynamically updated.

Thanks a lot for this cool program…though I already have Gen3…I’ll try to test & compare…