RickWork Posted September 15, 2004 Share Posted September 15, 2004 Hi I'm trying to randomly select some objects to plug into an L-system (J input) as leaves. I thought there was a select SOP or something that I could plug this into but I can't seem to find it. I have about 10 variations of leaves and I'd like to be randomly used in my L-System. Another area where I need to do this is with particles instances. TIA Quote Link to comment Share on other sites More sharing options...
exel Posted September 15, 2004 Share Posted September 15, 2004 Hi Rick, I think I've got it-- you want to use the leaf stamping feature in conjunction with a switch SOP: 1. plug all your leaf geometry variations into a Switch SOP, then plug the switch SOP into the lLSystem, for this example use the "Leaf J Input" on the LSystem SOP. 2. Set your stamping parameter on the switch SOP like this: param("mystamp",0)%opninputs(".") This will take the value of the variable called "mystamp" and use it as the input index for your switch SOP. The "%opninputs(".") will make it cycle through the number of leaf variations you have plugged into your switch SOP. 3. In the Lsystem SOP, set up your stamping variable: --Under the "Funcs" tab, set "Leaf Param A" to mystamp --In the "Rules" tab, try something like this to help get you started: --Rule 1: A=!"////////B --Rule 2: B=&FFFAJ(1,0,i) -- the stuff in there with J(1,0,i) is the leaf stamping stuff , it will probably need some tweaking before it's working well for you... check the LSystem help page for more info. Good luck, hope this helps! -JS- Quote Link to comment Share on other sites More sharing options...
RickWork Posted September 15, 2004 Author Share Posted September 15, 2004 Hi JS, Thanks for your help. I tried the expression: param("mystamp",0)%opninputs(".") but this can't be evaluated for me. I tried inputting the full path to the switchSop for opinputs but I'm still getting an error. Any tips on where the problem might be? Thanks, /R Quote Link to comment Share on other sites More sharing options...
edward Posted September 16, 2004 Share Posted September 16, 2004 mystamp is the name of the stamping variable that you have to put into the "Leaf Param A" parameter in the Lsystem SOP instead of lsys. On the other hand, you could just change your param() expression to use "lsys" instead. Quote Link to comment Share on other sites More sharing options...
exel Posted September 16, 2004 Share Posted September 16, 2004 DOH! Sorry Rick, I forgot about that part! Stupid me. Thanks for filling in the blanks Ed I just figured this stuff out yesterday... I think this calls for an LSystems leaf tutorial, any takers? Quote Link to comment Share on other sites More sharing options...
RickWork Posted September 16, 2004 Author Share Posted September 16, 2004 Actually, Silly Me! I tried this yesterday and it would fail every time. Today I just tried as you suggested and it works! I think yesterday was bad karma day Thanks! /Rick Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.