# LSystem Scale on instancing

Hey!
Got stuck on a thing with L-System. Instancing the flowers with a geometry SOP. The problem I have is that the flowers are instanced with a predefined scale as you can see in the project. I want the flowers to start from zero scale and grow over time every time a flower is created.

I been stuck on this for a while and wonder if anyone have a idea that could push me in the right direction? Also If there is any other question please let me know.

OrganicGrowth.4.toe (15.2 KB)

Looks great.
Typically to scale leaves, you would include them as J,K or M inputs and include them in your rules.
That way they get automatically scaled by the LSystem over each generation.

In your particular setup, you may want to add a stand-in leaf, like a primitive sphere, then extract them later to examine their scales, to use as instancing as youâ€™re doing.

Cheers.

Going to test it out. But from my previous experience, I had horrible fps after a couple of iterations.

Keep the leaf inputs simple, a primitive sphere has only 1 point for example.
Youâ€™ll be replacing it afterwards anyways.

Thank you! That works fine with the low pountspheres. But how do I extract the scale from the L-Sytem. I can only extract the XYZ pos of the spheres that are generated?

Hello,
I can share a project I made 3 years ago, visible here (at 7â€™55")

I separate the tree, produced with L-System (very difficult to avoid) and the flowers produced by instancing it in Geometry. To find the extremity of the branches, I used point index as a custom attribute, find the minimum of the points, using chop to top and Glsl Top. Until the 14th generation, the system is quite reactive.
Here is a working extract of the project.
l-system.toe (5.9 KB)

1 Like

Thats a very nice project jacqueshoepffner.

emilberzen: In terms of extracting sphere size, I realize I canâ€™t do it easily without an expensive conversion back to polygons.
Iâ€™ll add way of extracting that information cheaply to the list.
Cheers.

Workarounds for now may be:

• converting to mesh, and extracting out points using Carve SOP
• using polygons instead of prim spheres
• scriptSOP to use size members of the prim.

EDIT:

I was able to use the Carve SOP to extract points on two spots of each sphere efficiently.
See attached.
measure_spheres.tox (1.3 KB)

Thank you so much Rob and jacqueshoepffner! How helpful the TD community always will to impress me!

Trying the carve method now and it seems to work do the job to measure all the primitives from the l-system. But when pluggin it in to the Geo SOP i get that â€śAll OP must generate the same amount of instancesâ€ť But when looking at the amount of meshes it calculates it seems to match.

Would have to look at your toe file,
but are you deleting out all the non-spheres to feed into your instance chain?

If you want to here it is, yes iâ€™m deleting the branches so left is only the spheres, or so I thinkâ€¦
TreeGrowingTD.2.toe (22.1 KB)

null6 appears to have a different length than null5.

cheers

Oh nice, so thankful for your help! But did you get it to scale properly? For me every fourth cannnel gets overwrittenâ€¦

No sorry, I would need the corrected network.
Not sure how your instancing is set up.