Page 1 of 2

CaduneTree

Posted: Wed Aug 22, 2007 7:28 pm
by vojtek87
Hi again!

It's been a while since I last wrote anything here. MeshTree Studio is dead (if somebody occurs a crash at start, pm me - I've fixed it). I decided to write my own tree generator, here are some screenshots and a demo app.

Image
Image

Link to demo:
http://files.filefront.com/ctpreview06z ... einfo.html

What's going on?
- Tree skeleton generation (with roots), UVs, billboarded leaves and static fronds.
- Same algorithm as in MeshTree (Weber & Penn), but completely rewritten.

What's next?
- I have to document the code, then I will release a lib (closed-source, but for sure free for non-commercial usage, later probably for commercial also).
- Soon I will start writing an editor (cause this tree looks ugly IMO) for this. Sort of MeshTree Studio, but better and more user-friendly.
- Lighting and shadowing.

I know that gfx sucks, but well, I'm not an artist :)

So if this interested you, stay tuned for upcoming progress reports along with screenshots.

I almost forgot - any feedback is appreciated.

Update: 08 September 2007
Additional mirror for demo: http://cierpuchaw.ovh.org/ctpreview06.7z
CaduneTree v0.6b:
http://cierpuchaw.ovh.org/ctpack06b.7z
Both need 7zip.

Cheers!

Posted: Wed Aug 22, 2007 9:05 pm
by Praetor
This is great!

Posted: Thu Aug 23, 2007 1:46 pm
by Yanko
is there anywhere else you could host the file? I can never get to download from filefront =/

Posted: Sun Aug 26, 2007 9:45 pm
by Paulov
I offer free FTP space for Ogre projects.

I´ll try to download tomorrow and upload in my site.

Anyway, if someone sends me via mail would be apreciated.

Posted: Sat Sep 08, 2007 9:58 pm
by vojtek87
I decided to open it under MIT license. It was the least restrictive I found. Why did I do that? Well it's not commercial-quality, still needs lots of work and I hope someone will find it useful (at least what's already done).

I did not want to create an universal Tree class, you have to wrap everything yourself (you would probably do it anyway). To grow a tree you need a list of parameters and an Ogre::ManualObject (also Ogre::BillboardSet for leaves).

Sample usage.

Code: Select all

mParameters = new Parameters();
mTrunk = new Stem( mParameters );
mTrunk->grow( Quaternion::IDENTITY, Vector3::ZERO );
mTrunk->createGeometry( manualObject );
mTrunk->createLeaves( billboardSet );
Simple documentation is included.

Link: http://cierpuchaw.ovh.org/ctpack06b.7z

Now I have to write that damn editor, before I can do any further progress :wink:

Posted: Fri Jul 18, 2008 8:52 pm
by vojtek87
Recently (actually today) I came upon the Iris 2.0 project web page. I noticed that they have CaduneTree in their roadmap, just imagine my astonishment ;)

I have been terribly busy because of my studies throughout the year and now I have a full-time job, which I hope to keep even when the academic year starts again. That's why the progress I've made with CT tends to zero.

Nevertheless I've just uploaded "nearly finished" CTStudio, which is more flexible than MeshTreeStudio (remember almost unusable camera control? now it's rmb along with arrow keys), but still misses some useful features i.e. shadows. Having a working tool for generating trees, I was able to make some important bug fixes, which are of course included.

Link: http://cierpuchaw.ovh.org/ctstudio06c.7z

If someone else also uses it, please inform me if you encounter any bugs, fixing them is probably all I can do, taking into account how much free time I have. Well maybe I will add material changing into the editor during some rainy weekend ;), because now only default materials are used in CTStudio. This isn't a big problem, because material names aren't saved into .mtd, so nothing stops you from assigning them manually in code.

Also I hope you don't mind not working about box ;)

To finish, a screenshot:
Image

Posted: Fri Jul 18, 2008 10:23 pm
by ghoulsblade
hi =) yep, it's definitely a very interesting lib you have there, we're a bit busy with other things currently, but we'll continue to experiment with it at some time.
hagish made a partial lua binding in case someone's interested in that :
http://zwischenwelt.org/trac/lugre/brow ... dune_L.cpp
(svn://zwischenwelt.org/lugre/trunk/lugre for the rest)

Posted: Mon Jul 21, 2008 11:51 pm
by SiENcE
thank vojtek87.


i like your work very much. if you want you can help us integrating caduntree into iris2. i think your editor makes my life a bit easier :).

here you see caduntree+iris2 in action at the dusmania 10 hobby game dev meeting in frankfurt/germany:
http://picasaweb.google.com/sicaine/Dus ... 1762854674

regards

Posted: Wed Jul 23, 2008 10:27 am
by SiENcE
I have problems with displaying the trees in your editor. Maybe it depends on opengl but i don't know. Do you can provide also the ogre direct3d renderer plugin for your editor build?

I have an nvidia 9600gt card (no opengl problems elsewhere).

Today i'm going to test it with my ati and intel gfxcards.

regards.

Posted: Mon Jul 28, 2008 5:04 pm
by voxel
Looking good... will this export .obj files afterwards? Or just .mesh? or files for your API/lib?

I think .obj is best because it's neutral and artists can edit the trees, but if you have an API/lib for rendering - all the better!

Posted: Mon Jul 28, 2008 5:37 pm
by vojtek87
It exports only the parameters which are used to create trees, so you can say that it has its own API for generating them. Exporting to .obj or any other mesh format is pointless at this moment, because leaves are billboards. But this may be necessary in the future, as trees may be generated differently on different computers (depending on pseudo-random numbers generated inside). I will probably add possibility to save leaves definitions alone.

I promised SiENcE to fix something (update Ogre to newest version and provide a D3D renderer as an option as well as cleaning material scripts) during this weekend, but unfortunately I didn't have time. Will be done when I find some, I promise.

Posted: Mon Jul 28, 2008 6:00 pm
by Falagard
vojtek87 wrote:It exports only the parameters which are used to create trees, so you can say that it has its own API for generating them. Exporting to .obj or any other mesh format is pointless at this moment, because leaves are billboards. But this may be necessary in the future, as trees may be generated differently on different computers (depending on pseudo-random numbers generated inside). I will probably add possibility to save leaves definitions alone.

I promised SiENcE to fix something (update Ogre to newest version and provide a D3D renderer as an option as well as cleaning material scripts) during this weekend, but unfortunately I didn't have time. Will be done when I find some, I promise.
The best idea would be to export as a .mesh file, and don't use Ogre's billboarding system for leaves if that's what you're doing. Instead, export leaves in the mesh file and use a vertex shader to orient them toward the camera.
That way people could use trees created in your program without needing to even use your library. All they'd need is the mesh file and the proper shader to render it.

They'd need to have a card with shader support, of course, but that's pretty much a guaranteed requirement for modern games.

Posted: Mon Jul 28, 2008 11:48 pm
by SiENcE
@vojtek87: Thanks. i'm looking forward. I temp. fixed this problem by setting all textures to zero mipmaps in the materials.

I have nothing against generated trees, but they should look all the same on every client. For us is very important, to have Barks (incl. Fronds) and Leaves seperate. I'ts important for our Iris2 project, because we have different Seasons (spring,summer,fall,winter and .
In Winter most trees have no Leaves.

Leaves:
I think the best would be a an option to use your Shader Proposal or Billboards. Billboards because we don't want that Iris2 only runs on Shader Cards.

I don't know what gives the most performance.

Posted: Tue Jul 29, 2008 3:42 am
by voxel
SiENcE wrote:I don't know what gives the most performance.
I suspect leaves as separate is the fastest i.e all Billboards are drawn in one batch.

Making all the tree trunks(barks) group into one static geometry would also be very fast. Only the leaves would probably animate.

Posted: Tue Jul 29, 2008 4:23 am
by Falagard
voxel wrote:
SiENcE wrote:I don't know what gives the most performance.
I suspect leaves as separate is the fastest i.e all Billboards are drawn in one batch.

Making all the tree trunks(barks) group into one static geometry would also be very fast. Only the leaves would probably animate.
Billboards are drawn in one batch for a single BillboardSet. It would depend on whether each tree has a BillboardSet or the scene is partitioned into a grid of billboard sets.

For example, if it was a single mesh, using shaders for leaf orientation, and didn't use Billboards it would integrate directly into the JohnJ's Paging Geometry system and the performance would easily be better than a billboard per leaf done on the CPU.

Posted: Sun Nov 09, 2008 3:57 am
by jacmoe
I just discovered that the sources for CaduneTree has been released under a great license.
Happy to hear that it is in active use! :)

This seems like a great alternative to OgreSpeedTree - for those of us not loaded with money. :wink:

Posted: Mon Nov 17, 2008 5:50 pm
by hike1
I was getting a 'side-by-side configuration is incorrect' error, so I DL'd this

http://www.microsoft.com/downloads/than ... layLang=en

Microsoft Visual C++ 2008 Redistributable Package (x86)


And now it loads.

Posted: Tue Nov 18, 2008 9:12 pm
by vojtek87
jacmoe wrote:This seems like a great alternative to OgreSpeedTree - for those of us not loaded with money. :wink:
Maybe not so great ;)
I'm still (it's been a couple of months now) looking for some time to move it a bit further. If only I had time to do what Falagard suggested, then I could at least consider it a bit complete.

Re: CaduneTree

Posted: Thu Mar 26, 2009 1:41 am
by sunrisefe
watching it.

Re: CaduneTree

Posted: Fri Mar 27, 2009 9:32 pm
by jacmoe
Me too. :wink:

Re: CaduneTree

Posted: Tue Jun 30, 2009 2:27 pm
by epha
hi vojtek87, et al

First of all thanks a lot for CaduneTree - and for releasing the code.

I want to develop CaduneTree a bit to include ( to begin with ) a gui ( I'm on a mac, so I can't run CaduneTree Studio ), splitting of branches, and realistic movement of branches in the wind based on this paper: http://www.cg.tuwien.ac.at/research/pub ... el_09_PGT/

I don't really know the protocol for this kind of thing; but I was wondering if it's possible to set up a project with git or subversion or something so a few people who want to can work on CaduneTree ( or a seperate project based on the CaduneTree code ) and make a good open-source tree generator for Ogre.

I also was wondering if anyone has added to the CaduneTree code and is willing to share any improvements- so I don't repeat something someone else has done.

I have worked through the Habel and Wimmer's 'Physically Guided Animation of Trees' and have got single branches moving realistically in the 'wind' with a vertex shader. Now I want to extend Cadune Tree so that data textures are written for each branch hierarcy and each branch when the tree is generated - so that, together with a vertex shader, tree movement is integrated into the creation of each tree.

I have never developed a project in this way before - so if I'm going about it the wrong way, please let me know.
thanks.

epha

Re: CaduneTree

Posted: Tue Jul 14, 2009 7:39 pm
by SiENcE
We have an CadunTree integrated in our middleware componente called Lugre.

-> http://lugre.schattenkind.net

It's GPL and we have an SVN repository. If you wanna use this SVN to improve the Cadunetree Lib and Editor, contact me :-).

Re: CaduneTree

Posted: Tue Jul 14, 2009 7:46 pm
by jacmoe
Not really. CaduneTree is MIT. :wink:

Re: CaduneTree

Posted: Tue Jul 14, 2009 8:58 pm
by xadhoom
Hi epha!

First of all I´m glad to hear that you want to improve this lib with your experience.

I recommend you (without any ulterior motive) to take a look at Ogitor. Its a plug-in driven open-source/cross platform/"free for all" editor especially for Ogre world creation which is currently under heavy developement. Its architecture would allow you to create an independent plug-in which could encapsulate the whole tree generation library. I hope that you can save the time creating another GUI with adjustable properties and some kind of import/export process.

Just my two cent...

xad

Re: CaduneTree

Posted: Wed Jul 15, 2009 12:39 am
by haffax
jacmoe wrote:Not really. CaduneTree is MIT. :wink:
Doesn't matter, because a lib released under MIT can always be rereleased under GPL, it conforms with MIT license.
But actually this doesn't matter here, because lugre wiki and source say MIT license.

So is Lugre MIT or GPL, SiENcE?