skip to main content
research-article

Latent L-systems: Transformer-based Tree Generator

Published:02 November 2023Publication History
Skip Abstract Section

Abstract

We show how a Transformer can encode hierarchical tree-like string structures by introducing a new deep learning-based framework for generating 3D biological tree models represented as Lindenmayer system (L-system) strings. L-systems are string-rewriting procedural systems that encode tree topology and geometry. L-systems are efficient, but creating the production rules is one of the most critical problems precluding their usage in practice. We substitute the procedural rules creation with a deep neural model. Instead of writing the rules, we train a deep neural model that produces the output strings. We train our model on 155k tree geometries that are encoded as L-strings, de-parameterized, and converted to a hierarchy of linear sequences corresponding to branches. An end-to-end deep learning model with an attention mechanism then learns the distributions of geometric operations and branches from the input, effectively replacing the L-system rewriting rule generation. The trained deep model generates new L-strings representing 3D tree models in the same way L-systems do by providing the starting string. Our model allows for the generation of a wide variety of new trees, and the deep model agrees with the input by 93.7% in branching angles, 97.2% in branch lengths, and 92.3% in an extracted list of geometric features. We also validate the generated trees using perceptual metrics showing 97% agreement with input geometric models.

Skip Supplemental Material Section

Supplemental Material

REFERENCES

  1. Aono M. and Kunii T. L.. 1984. Botanical tree image generation. IEEE Computer Graphics and Applications 4, 5 (1984), 1034.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Arvo J. and Kirk D.. 1988. Modeling plants with environment-sensitive automata. In Proceedings of the Ausgraph. 2733.Google ScholarGoogle Scholar
  3. Bernard Jason and McQuillan Ian. 2021. Techniques for inferring context-free lindenmayer systems with genetic algorithm. Swarm and Evolutionary Computation 64 (2021), 100893.Google ScholarGoogle ScholarCross RefCross Ref
  4. Bishop Christopher M. and Nasrabadi Nasser M.. 2006. Pattern Recognition and Machine Learning. Vol. 4. Springer.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bokeloh Martin, Wand Michael, and Seidel Hans-Peter. 2010. A connection between partial symmetry and inverse procedural modeling. In Proceedings of the ACM SIGGRAPH 2010 Papers. 110.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Brandes Nadav, Ofer Dan, Peleg Yam, Rappoport Nadav, and Linial Michal. 2022. ProteinBERT: A universal deep-learning model of protein sequence and function. Bioinformatics 38, 8(2022), 21022110. DOI:arXiv:https://academic.oup.com/bioinformatics/article-pdf/38/8/2102/4900 9610/btac020.pdfGoogle ScholarGoogle ScholarCross RefCross Ref
  7. Chen Jiacheng, Liu Chen, Wu Jiaye, and Furukawa Yasutaka. 2019. Floor-sp: Inverse cad for floorplans by sequential room-wise shortest path. In Proceedings of the IEEE/CVF International Conference on Computer Vision. 26612670.Google ScholarGoogle ScholarCross RefCross Ref
  8. Reffye Phillippe De, Edelin Claude, Françon Jean, Jaeger Marc, and Puech Claude. 1988. Plant models faithful to botanical structure and development. ACM Siggraph Computer Graphics 22, 4 (1988), 151158.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Devlin Jacob, Chang Ming-Wei, Lee Kenton, and Toutanova Kristina. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv: 1810.04805. Retrieved from https://arxiv.org/abs/1810.04805Google ScholarGoogle Scholar
  10. Dong Hao-Wen, Hsiao Wen-Yi, Yang Li-Chia, and Yang Yi-Hsuan. 2018. Musegan: Multi-track sequential generative adversarial networks for symbolic music generation and accompaniment. In Proceedings of the AAAI Conference on Artificial Intelligence.Google ScholarGoogle ScholarCross RefCross Ref
  11. Du Shenglan, Lindenbergh Roderik, Ledoux Hugo, Stoter Jantien, and Nan Liangliang. 2019. AdTree: Accurate, detailed, and automatic modelling of laser-scanned trees. Remote Sensing 11, 18 (2019), 2074.Google ScholarGoogle ScholarCross RefCross Ref
  12. Du Tao, Inala Jeevana Priya, Pu Yewen, Spielberg Andrew, Schulz Adriana, Rus Daniela, Solar-Lezama Armando, and Matusik Wojciech. 2018. InverseCSG: Automatic conversion of 3D models to CSG trees. ACM Transactions on Graphics 37, 6 (2018), 16 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Fedus William, Goodfellow Ian, and Dai Andrew M.. 2018. Maskgan: Better text generation via filling in the_. arXiv:1801.07736. Retrieved from https://arxiv.org/abs/1801.07736Google ScholarGoogle Scholar
  14. Fitch Benjamin G., Parslow Patrick, and Lundqvist Karsten Ø.. 2018. Evolving complete L-systems: Using genetic algorithms for the generation of realistic plants. In Proceedings of the Artificial Life and Intelligent Agents Symposium. Springer, 1623.Google ScholarGoogle ScholarCross RefCross Ref
  15. Gao Lin, Yang Jie, Wu Tong, Yuan Yu-Jie, Fu Hongbo, Lai Yu-Kun, and Zhang Hao. 2019. SDM-NET: Deep generative network for structured deformable mesh. ACM Transactions on Graphics 38, 6 (2019), 115.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Goodfellow Ian, Pouget-Abadie Jean, Mirza Mehdi, Xu Bing, Warde-Farley David, Ozair Sherjil, Courville Aaron, and Bengio Yoshua. 2014. Generative adversarial nets. Advances in Neural Information Processing Systems 27 (2014), 2672–2680.Google ScholarGoogle Scholar
  17. Gravelius H.. 1914. Grundrib der gasamten Gewässerkunde,band I: Flubkunde. kompendium of Hydrology 1 (1914), 265–278.Google ScholarGoogle Scholar
  18. Greene Ned. 1989. Voxel space automata: Modeling with stochastic growth processes in voxel space. Proceedings of the 16th annual Csonference on Computer Graphics and Interactive Techniques 23, 3 (1989), 175184. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Guo Jianwei, Jiang Haiyong, Benes Bedrich, Deussen Oliver, Zhang Xiaopeng, Lischinski Dani, and Huang Hui. 2020. Inverse procedural modeling of branching structures by inferring l-systems. ACM Transactions on Graphics 39, 5 (2020), 13 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Guo Jiaxian, Lu Sidi, Cai Han, Zhang Weinan, Yu Yong, and Wang Jun. 2018. Long text generation via adversarial training with leaked information. In Proceedings of the AAAI Conference on Artificial Intelligence.Google ScholarGoogle ScholarCross RefCross Ref
  21. Habel Ralf, Kusternig Alexander, and Wimmer Michael. 2009. Physically guided animation of trees. In Proceedings of the Computer Graphics Forum. Wiley Online Library, 523532.Google ScholarGoogle ScholarCross RefCross Ref
  22. Hädrich Torsten, Banuti Daniel T., Pałubicki Wojtek, Pirk Sören, and Michels Dominik L.. 2021. Fire in paradise: Mesoscale simulation of wildfires. ACM Transactions on Graphics 40, 4 (2021), 15 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hädrich Torsten, Benes Bedrich, Deussen Oliver, and Pirk Sören. 2017. Interactive modeling and authoring of climbing plants. 36, 2 (2017), 4961. DOI: arXiv:Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Hochreiter Sepp and Schmidhuber Jürgen. 1997. Long short-term memory. Neural Computation 9, 8 (1997), 17351780.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Holton Matthew. 1994. Strands, gravity and botanical tree imagery. In Proceedings of the Computer Graphics Forum. Wiley Online Library, 5767.Google ScholarGoogle ScholarCross RefCross Ref
  26. Jones R. Kenny, Barton Theresa, Xu Xianghao, Wang Kai, Jiang Ellen, Guerrero Paul, Mitra Niloy J., and Ritchie Daniel. 2020. ShapeAssembly: Learning to generate programs for 3D shape structure synthesis. ACM Transactions on Graphics 39, 6 (2020), 20 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jumper John, Evans Richard, Pritzel Alexander, Green Tim, Figurnov Michael, Ronneberger Olaf, Tunyasuvunakool Kathryn, Bates Russ, Žídek Augustin, Potapenko Anna, et al. 2021. Highly accurate protein structure prediction with AlphaFold. Nature 596, 7873 (2021), 583589.Google ScholarGoogle ScholarCross RefCross Ref
  28. Karwowski Radoslaw and Prusinkiewicz Przemyslaw. 2004. The l-system-based plant-modeling environment l-studio 4.0. In Proceedings of the 4th International Workshop on Functional-structural Plant Models. UMR AMAP Montpellier, France, 403405.Google ScholarGoogle Scholar
  29. Kingma Diederik P. and Ba Jimmy. 2014. Adam: A method for stochastic optimization. arXiv:1412.6980. Retrieved from https://arxiv.org/abs/1412.6980Google ScholarGoogle Scholar
  30. Bosheng Li, Jacek Kałużny, Jonathan Klein, Dominik L. Michels, Wojtek Pałubicki, Bedrich Benes, and Sören Pirk. 2021. Learning to reconstruct botanical trees from single images. ACM Trans. Graph. 40, 6, Article 231 (December 2021), 15 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Bosheng Li, Jonathan Klein, Dominik L. Michels, Bedrich Benes, Sören Pirk, and Wojtek Pałubicki. 2023. Rhizomorph: The coordinated function of shoots and roots. ACM Trans. Graph. 42, 4, Article 59 (August 2023), 16 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Li Jun, Xu Kai, Chaudhuri Siddhartha, Yumer Ersin, Zhang Hao, and Guibas Leonidas. 2017. Grass: Generative recursive autoencoders for shape structures. ACM Transactions on Graphics 36, 4 (2017), 114.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Li Yang, Pan Quan, Wang Suhang, Yang Tao, and Cambria Erik. 2018. A generative model for category text generation. Information Sciences 450 (2018), 301315.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Lindenmayer Aristid. 1968. Mathematical models for cellular interaction in development. Journal of Theoretical Biology Parts I and II, 18, 3 (1968), 280315.Google ScholarGoogle ScholarCross RefCross Ref
  35. Longay Steven, Runions Adam, Boudon Frédéric, and Prusinkiewicz Przemyslaw. 2012. TreeSketch: Interactive procedural modeling of trees on a tablet. In Proceedings of the SBIM Expressive. 107120.Google ScholarGoogle Scholar
  36. Marvie Jean-Eudes, Perret Julien, and Bouatouch Kadi. 2005. The FL-system: A functional l-system for procedural geometric modeling. The Visual Computer 21, 5 (2005), 329339.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Minamino Ryoko and Tateno Masaki. 2014. Tree branching: Leonardo da vinci’s rule versus biomechanical models. PloS One 9, 4 (2014), e93535.Google ScholarGoogle ScholarCross RefCross Ref
  38. Kaichun Mo, Paul Guerrero, Li Yi, Hao Su, Peter Wonka, Niloy J. Mitra, and Leonidas J. Guibas. 2019. StructureNet: hierarchical graph networks for 3D shape generation. ACM Trans. Graph. 38, 6, Article 242 (December 2019), 19 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Měch Radomír and Prusinkiewicz Przemyslaw. 1996. Visual models of plants interacting with their environment. In SIGGRAPH ’96: Proceedings of the 23rd Annual Conference on Computer Graphics and Interactive Techniques. ACM, New York, NY, 397410. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Nash Charlie, Ganin Yaroslav, Eslami S.M. Ali, and Battaglia Peter. 2020. Polygen: An autoregressive generative model of 3d meshes. In Proceedings of the International Conference on Machine Learning. PMLR, 72207229.Google ScholarGoogle Scholar
  41. Ochoa Gabriela. 1998. On genetic algorithms and lindenmayer systems. In Proceedings of the International Conference on Parallel Problem Solving from Nature. Springer, 335344.Google ScholarGoogle ScholarCross RefCross Ref
  42. Okabe Makoto, Owada Shigeru, and Igarashi Takeo. 2007. Interactive design of botanical trees using freehand sketches and example-based editing. In Proceedings of the ACM SIGGRAPH 2007 Courses.Association for Computing Machinery, New York, NY, 26–es. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Oppenheimer Peter E.. 1986. Real time design and animation of fractal plants and trees. ACM SiGGRAPH Computer Graphics 20, 4 (1986), 5564. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Palubicki Wojciech, Horel Kipp, Longay Steven, Runions Adam, Lane Brendan, Měch Radomír, and Prusinkiewicz Przemyslaw. 2009. Self-organizing tree models for image synthesis. ACM TOG 28, 3 (2009), 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Pirk Sören, Benes Bedrich, Ijiri Takashi, Li Yangyan, Deussen Oliver, Chen Baoquan, and Měch Radomir. 2016. Modeling plant life in computer graphics. In Proceedings of the ACM SIGGRAPH 2016 Courses. 180 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Pirk Sören, Niese Till, Hädrich Torsten, Benes Bedrich, and Deussen Oliver. 2014. Windy trees: Computing stress response for developmental tree models. ACM Transactions on Graphics 33, 6 (2014), 11 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Pirk Sören, Stava Ondrej, Kratt Julian, Said Michel Abdul Massih, Neubert Boris, Měch Radomír, Benes Bedrich, and Deussen Oliver. 2012. Plastic trees: Interactive self-adapting botanical tree models. ACM TOG 31, 4 (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Polasek Tomas, Hrusa David, Benes Bedrich, and Cadik Martin. 2021. ICTree: Automatic perceptual metrics for tree models. ACM Transaction on Graphics 40, 6 (2021), 15 pages. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Prusinkiewicz Przemyslaw. 1986. Graphical applications of l-systems. In Proceedings on Graphics Interface ’86/Vision Interface ’86.Canadian Information Processing Society, Toronto, Ont., Canada, Canada, 247253. Retrieved from http://dl.acm.org/citation.cfm?id=16564.16608Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Prusinkiewicz Przemyslaw, Hammel Mark S., and Mjolsness Eric. 1993. Animation of plant development. In Proceedings of the 20th Annual Conference on Computer Graphics and Interactive Techniques. 351360.Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Prusinkiewicz Przemyslaw and Hanan Jim. 1990. Visualization of botanical structures and processes using parametric l-systems. In Proceedings of the Scientific Visualization and Graphics Simulation. 183201.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Prusinkiewicz Przemyslaw and Lindenmayer Aristid. 1990. The Algorithmic Beauty of Plants. Springer–Verlag, New York. With J. S. Hanan, F. D. Fracchia, D. R. Fowler, M. J. de Boer, and L. Mercer.Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Smelik Ruben M., Tutenel Tim, Bidarra Rafael, and Benes Bedrich. 2014. A survey on procedural modelling for virtual worlds. Computer Graphics Forum 33, 6 (2014), 3150. DOI: arXiv:Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Smith Alvy Ray. 1984. Plants, fractals, and formal languages. In Proceedings of the 11th Annual Conference on Computer Graphics and Interactive Techniques. ACM, New York, NY, 110. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Stava Ondrej, Pirk Sören, Kratt Julian, Chen Baoquan, Měch Radomír, Deussen Oliver, and Benes Bedrich. 2014. Inverse procedural modelling of trees. In Proceedings of the Computer Graphics Forum. Wiley Online Library, 118131.Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Proceedings of the 27th International Conference on Neural Information Processing Systems - Volume 2 (NIPS’14). MIT Press, Cambridge, MA, 3104–3112.Google ScholarGoogle Scholar
  57. Vanegas Carlos A., Garcia-Dorado Ignacio, Aliaga Daniel G., Benes Bedrich, and Waddell Paul. 2012. Inverse design of urban procedural models. ACM Transactions on Graphics 31, 6 (2012), 111.Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17). Curran Associates Inc., Red Hook, NY, 6000–6010.Google ScholarGoogle Scholar
  59. Wang Guan, Laga Hamid, Jia Jinyuan, Xie Ning, and Tabia Hedi. 2018. Statistical modeling of the 3D geometry and topology of botanical trees. Computer Graphics Forum 37, 5 (2018), 185198.Google ScholarGoogle ScholarCross RefCross Ref
  60. Weber Jason and Penn Joseph. 1995. Creation and rendering of realistic trees. In Proceedings of the 22nd Annual Conference on Computer Graphics and Interactive Techniques.Association for Computing Machinery, New York, NY, 119128. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Williams Ronald J. and Zipser David. 1989. A learning algorithm for continually running fully recurrent neural networks. Neural Computation 1, 2 (1989), 270280. DOI:Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Fuzhang Wu, Dong-Ming Yan, Weiming Dong, Xiaopeng Zhang, and Peter Wonka. 2014. Inverse procedural modeling of facade layouts. ACM Trans. Graph. 33, 4, Article 121 (July 2014), 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Ying Chengxuan, Cai Tianle, Luo Shengjie, Zheng Shuxin, Ke Guolin, He Di, Shen Yanming, and Liu Tie-Yan. 2021. Do transformers really perform badly for graph representation?. In Proceedings of the Advances in Neural Information Processing Systems.Ranzato M., Beygelzimer A., Dauphin Y., Liang P. S., and Vaughan J. Wortman (Eds.), Vol. 34, Curran Associates, Inc., 2887728888. Retrieved from https://proceedings.neurips.cc/paper_files/paper/2021/file/f1c1592588411002af340cbaedd6fc33-Paper.pdfGoogle ScholarGoogle Scholar
  64. Seongjun Yun, Minbyul Jeong, Raehyun Kim, Jaewoo Kang, and Hyunwoo J. Kim. 2019. Graph transformer networks. Proceedings of the 33rd International Conference on Neural Information Processing Systems. Curran Associates Inc., Red Hook, NY, Article 1073, 11983–11993.Google ScholarGoogle Scholar
  65. Zhou Xiaochen, Li Bosheng, Benes Bedrich, Fei Songlin, and Pirk Soeren. 2023. DeepTree: Modeling trees with situated latents. IEEE Transactions on Visualization and Computer Graphics01 (2023), 114. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Latent L-systems: Transformer-based Tree Generator

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Graphics
        ACM Transactions on Graphics  Volume 43, Issue 1
        February 2024
        211 pages
        ISSN:0730-0301
        EISSN:1557-7368
        DOI:10.1145/3613512
        Issue’s Table of Contents

        Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s).

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 2 November 2023
        • Online AM: 10 October 2023
        • Accepted: 29 September 2023
        • Revised: 5 August 2023
        • Received: 24 October 2022
        Published in tog Volume 43, Issue 1

        Check for updates

        Qualifiers

        • research-article
      • Article Metrics

        • Downloads (Last 12 months)888
        • Downloads (Last 6 weeks)127

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Full Text

      View this article in Full Text.

      View Full Text