Project Description
Creates natural-looking tree models for XNA in real-time. LTrees makes it easier for XNA game developers to create beautiful nature scenes.
Quick Downloads
Screenshots
Here are some screenshots of a few generated trees. The demo application gives a better impression of them, though.





Getting Started
- Download LTrees Source 2.0a.
- Add LTreesLibrary and LTreesPipeline projects to your solution.
- Add a reference to LTreesLibrary in your main project (right-click "References", then click "Add reference").
- Add a reference to LTreesPipeline in your content project.
- Copy the .ltree-files and textures from the LTreeDemo project. (Note: You don't need the Grass.jpg texture). Keep the same folder structure for now.
- For each .ltree-file, change its importer to "LTree Specification" and its processor to "LTree Profile."
- Enable mipmap generation for all the textures.
- Load a tree profile using the content manager: TreeProfile profile = Content.Load<TreeProfile>("Trees/Graywood");
- Generate a SimpleTree from the tree profile: SimpleTree tree = profile.GenerateSimpleTree();
- Draw the trunk: tree.DrawTrunk(world, view, projection);
- Draw the leaves: tree.DrawLeaves(world, view, projection);
This was a guide intended to get you started as fast as possible. More advanced behaviour is possible, but for that you need to know more about how it works. See the
User Manual to learn more.
So How Does It Work?
See the
User Manual page.
Version history
| Version | Date | Changes |
| 2.0a | February 2, 2009 | Fixed an issue with ATI cards not rendering leaves. |
| 2.0 | January 29, 2009 | LTrees release. The old code was scrapped. |
| 1.2 | November 10, 2007 | Trees can now be scaled uniformly without problems with leaves. Non-uniform scales are still not supported |
| 1.1 | November 7, 2007 | Fixed localization issues. Systems that use comma as decimal separator should no longer crash |
| 1.0 | November 6, 2007 | Moved to CodePlex, and changed to MIT License |
| 0.9 | November 2, 2007 | Initial release at XNA Forums, under Zlib License |