Jump to content

LSystems: Attribute stamping


Recommended Posts

Hi. I'm growing some vines with L-Systems. I've got everything working except that I have a noise function that flutters the leaves of my vines. Problem is, when the leaves are input in to the lsystem (M Input) everything works great except all my leaves move the same way. I understand why, just like if you use the copy sop, each leaf is being moved in it's own local space, so the noise affects each leaf the same. To remidy the problem, I want to "copystamp" if you will an offset attribute that is input into the noise function, so each leaf has a slightly different noise offset hence slightly different animation.

The question is, I can create a custom param in the Funcs tab on teh L-System. In my case Param B is called "flutter-offset". But I just want to add some random value to this. Perhapse just use something like $PT to set the value. but how do I set such a value within the rules or.. do you even set it within the rules. Where do you set the value of the param? Confused! Please help.

Anupam

Link to comment
Share on other sites

Hey Anupam,

I could sit here and explain how to use the param stamping in L-Systems, but to tell you the truth, i think i would do a bad job explaining it.. :D

but even though i can only offer you my lousy explanation, you're still in luck because the L-System help card has all the info you need.. just go to the 'Description' tab and do a find on that page for 'stamping' and you should be set..

on another note, as the l-system stamping is nice, i don't know if that's the best way to do it.. if i were you, i would throw down a primitive sop after the lystem and take advantage of your leaf input groups.. i.e. if your leaf is being input in to 'M', then you should have a primitive group labeled 'lsysM'.. i would think this would be a better way to approach it, but who knows, houdini is one crazy lady..

hth

Link to comment
Share on other sites

Another approach to doing leaves is not to pass in your final leaf geometry in to the three leaf inputs to the l-system SOP but to pass in a point with a nicely defined Normal down the Z and an upvector up the Y all in a pre-defined leaf group. If you are real clever, you will also add a handy instance geometry attribute followed by a pscale attribute to determine the scale of the leaf.

Now you have a great deal of control with a copy SOP and instancing after the l-system SOP.

For example, you can copy the leaves with the Copy SOP and manipulate the rotate parms with expressions. You will quickly notice that these rotate parameters utilize the local frame of reference (N and UP) on each of the points for nice individual leaf control.

It wouldn't take too much work to write a Vex SOP to do the same type of rotation manipulation to the points directly for use with instanced leaves.

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...