{"id":2149,"date":"2013-08-07T04:24:44","date_gmt":"2013-08-07T01:24:44","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=2149"},"modified":"2013-09-15T19:00:54","modified_gmt":"2013-09-15T16:00:54","slug":"procedural-tree-mesh-generator-wip","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/","title":{"rendered":"Procedural Tree Mesh Generator (wip)"},"content":{"rendered":"<p><a title=\"http:\/\/unitycoder.com\/upload\/demos\/ProceduralTreeGenerator\/\" href=\"http:\/\/unitycoder.com\/upload\/demos\/ProceduralTreeGenerator\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2150\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/tree_mesh_generator_unity_wip\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip.jpg?fit=680%2C537&amp;ssl=1\" data-orig-size=\"680,537\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"tree_mesh_generator_unity_wip\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip.jpg?fit=680%2C537&amp;ssl=1\" class=\"alignnone size-full wp-image-2150\" alt=\"tree_mesh_generator_unity_wip\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip.jpg?resize=680%2C537\" width=\"680\" height=\"537\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip.jpg?resize=300%2C236&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>Small test for doing procedural trees.. (screenshot showing trunk with resolution 8 and 5 sides..)<\/p>\n<p><strong>Current features:<\/strong><br \/>\n&#8211; Trunk creation: adjustable height, height segments, resolution (amount of &#8220;sides&#8221;)<br \/>\n&#8211; Using quads<br \/>\n&#8211; Perlin noise rotations for trunk direction<br \/>\n&#8211; Adjustable root segment radius multiplier (so root part is thicker)<br \/>\n&#8211; Branches: length, size, amount<br \/>\n&#8211; Leaves: texture, plane width<\/p>\n<p><strong>TODO:<\/strong><br \/>\n&#8211; lots of things Oo..<\/p>\n<p><strong><br \/>\nIdeas:<\/strong><br \/>\n&#8211; For destruction mode..could encode values into vertex colors! So when some branch is clicked, can search all vertices that are in the same branch! (or do soft selection on those vertices..)<\/p>\n<p><strong><br \/>\nNotes:<\/strong><br \/>\nError: &#8220;error CS0019: Operator `*&#8217; cannot be applied to operands of type `UnityEngine.Vector3&#8242; and `UnityEngine.Quaternion'&#8221;<br \/>\nCode: myVector = myVector*myRotation;<br \/>\nSolution: myVector = myRotation*myVector; \/\/ uh<br \/>\n&#8211;\u00a0 Used this <a title=\"http:\/\/forum.unity3d.com\/threads\/119437-Re-map-a-number-from-one-range-to-another\" href=\"http:\/\/forum.unity3d.com\/threads\/119437-Re-map-a-number-from-one-range-to-another\" target=\"_blank\">ReMap function<\/a> for remapping values from different ranges..<br \/>\n&#8211; Huh took several hours to align branches to vertex normal direction, tried everything: transform.LookAt(), Quaternion.LookRotation(), Vector3.RotateTowards().. finally this did it: transform.rotation = Quaternion.FromToRotation(Vector3.up, normalDir);<br \/>\n&#8211; Texture used for leaves: <a title=\"http:\/\/www.cgtextures.com\/texview.php?id=106971\" href=\"http:\/\/www.cgtextures.com\/texview.php?id=106971\" target=\"_blank\">http:\/\/www.cgtextures.com\/texview.php?id=106971<\/a><\/p>\n<p><strong><br \/>\nWebplayer:<\/strong><br \/>\n<a title=\"http:\/\/unitycoder.com\/upload\/demos\/ProceduralTreeGenerator\/\" href=\"http:\/\/unitycoder.com\/upload\/demos\/ProceduralTreeGenerator\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/ProceduralTreeGenerator\/<\/a> (v1.0)<br \/>\n(quite a messy trees..maybe because branches are added randomly and no scaling to smaller size towards top yet..)<\/p>\n<p><strong>Inspiration:<\/strong><br \/>\n&#8211; <a title=\"http:\/\/vimeo.com\/37762269\" href=\"http:\/\/vimeo.com\/37762269\" target=\"_blank\">Procedural trees<\/a> (vimeo)<br \/>\n&#8211; <a title=\"http:\/\/arnaud.ile.nc\/cantree\/generator.php\" href=\"http:\/\/arnaud.ile.nc\/cantree\/generator.php\" target=\"_blank\">CanTree <\/a>(online tree generator)<\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#2:<\/strong> Rotation on creation now works.. Vertices are not shared, so had to get them connected by rotating with 2 different values (lower part with currentRot and upper with nextRot)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2156\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/tree_mesh_generator_unity_wip_bending\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_bending.jpg?fit=680%2C728&amp;ssl=1\" data-orig-size=\"680,728\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"tree_mesh_generator_unity_wip_bending\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_bending.jpg?fit=680%2C728&amp;ssl=1\" class=\"alignnone size-full wp-image-2156\" alt=\"tree_mesh_generator_unity_wip_bending\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_bending.jpg?resize=680%2C728\" width=\"680\" height=\"728\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_bending.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_bending.jpg?resize=280%2C300&amp;ssl=1 280w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#3:<\/strong> Doing branches creation in 2nd pass..(Debug.LineDraw here for testing, using vertex normal to go away from the center..)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"tree_mesh_generator_unity_wip_branches\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches.jpg?resize=680%2C820\" width=\"680\" height=\"820\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#4:<\/strong> Branches..currently separate gameobjects because &#8220;mesh.CombineMeshes&#8221; keeps giving some error &#8221;\u00a0totalNumIndices &lt;= (maxIndices+1)&#8221;..<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2165\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/tree_mesh_generator_unity_wip_branches2\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches2.jpg?fit=680%2C663&amp;ssl=1\" data-orig-size=\"680,663\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"tree_mesh_generator_unity_wip_branches2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches2.jpg?fit=680%2C663&amp;ssl=1\" class=\"alignnone size-full wp-image-2165\" alt=\"tree_mesh_generator_unity_wip_branches2\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches2.jpg?resize=680%2C663\" width=\"680\" height=\"663\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches2.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/tree_mesh_generator_unity_wip_branches2.jpg?resize=300%2C292&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#5: <\/strong>Random branches not yet matching to the center position..(as they were generated after trunk was done, would have to know the rotated trunk center position..uh..)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2174\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/procedural_tree_generator_branches_unity_3\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_3.jpg?fit=585%2C720&amp;ssl=1\" data-orig-size=\"585,720\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"procedural_tree_generator_branches_unity_3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_3.jpg?fit=585%2C720&amp;ssl=1\" class=\"alignnone size-full wp-image-2174\" alt=\"procedural_tree_generator_branches_unity_3\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_3.jpg?resize=585%2C720\" width=\"585\" height=\"720\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_3.jpg?w=585&amp;ssl=1 585w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_3.jpg?resize=243%2C300&amp;ssl=1 243w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><br \/>\n&#8212;<\/p>\n<p><strong>Image#6:<\/strong> Fixed ^that by saving segment center positions to a list..then Vector3.Lerp() on the branch y position between 2 segments..<br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2176\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/procedural_tree_generator_branches_unity_4\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_4.jpg?fit=500%2C505&amp;ssl=1\" data-orig-size=\"500,505\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"procedural_tree_generator_branches_unity_4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_4.jpg?fit=500%2C505&amp;ssl=1\" class=\"alignnone size-full wp-image-2176\" alt=\"procedural_tree_generator_branches_unity_4\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_4.jpg?resize=500%2C505\" width=\"500\" height=\"505\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_4.jpg?w=500&amp;ssl=1 500w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_branches_unity_4.jpg?resize=297%2C300&amp;ssl=1 297w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#7:<\/strong> Recursive branch function gone wrong..<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2179\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/procedural_tree_generator_recursive_gone_bad_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_recursive_gone_bad_1.jpg?fit=500%2C327&amp;ssl=1\" data-orig-size=\"500,327\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"procedural_tree_generator_recursive_gone_bad_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_recursive_gone_bad_1.jpg?fit=500%2C327&amp;ssl=1\" class=\"alignnone size-full wp-image-2179\" alt=\"procedural_tree_generator_recursive_gone_bad_1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_recursive_gone_bad_1.jpg?resize=500%2C327\" width=\"500\" height=\"327\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_recursive_gone_bad_1.jpg?w=500&amp;ssl=1 500w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_recursive_gone_bad_1.jpg?resize=300%2C196&amp;ssl=1 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#8:<\/strong> Skipped recursive function for now.. duplicated makeBranch() function and adjusted few variables there instead.. starting to look like a tree almost.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2181\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/procedural_tree_generator_unity3d_v1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?fit=680%2C622&amp;ssl=1\" data-orig-size=\"680,622\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"procedural_tree_generator_unity3d_v1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?fit=680%2C622&amp;ssl=1\" class=\"alignnone size-full wp-image-2181\" alt=\"procedural_tree_generator_unity3d_v1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?resize=680%2C622\" width=\"680\" height=\"622\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?resize=300%2C274&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#9:<\/strong> Ok its ready!&#8230;not. Got some leaves working, just simple quad planes from start of the branch to the end.. Used shader &#8220;AlphaTest-Diffuse.shader&#8221;, modified it to be 2 sided by adding line &#8220;Cull Off&#8221; before line &#8220;LOD 200&#8221; (<a title=\"http:\/\/unity3d.com\/unity\/download\/archive\" href=\"http:\/\/unity3d.com\/unity\/download\/archive\" target=\"_blank\">built in shader sources<\/a>)<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2183\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/procedural_tree_generator_unity3d_leaves_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_leaves_1.jpg?fit=680%2C559&amp;ssl=1\" data-orig-size=\"680,559\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"procedural_tree_generator_unity3d_leaves_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_leaves_1.jpg?fit=680%2C559&amp;ssl=1\" class=\"alignnone size-full wp-image-2183\" alt=\"procedural_tree_generator_unity3d_leaves_1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_leaves_1.jpg?resize=680%2C559\" width=\"680\" height=\"559\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_leaves_1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_leaves_1.jpg?resize=300%2C246&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&#8212;<\/p>\n<p><strong>Image#10:<\/strong> Adjusted branch generation..more realistic, but not yet using any of that <a title=\"http:\/\/www.maths.surrey.ac.uk\/hosted-sites\/R.Knott\/Fibonacci\/fibnat.html#leaf\" href=\"http:\/\/www.maths.surrey.ac.uk\/hosted-sites\/R.Knott\/Fibonacci\/fibnat.html#leaf\" target=\"_blank\">fibonacci stuff<\/a><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2420\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2013\/08\/07\/procedural-tree-mesh-generator-wip\/unity_treemaker_plugin_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?fit=680%2C678&amp;ssl=1\" data-orig-size=\"680,678\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"unity_treemaker_plugin_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?fit=680%2C678&amp;ssl=1\" class=\"alignnone size-full wp-image-2420\" alt=\"unity_treemaker_plugin_1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?resize=680%2C678\" width=\"680\" height=\"678\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?resize=150%2C150&amp;ssl=1 150w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/unity_treemaker_plugin_1.jpg?resize=300%2C300&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Small test for doing procedural trees.. (screenshot showing trunk with resolution 8 and 5 sides..) Current features: &#8211; Trunk creation: adjustable height, height segments, resolution (amount of &#8220;sides&#8221;) &#8211; Using quads &#8211; Perlin noise rotations for trunk direction &#8211; Adjustable root segment radius multiplier (so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2181,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,3],"tags":[93,527,528,269,529,223,5,302,17,276],"class_list":["post-2149","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-demos","category-unity3d","tag-algorithm","tag-creation","tag-creator","tag-dynamic","tag-forest","tag-generator","tag-mesh","tag-procedural","tag-tree","tag-trees"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2013\/08\/procedural_tree_generator_unity3d_v1.jpg?fit=680%2C622&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-yF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/2149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=2149"}],"version-history":[{"count":27,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/2149\/revisions"}],"predecessor-version":[{"id":2421,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/2149\/revisions\/2421"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/2181"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=2149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=2149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=2149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}