Jump to content

L-systems And Expressions


henderthing

Recommended Posts

I'm fairly new to L-systems, (and this forum) and am running into a few difficulties.

I notice that $(x,y,z) will allow me to override the orientation of the turtle, which is great--as it's the only vector-based control over orientation I've seen so far. But I want to calculate that vector based on any number of aspects of surrounding geometry. I tried doing something like this:

$((point("../point1",(nearpoint("../point1",x,y,z)),"N",0)),(point("../point1",(nearpoint("../point1",x,y,z)),"N",1)),(point("../point1",(nearpoint("../point1",x,y,z)),"N",2)))

for instance, as a crude test to orient the turtle in the direction of the nearest point of the sop "point1"'s normal------Only to discover after it failed that there are a very limited number of functions available to expressions within L-systems. Of course "point" and "nearpoint" are not among them.

Does anyone know of other techniques for getting info from other sops into the L-system? in(x,y,z) isn't gonna cut it, I'm afraid. If this limitation is as insurmountable as it appears, I'm going to have to investigate using POPs to do what you'd think an Lsys is approprate for.

Any clues?

Thanks

-m

Link to comment
Share on other sites

Cool--thanks for your reply. I didn't think that the x,y,z stuff would get evaluated properly at the parameter level (for each step of the L-sys)...doh.

Of course now, I will have used up all three user variables for a single vector's worth of information. Is there a way to add more user variables?

In general--it's seeming pretty tricky to get Lsys to behave in a way that relates to other geometry in the scene. I've been looking into procedurally building curves, or copy-stamping curves instead. But trying to keep my options open--for a couple more days anyway...

-m

Are you going to use such expression in l-system rules?

Try using the expression in custom variables to obtain vector components and put variables into your rules.

21891[/snapback]

Link to comment
Share on other sites

Is there a way to add more user variables?

@

____________________________________

| [Geometry] [Tube] [ Values ] [Funcs] [Rules]|

|.......................................................................|

|Number of Variables ___ [more] [less] [clear]|

____________________________________

Link to comment
Share on other sites

:) To be honest the count of variables you can use with l-systems is pretty small, check this thread and search for l-system on sesi forum:

my sesi forum l-sys question

About controlability, note that basic l-system definition does not allow to create absolutely predictable and controlable shapes. Their power lies in easy creation of complex semi random structures.

Houdini expands l-system possibilities, but there still are some limitations.

With the method we discussed up there, you can create some kind of control rig (the easiest I tried uses nulls to control directions), but you could achieve great and easy effects mixing lsystem with other geometry, eg. curves for trunk and main branches and l sys for the mess of branches. You can grow the curve using carve sop etc.

If you already havent went through it:):) :

Algorithmic botany

cheers

Link to comment
Share on other sites

Thans for all the info...

Turns out my initial assumptions were correct, sadly...

If I use x,y,z in an expression for a variable, that

variable is only evaluated once for the whole system.

Not at each step, with its new x,y,z, which makes

sense. So I can get info about an external point into

those variables, and make some calculations within

the rules, using current x,y,z--but it seems I'll never

be able to do anything like find the point on another

piece of geometry that is nearest to the current step

of the turtle. That's where I'm really stumped. The

variable thing seems to be most valuable for copy

stamping parameters onto Lsystem copies.

Of course--I didn't even SEE the interface was there

for adding user variables (silly) -- so it's anyone's

guess what other obvious things I could be missing

here...

Thanks again

-m

:) To be honest the count of variables you can use with l-systems is pretty small, check this thread and search for l-system on sesi forum:

my sesi forum l-sys question

About controlability, note that basic l-system definition does not allow to create absolutely predictable and controlable shapes. Their power lies in easy creation of complex semi random structures.

Houdini expands l-system possibilities, but there still are some limitations.

With the method we discussed up there, you can create some kind of control rig (the easiest I tried uses nulls to control directions), but you could achieve great and easy effects mixing lsystem with other geometry, eg. curves for trunk and main branches and l sys for the mess of branches. You can grow the curve using carve sop etc.

If you already havent went through it:):) :

Algorithmic botany

cheers

21920[/snapback]

Link to comment
Share on other sites

but it seems I'll never be able to do anything like find the point on another piece of geometry that is nearest to the current step

of the turtle.

21925[/snapback]

Why?

You'd like the effect of lsystem creeping on some geo?

So that main branch would creep and lateral, smaller ones could be randomly spread?

Or l system that fills some space within geometry.

You could put trunk points into a group and the last point in that group should be somewhere close to current generation/turtle position.

Now feed the nearpoint expression with that point and you should be done.

You can try metatest input but better write rules carefully, otherwise you'd get stuck with very dense geometry, you could use context for that.

You can use almost any number of variables since you can use custom parameters (connected to generations/turtle pos.) to describe them.

I really haven't test these methods but they are the second thing that comes to my mind (right after simplyfying things with combinations mentioned up there:)) and should work.

Maybe more experienced users could shed some light, but I believe l-systems are not being used to the extents by anybody. They ARE very powerful.

You really should try l-sys copied on carved curve followed by polywire sop, it's beautiful and easy.

Link to comment
Share on other sites

Why?

Well--I'd like to be able to actually have the Lsys begin to bend

before it gets to outside geometry. There are a number of ways

to deform existing Lsys geometry based on the point attributes,

but non of them would be quite as nice as having the kind of

control that I imagined would be possible before I got into this.

(mainly--step by step information about other points on other

geometry in order to "point" each branch in a desired direction

as it grows.)

I haven't messed with groups, and that idea sounds interesting

as a way of getting information about branch position, after the

fact. I presume that you are talking about using an expression

somewhere outside (after) the Lsys, within another node.

Creeping a 2d Lsystem along a surface with the creep sop, then

growing other Lsystems inward is an option, but would be less

desirable aesthetically.

I have used the carve sop with copy stamping, and it's nice, but

the other problems remain.

Thank you for the ideas--but I think that since I don't need to

animate this stuff, but rather just need a good model with some

meaningful point attributes, I am going to use a particle system

to draw my curves. Not quite as elegant, but the control is most

definately there.

I agree that there don't seem to be many people out there

really taking Lsystems in Houdini to the nth degree...Perhaps

another good reason for me to go with particles. ;)

Thanks again for your insights.

-m

Why?

You'd like the effect of lsystem creeping on some geo?

So that main branch would creep and lateral, smaller ones could be randomly spread?

Or l system that fills some space within geometry.

You could put trunk points into a group and the last point in that group should be somewhere close to current generation/turtle position.

Now feed the nearpoint expression with that point and you should be done.

You can try metatest input but better write rules carefully, otherwise you'd get stuck with very dense geometry, you could use context for that.

You can use almost any number of variables since you can use custom parameters (connected to generations/turtle pos.) to describe them.

I really haven't test these methods but they are the second thing that comes to my mind (right after simplyfying things with combinations mentioned up there:)) and should work.

Maybe more experienced users could shed some light, but I believe l-systems are not being used to the extents by anybody. They ARE very powerful.

You really should try l-sys copied on carved curve followed by polywire sop, it's beautiful and easy.

21965[/snapback]

Link to comment
Share on other sites

in the Houdini L-system help pages there is an example of L-systems interacting with DOPs to make an animation that looks like someone plucking a piece of fruit from the branch of a flexible tree, the tree bends and then springs back as the fruit snaps off. i don't understand how they are inputting the control but it is impressive.

Link to comment
Share on other sites

in the Houdini L-system help pages there is an example of L-systems interacting with DOPs to make an animation that looks like someone plucking a piece of fruit from the branch of a flexible tree, the tree bends and then springs back as the fruit snaps off. i don't understand how they are inputting the control but it is impressive.

22167[/snapback]

hey meshsmooth

it is impressive and as far as i can tell they just have a wire constraint thats been animated via a expression, basic turn on turn off expression.

its pretty neat

aracid

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...