Magic Market | L-Systems

Houdini
30 Nov 202029:19

Summary

TLDRスクリプトのエッセンスを包み、ユーザーを引き付ける短く正確な概要を提供する魅力的な要約。

Takeaways

  • 🌿 Lシステムは、シンプルな命令のセットに基づいて複雑な植物やデザインを作成するための技法です。
  • 📐 「f」は「forward」の略で、前進する命令を表します。
  • 🔄 「+」は右回転、「-」は左回転を意味し、これらの記号は数学的な意味とは関係ありません。
  • 🌳 ブランチを作成するためには、角括弧「[]」を使用します。開括弧はブランチの始まりを、閉括弧は終わりを示します。
  • 🔄 Lシステムのルールは、ルールタブで編集でき、基本的な構造を定義します。
  • 🎨 角度や長さの調整は、値タブで行われ、これによりルールの実行をより細かく制御できます。
  • 🌱 複雑なLシステムは、ルールの相互代入によって作られます。これにより、非常に複雑なデザインが創造できます。
  • 📈 世代数(Generations)は、ルールの適用回数を制御し、植物の成長感を表現するために使用されます。
  • 🌸 植物の葉や花を追加するためには、オブジェクトマージを使用して、事前に作成されたジオメトリを組み込みます。
  • 🔧 変位やスケールのランダム化を達成するためには、スイッチノードや確率を使用して、ランダムなバリエーションを作り出します。
  • 🎨 Lシステムは、ハーディscapeや魔法の市場シーンなどで使用され、基本的な要素を学ぶことで、より複雑なシステムを創造することができます。

Q & A

  • Lシステムとは何ですか?

    -Lシステムは、プログラミングで植物の成長パターンを再現する方法です。簡単な命令を使って複雑なデザインを作成することができます。

  • Lシステムで使用される基本的な記号は何ですか?

    -Lシステムで最もよく使われる記号は 'f' で、これは 'forward' を意味します。'f' を使用することで、オブジェクトは設定された距離を進みます。

  • Lシステムで方向を変えるにはどのようにすればいいですか?

    -Lシステムで方向を変えるには、'+' 記号用于右回転、「-' 記号用于左回転を使います。これらの記号は、通常の数学的な意味とは異なり、単にステップバイステップの方向を指示するものです。

  • Lシステムで枝分かれを行うにはどうすればいいですか?

    -Lシステムで枝分かれを行うには、角括弧「[]」を使用します。開角括弧「[」は枝の始まり、閉角括弧「]」は枝の終わりを示します。角括弧内には、現在のパスとは別の情報を含めることができます。

  • Lシステムのルールを定義する方法は何ですか?

    -Lシステムのルールは、'Rules' タブで定義します。ここで、基本的な命令を入力し、それらを組み合わせて複雑なデザインを作成することができます。

  • Lシステムの世代とは何ですか?

    -Lシステムの世代は、ルールを何度も繰り返し適用するプロセスです。世代を上げることで、オブジェクトは徐々に複雑化し、最終的なデザインが形成されます。

  • Lシステムで角度を調整する方法は何ですか?

    -Lシステムで角度を調整するには、'Value' タブで全体的な角度を設定するか、命令に具体的な角度値を追加することができます。例えば、'+[F]' に90度を設定すると、右回転が90度になるようになります。

  • Lシステムでルールの代替を行なうにはどうすればいいですか?

    -Lシステムでルールの代替を行なうには、新しいルールを作成して、それを既存のルールに追加します。たとえば、'a' ルールを作成して、それをメインルールに追加することで、複雑なデザインを構築できます。

  • Lシステムでオブジェクトの形状を変更する方法は何ですか?

    -Lシステムでオブジェクトの形状を変更するには、'Geometry' タブで設定を調整します。例えば、'Tube' タイプを選択して、円柱状の形状を作成することができます。また、枝の太さや長さ、および世代による変化を制御するためのスライダーを使用できます。

  • Lシステムでランダム性を持たせたい場合はどうすればいいですか?

    -Lシステムでランダム性を持たせたい場合は、'Switch' ノードを使用して、複数のジオメトリーをランダムに選択することができます。また、'Probability' 関数を使用して、特定のルールが実行される確率を設定することができます。

  • Lシステムでオブジェクトに花や葉を追加する方法は何ですか?

    -Lシステムでオブジェクトに花や葉を追加するには、'Object Merge' ノードを使用して、事前に作成されたジオメトリーを組み込みます。その後、Lシステムのルール内で適切な位置に、花や葉を表す記号を追加します。

Outlines

00:00

🌿 Lシステムの基礎とシンプルな植物の作成

この段落では、Lシステムの基礎とシンプルな植物を作るプロセスについて説明されています。Lシステムは最初に恐れられるかもしれませんが、これらの記号は単なる簡単な指示に過ぎず、理解すれば恐れは消えて興味深いシステムを作り始めることができます。基本的な記号として「f」が使われており、これは「forward」(前進)を意味します。また、直角を拐るためには「+」を使い、左に拐る場合は「-」を使用します。さらに、枝分かれを表現するためには角括弧を使用します。この段落では、これらの基本的な記号を使って、マジックマーケットのシーンで使用されるシンプルな植物を作成する方法が紹介されています。

05:05

🌳 Lシステムのルールと複雑な構造の作成

この段落では、Lシステムのルールを設定する方法と、それを使って複雑な構造を作る方法が説明されています。ルールを編集することで、基本的な構造を作り出すことができます。この段落では、ルールの変更と世代数(generations)の調整によって、植物の形状をコントロールする方法が紹介されています。世代数を上げることで、ルールの置換回数が増加し、より複雑な構造が作られます。また、ルールのサブスティテーションを通じて、より複雑なLシステムを作り出すことができます。

10:06

🍃 植物の形状と解像度の調整

この段落では、植物の形状を調整し、解像度を向上させる方法が説明されています。植物の茎の長さやカーブを調整し、花や葉の形状を与える方法が紹介されています。茎のカーブを上げるためには、「upward bend」の記号を使用し、茎を下げるためには「down angle」の記号を使用します。また、解像度を上げるためには、より多くのセグメントを追加する方法が説明されています。これにより、茎の長さやカーブを細かく調整することができます。

15:06

🌸 植物への葉と花の追加

この段落では、植物に葉と花を追加する方法が説明されています。まず、オブジェクトマージを使用して、事前に作成された花や花びらのジオメトリを組み込みます。そして、Lシステムのルール内でこれらのジオメトリを参照するために、特定の記号を追加します。また、花や葉のサイズを調整し、植物の見た目を自然なようにするために、変形ノードを使用する方法が紹介されています。最後に、植物の茎の長さや太さを調整し、花びらが頂部に現れるように設定します。

20:09

🌱 植物のバリエーションとランダム化

この段落では、植物のバリエーションを作り出す方法と、ランダム化する方法が説明されています。複数の葉のジオメトリを用意し、スイッチノードを使用してランダムに選択する方法が紹介されています。また、確率の設定を通じて、どの葉のジオメトリが使用されるかを制御する方法も説明されています。さらに、ランダムなスケールとシード値の調整を通じて、植物の外見を多様化する方法が説明されています。この段落は、Lシステムを使って複雑で自然な植物を作るための技術を紹介しています。

Mindmap

Keywords

💡Houdini L-systems

Houdini L-systemsは、コンピュータグラフィックソフトウェアHoudiniを使用して複雑な自然な模様を生成するためのアルゴリズムです。このビデオでは、その基礎的なプロセスと応用方法について学ぶことができます。

💡Forward (f)

前進は、L-systemsの基本的な命令の一つで、指定した距離だけ進むことを意味します。このビデオでは、'f'という記号が前進を表すために使用されています。

💡Turn (plus and minus)

回転は、L-systemsで方向を変えるための命令で、プラス(+)は右回転、マイナス(-)は左回転を意味します。ビデオ内では、これらの命令を使って植物の枝の方向を変える方法が説明されています。

💡Branching (square brackets)

分岐は、L-systemsで複雑な構造を作るために使用される命令で、角括弧([ )で始まり、角括弧(])で終わります。このビデオでは、角括弧を使って植物の枝がどのように分岐するかを示しています。

💡Rule substitution

ルール置換は、L-systemsで複雑なパターンを生み出すための高度な技術で、新しい命令を既存の命令に置き換えることによって、より複雑な構造を構築します。

💡Generations

世代は、L-systemsのルールを何度も適用することを指し、世代数が増加すると、構造はより複雑になります。このビデオでは、世代数を調整して植物の成長を制御する方法が説明されています。

💡Geometry

幾何学は、L-systemsで生成されたデータの形状や構造を定義するために使用されます。このビデオでは、幾何学の設定を変えることで植物の外見を調整する方法が紹介されています。

💡Taper

タパーは、L-systemsで枝が末端で細くなる効果を追加するための命令です。このビデオでは、枝が末端でどのように徐々に細くなるかを制御する方法が説明されています。

💡Randomization

ランダム化は、L-systemsで生成される構造にバリエーションを追加するための技術で、予測不能な自然な外観を作るために使用されます。このビデオでは、ランダム化を使って植物の葉の種類をランダムに選択する方法が説明されています。

💡Probability

確率は、L-systemsで特定の命令が適用される可能性を制御するために使用されます。このビデオでは、確率を使って葉の種類のランダム化を制御する方法が紹介されています。

💡Magic Market Scene

マジックマーケットシーンは、ビデオ内で使用された植物のデザインが適用される仮想のシーンです。このシーンは、L-systemsを使って創造された植物がどのように見えるかを示すために使用されています。

Highlights

Introduction to Houdini L-systems, a method for creating complex procedural plant models.

Explanation of the basic L-system symbol 'f' representing forward movement.

Use of '+' for turning right and '-' for turning left in L-systems notation.

Branching in L-systems is achieved using square brackets to contain additional information.

Adjusting global values such as angle to modify the angles of turns in the L-system.

Creating complex L-systems by substituting rules within other rules.

Controlling the growth of the L-system with the 'generations' parameter.

Breaking down the structure of a plant for the magic market scene using L-systems.

Adding segments to the plant model by calling 'a' within the main rule.

Adjusting the angle and length of individual segments for a more natural plant appearance.

Introducing rule substitution to streamline the L-system model and reduce redundancy.

Adding curvature to the stems using symbols for upward and downward bends.

Changing the geometry type from skeleton to tube for a more solid plant model.

Adjusting the taper of the branches for a more realistic plant structure.

Integrating randomness into the plant model for variation in angles and stem thickness.

Adding leaves, flowers, and flower buds to the plant model using geometry inputs.

Scaling and positioning the leaves and flowers for a more accurate representation.

Using a switch node and probability to randomize leaf types within the plant model.

Transcripts

play00:00

[Music]

play00:00

hi and welcome to this tutorial on

play00:02

houdini l systems

play00:04

in this video i'll go over the process

play00:06

that i use to create

play00:07

the simple plant for the magic market

play00:09

scene

play00:11

our systems might seem scary at first i

play00:13

mean what do all these letters and

play00:15

symbols mean

play00:16

but once you understand that all these

play00:18

letters and symbols are basically just a

play00:20

set of simple directions

play00:22

all that fear falls away and you can

play00:24

start creating some very interesting

play00:26

systems

play00:27

let's begin with the basics the most

play00:30

used symbol

play00:30

will be f think of f as standing

play00:34

for forward so we place an f

play00:37

and move forward a set distance

play00:41

cool now let's move forward again so we

play00:44

place another f

play00:47

simple enough so traveling in a straight

play00:49

line is kind of boring

play00:51

let's turn right to do this we place a

play00:54

plus which means turn right

play00:59

remember these symbols have nothing to

play01:00

do with their usual meaning

play01:02

plus has nothing to do with addition so

play01:05

we've stated that our next step

play01:06

is to turn right next we want to move

play01:09

forward again

play01:10

so we place another f

play01:13

now let's turn left to turn left we use

play01:17

the symbol

play01:18

minus remember it's just step by step

play01:21

directions so we turn left from our

play01:24

current position

play01:26

so if you're using l systems chances are

play01:29

you're going to want to create something

play01:30

that has

play01:31

branching such as a tree branching in l

play01:34

systems is done with square brackets

play01:37

the open brackets represents the start

play01:39

of a branch

play01:40

and closed represents the end of a

play01:42

branch the brackets basically contain

play01:44

extra information separate from the

play01:46

current path we are on

play01:48

so let's start again we'll go forward

play01:50

twice with

play01:52

f f now we're going to turn right

play01:56

but this time it is going to branch off

play01:58

from the current path

play02:00

to do this we drop down a square bracket

play02:03

this is the start of a branch

play02:05

followed by a plus f and close brackets

play02:11

this looks the same as before let's see

play02:13

what happens if we add another f

play02:14

after the brackets the path continues

play02:18

from before

play02:18

the square brackets now if we wanted

play02:22

we could keep traveling up our main path

play02:24

by adding more instructions after the

play02:26

square bracket

play02:28

or we could add more information to our

play02:30

branch

play02:31

by adding more instructions within the

play02:33

square brackets

play02:38

i could continue going over the basics

play02:40

but let's create something a little bit

play02:42

more interesting

play02:43

and learn as we go

play02:47

alright let's get started by dropping

play02:49

down a l system

play02:54

let's dive inside and here we'll find

play02:57

our l system node

play03:00

you see at the moment it's given us this

play03:02

default tree

play03:04

to change that let's go into the rules

play03:05

tab

play03:08

as you can see here this contains all

play03:09

the rules to create this tree

play03:12

since we don't want it let's remove the

play03:16

rules like that

play03:19

and let's type what we created earlier

play03:23

f f square brackets

play03:28

plus f f minus

play03:32

f outside of the square brackets ff

play03:35

and press enter as we can see here

play03:38

this isn't exactly what we created

play03:40

earlier we're missing those

play03:42

right angles to change that we can go

play03:46

up here to the values tab

play03:49

this contains all the global values for

play03:52

our l system

play03:52

the one we interested in is this angle

play03:56

at the moment that 28 i can adjust with

play03:59

the slider

play04:04

i can set this to 90 degrees and that

play04:07

fixes the problem

play04:10

another way of doing it is to go back to

play04:13

our rules

play04:15

create an explicit value so for our

play04:19

turn right instruction with the plus

play04:21

sign

play04:22

let's drop down some brackets and put in

play04:25

the value

play04:26

of 90. let's do the same

play04:31

for our turn left instruction

play04:36

and there we go let's clear this premise

play04:44

and type f f

play04:48

gives us forward forward now let's drop

play04:51

in

play04:51

an a what is a well currently a is

play04:55

nothing

play04:56

so let's give it a value in our first

play04:59

rule

play04:59

let's type in a equals

play05:04

and this is where we'll give a some

play05:06

instructions

play05:08

let's say f plus

play05:11

f square brackets

play05:15

plus f

play05:20

so there we go as you can see we've got

play05:23

ffa which is forward forward

play05:27

and then we bring in a which is f plus f

play05:30

square brackets plus f this is cool

play05:33

because we can now substitute rules

play05:35

into rules giving us the ability to

play05:37

create very complex

play05:38

all systems let's add an a to the end of

play05:42

our rule

play05:44

like this so basically what this is

play05:46

doing

play05:47

is calling a within

play05:50

a so once a is run we call a

play05:53

again let's press enter

play05:57

as you can see we have this now this is

play06:00

controlled

play06:01

with generations you can find

play06:03

generations within the geometry tab up

play06:06

here

play06:09

the moment it's set to 7 we can push it

play06:11

up to

play06:13

15 and we get something like this

play06:16

let's bring it back down to 7. as you

play06:19

can see if i

play06:20

bring the slider down shrinks bring it

play06:23

up again

play06:24

it grows this generation

play06:28

is controlling how many times we have

play06:30

the rule substitution

play06:32

this is a powerful concept within our

play06:34

systems generations

play06:36

but we'll get back to it later so let's

play06:38

get into one of the plants i created for

play06:40

the magic market scene

play06:42

it has a nice simple structure that will

play06:44

allow us to try a few techniques

play06:46

first things first let's bring up some

play06:48

reference

play06:51

looking at this image we can try to

play06:53

break down its structure

play06:55

we can see that it's broken up into

play06:56

segments at the end of each segment

play06:58

it branches out into three which is made

play07:01

up of

play07:02

two leaves and one flower so let's get

play07:05

started with this plant

play07:07

let's delete what we've created

play07:12

let's drop down a

play07:15

enter a doesn't exist yet so let's

play07:19

create it

play07:20

a equals f

play07:24

and we want it to branch off so square

play07:27

brackets

play07:29

f enter there we go

play07:32

at the moment it looks like a single

play07:34

line but if we

play07:36

activate display points we'll see that

play07:39

we've got two segments

play07:41

the problem is

play07:46

that it's currently pointing straight up

play07:47

we want it to angle down a little bit

play07:50

so to do that let's drop in the symbol

play07:54

and this symbol means angle down

play07:57

let's press enter and see we've got it

play08:00

angled down

play08:02

cool so let's create our other two

play08:04

branches

play08:06

we'll just do exactly what we did with

play08:07

the first one

play08:17

okay we've got three branches here but

play08:19

we can't see it because they're

play08:20

currently sitting

play08:21

on top of each other to fix this we want

play08:24

to

play08:25

roll each branch so to roll it

play08:28

let's put in the symbol

play08:32

put it between that branch and that

play08:34

branch

play08:36

and now we've got a separation but we

play08:39

want an

play08:40

equal angle between them so remember we

play08:42

can set an explicit angle

play08:45

or an explicit value by putting bracket

play08:48

after the symbol and putting the value

play08:50

we want

play08:52

120.

play08:59

there it is

play09:02

currently we have the first segment of

play09:04

our plant but we want multiple segments

play09:07

to do this

play09:09

we just call a back into our rule at the

play09:12

end

play09:14

here we go now remember this is

play09:16

controlled with

play09:17

the generation amount so if i bring this

play09:20

down

play09:24

push it up

play09:28

as you can see when i'm moving it like

play09:30

this we get a gradual growth

play09:33

i prefer to have it in more of a step in

play09:36

manner

play09:36

so to do that i'm going to disable

play09:38

continuous angles

play09:40

continuous length and continuous width

play09:42

now what i get

play09:44

is this

play09:47

i find this a lot easier to work with

play09:49

when you're trying to get the look of a

play09:50

plant down

play09:53

the next thing i noticed from our

play09:54

reference image

play09:56

is that the stem for the flower is a lot

play09:59

longer than the stem for the leaves

play10:02

now i can adjust the length of the

play10:04

individual

play10:05

stems but i prefer to add some

play10:08

resolution

play10:10

so to add resolution i'm just going to

play10:12

add more segments

play10:13

to do that i'll just add

play10:17

another two f's in our first branch

play10:21

and that gives us this as you can see i

play10:24

now have three segments

play10:25

for this branch now obviously this is

play10:29

too long we need to adjust the length

play10:31

to do that i can go in

play10:34

and within brackets after the ef give it

play10:37

a length of

play10:38

let's say 0.02

play10:41

that adjusts the first segment so we

play10:44

have to do it for the next two as well

play10:54

there we go we can see we've adjusted

play10:56

each one

play10:59

now this works but it's kind of tedious

play11:03

and it's getting a little bit messy

play11:06

so let's do rule substitution for this

play11:08

let's create a new rule

play11:09

call it b let's just copy and paste what

play11:14

we've done here

play11:22

so b equals what we have over here

play11:27

and now we can remove all of this

play11:31

just leave in that down angle symbol

play11:35

and drop down b so now we're doing a

play11:38

rule substitution we get the exact same

play11:40

result

play11:43

but what i'm going to do for this

play11:46

is remove all of this

play11:50

just keep that single line

play11:54

and instead of calling b and once here

play11:57

i'm going to call it in

play11:58

three times

play12:01

this will make sense further down the

play12:04

road

play12:07

so currently this is too short so let's

play12:11

adjust the length make it slightly

play12:13

longer

play12:15

and let's add another segment let's put

play12:18

another b

play12:18

in there cool so let's do the same thing

play12:22

for the other two

play12:24

the stems that will have the leaves on

play12:26

them

play12:27

they all share the same rule so let's

play12:28

create another rule for them and call it

play12:30

c c equals

play12:34

let's give it a length of

play12:38

0.01

play12:42

and let's remove this f and put our c in

play12:45

three times and then the same for this

play12:51

cool

play12:52

so now we have our long stem that is

play12:55

controlled

play12:56

with the b rule and the two shorter ones

play13:00

which are controlled with c

play13:02

so the next thing we want to do is add

play13:04

some shape to the plant

play13:06

at the moment all the stems are straight

play13:08

lines

play13:09

so let's add a little curvature to it we

play13:12

can see from our reference image that

play13:14

the stems which have flowers on the end

play13:16

bend upwards while the small stems of

play13:19

the leaves on the end bend downwards

play13:22

so let's do the one for the

play13:25

flower stems first to do that we're

play13:27

going to use the symbol for an

play13:28

upward bend

play13:33

and we're going to override the global

play13:34

value by putting a value of 10 degrees

play13:36

in brackets

play13:40

as you can see it now bends upwards

play13:44

now let's sort out the smaller stems for

play13:46

the leaves

play13:48

we'll use the symbol for down angle

play13:52

once again override the global value

play13:56

and give it a value of 10 degrees

play13:59

there we go now instead of viewing this

play14:02

as lines and points

play14:03

let's view it as geometry firstly i'm

play14:06

going to disable the display points

play14:10

i'm going to go over to geometry tab and

play14:13

change the type from skeleton to tube

play14:18

at the moment it's a bit of a mess so

play14:20

let's fix that up by going into the

play14:22

tube tab and changing these values of

play14:25

rows and columns let's push it up so

play14:27

that we have more resolution

play14:35

there we go now we can adjust the

play14:38

thickness with the slider over here

play14:41

but for the moment i'm going to keep it

play14:43

at its default

play14:45

now let's have our plant taper on the

play14:48

ends of each branches

play14:50

but also taper overall with each

play14:52

generation

play14:55

if we hover over the thickness scale

play14:57

we'll see this pops up

play14:59

it says how much the exclamation

play15:02

operation will affect the thickness

play15:03

exclamation mark is the symbol used to

play15:06

control the thickness scale

play15:10

so if we go back to our rules and put

play15:13

the exclamation down

play15:17

you can see now that is a slight taper

play15:19

as it goes towards the end

play15:21

let's do the same for our c rule

play15:28

so if we go back to the tube

play15:31

this affects the thickness scale let's

play15:34

drop this down to

play15:35

0.8

play15:39

and let's drop the overall thickness to

play15:42

0.07

play15:48

so at the moment each branch has a taper

play15:51

what i want to tackle next is to have an

play15:53

overall taper for the plant

play15:55

this needs to be controlled with the

play15:57

generations

play15:58

so to do that let's go back to our rule

play16:02

and for our overall plant put the

play16:05

exclamation mark down

play16:09

now we can see the plant starts and as

play16:12

it goes up

play16:13

tapers off

play16:16

what our plant needs now is a little bit

play16:18

of variation

play16:21

to do this let's add in

play16:24

the symbol followed by brackets

play16:28

and a value of 20.

play16:32

what this means is we'll get a random

play16:35

value

play16:36

for the angle to a maximum of

play16:40

the value we've put in brackets which in

play16:41

this case is 20 degrees

play16:43

so we'll get a random value up to

play16:46

20 degrees let's do the same

play16:50

thing for this one

play16:54

and choose a value of 10. now let's add

play16:57

a little bit of variation to the main

play16:59

stem let's go to this rule here

play17:11

now that gives the variation i'm looking

play17:13

for but it's also giving me a random

play17:15

angle right from the base

play17:16

which makes the entire plant lean over

play17:20

i want the the plant to come out of the

play17:22

ground straight and then start bending

play17:25

so to overcome this i'll just add a

play17:28

another segment at the base in the

play17:31

premise i will put

play17:32

f

play17:37

and our first segment is straight it's a

play17:40

little bit long

play17:41

so i want to adjust the length to do

play17:43

that

play17:44

drop brackets after the f and give it a

play17:47

value

play17:51

that's better

play17:55

now that we have the main shape of our

play17:56

plant done let's add the

play17:58

leaves flowers and flower buds to do

play18:01

this

play18:02

i'm going to call in some geometry i

play18:04

created

play18:06

with an object merge

play18:22

let's have a look at these geometries on

play18:25

their own

play18:26

there's a leaf here's the flower

play18:31

and here's the flower bud

play18:37

so let's plug in each one of these

play18:41

into our first three inputs

play18:45

if we hover over the input we'll see it

play18:47

says leaf j

play18:48

input leaf k input and leave

play18:51

m input j k and m can then be used

play18:55

within our rules to reference

play18:56

these geometries so let's go back to our

play19:00

system

play19:05

let's add our flower first a flower

play19:08

needs to be put on to the end of the

play19:09

long stem

play19:10

which is at the end of these four b's

play19:14

remember our flower is plugged into our

play19:16

second input

play19:17

k so all i have to do is drop a k

play19:20

over here press enter

play19:24

now if we have a look we can see our

play19:25

flowers on the end

play19:29

let's do the leaves next our leaves are

play19:32

connected

play19:33

into the first input which is j

play19:37

so let's put a j at the end of this

play19:40

and at the end of our second stem

play19:45

now we have some leaves

play19:48

as you can see our leaves and flowers

play19:50

are too small so let's scale them up

play19:52

we can use a transform node

play19:56

let's do the leaves first

play20:08

looking at the plant the next thing i

play20:10

see that needs some changing

play20:12

are the size of the leaves and the

play20:13

flowers at the moment the leaves and the

play20:15

flowers

play20:16

are the same size from the base of the

play20:17

plant up to the tip what i want

play20:20

is for the size to decrease as we go out

play20:22

the plant

play20:24

to do this i will drop in the symbol

play20:28

over here

play20:30

and that will just multiply each

play20:33

generation

play20:35

by this value here so i can shrink it

play20:38

down if i want

play20:42

but i'll leave it at the default value

play20:44

of 0.9

play20:46

the next problem now is that our stem

play20:49

for our flower is way too long

play20:52

so let's change the length of that by

play20:55

coming in here

play20:59

making it smaller

play21:04

now let's change the length and the

play21:06

thickness of the leaf stems

play21:09

let's change the length first

play21:15

and then to change the thickness all i

play21:17

have to do is put a comma

play21:20

and give this a value

play21:23

i think something like that will be okay

play21:28

let's add some more generations to this

play21:31

let's make it seven

play21:36

if we look at our reference image again

play21:38

you can see that we want the flower buds

play21:40

to appear

play21:41

but only at the top of the plant so to

play21:43

do this

play21:44

let's create another rule

play22:02

so let's go over the rule we just typed

play22:04

on we have the length scaling down with

play22:07

each generation

play22:08

we also have the thickness being scaled

play22:10

down with each generation

play22:12

we now have a segment for the length of

play22:15

0.02

play22:17

we then have our first branch

play22:20

which is a downward angle followed by

play22:24

b this rule over here being substituted

play22:27

into it

play22:28

three times and an m

play22:31

which is our third input of our l system

play22:36

we then have it rolling counterclockwise

play22:39

by 120 degrees and then we just

play22:43

repeat that another two times

play22:47

and then i ended up removing the a at

play22:49

the end

play22:51

to use this new rule let's put it in the

play22:54

premise after a the reason for this

play22:58

is i only want the flower buds to appear

play23:00

at the end of the plant

play23:02

and not to be used in each generation

play23:10

as you can see here we now have our

play23:13

three stems with flower buds

play23:18

now if i would like to change the angle

play23:22

of these stems i could always just go in

play23:24

here

play23:25

and give it a value so let's say 20.

play23:30

now i'd have to do it for this one as

play23:34

well

play23:36

and this one over here now this works

play23:40

but if i was unhappy with that value i'd

play23:42

have to go in and change each value

play23:46

there is however a better way of doing

play23:48

this

play23:50

if you come over to the values tab

play23:52

you'll see that we have this

play23:53

variable b variable c variable

play23:56

d we can use this

play24:02

in place of a value so i'm going to use

play24:05

variable b in there

play24:10

in there and over here

play24:17

now if i want to make any changes to it

play24:20

i just have to come over here

play24:23

and adjust it and we'll adjust all three

play24:25

for me

play24:28

so we have b c and e that we can make

play24:31

use of

play24:32

but we can also create our own by coming

play24:34

over here

play24:35

and add in one and we can give it any

play24:37

name we'd like

play24:38

so if we wanted to we could call it

play24:41

flower

play24:44

but for instance and then within our

play24:48

rule

play24:49

we'll just call it so instead of b we'd

play24:51

have

play24:58

flowerbed

play25:06

now at the moment this doesn't look too

play25:07

bad

play25:10

but i'm only using a single type of

play25:12

geometry for the leaves

play25:14

i'd like to add some randomization and

play25:16

variance to this

play25:18

i add in another leaf geometry but as

play25:21

you can see all our inputs for

play25:23

geometry are used

play25:27

fortunately there is a way to add more

play25:29

geometry first of all

play25:30

let's bring in our second leaf geometry

play25:38

we'll now drop a switch node

play25:43

and connect our two leaves into

play25:47

we're going to make use of stampin to do

play25:49

this

play25:50

type in stamp

play25:53

open brackets

play25:56

and the location of our l-system

play26:08

and also a default value

play26:12

now let's go back to our rules

play26:16

and after the j which is our first

play26:20

input we'll just add this

play26:28

this one at the end controls which input

play26:30

we're using in our switch node

play26:32

the first input is zero the second one

play26:36

let's add it to the other j as well

play26:43

we'll make this one zero

play26:51

as you can see we have a combination of

play26:53

our original leaf

play26:55

plus our second one

play26:59

now this isn't exactly random currently

play27:01

we have

play27:03

a leaf one and leaf two

play27:07

leaf one and leaf two leave one and

play27:10

leave two and this happens with eat with

play27:12

each generation

play27:14

so to give it a little bit of

play27:15

randomization

play27:18

let's first duplicate this rule

play27:23

just copy it and paste it here

play27:28

and i'm going to change these to both be

play27:33

from input 0 on the switch node

play27:36

and this first one over here will both

play27:38

be from input

play27:39

1. we now have identical rules with the

play27:42

only difference being the switch

play27:44

input values this being 1 1 this being

play27:47

zero zero to give this a bit of

play27:50

randomization

play27:51

we're going to use probability

play27:54

to do this all we have to do is add this

play27:57

at the end of our rule

play28:00

0.5

play28:04

after a colon this is our probability

play28:08

fifty percent so there's a fifty percent

play28:11

chance that we will use this rule

play28:14

otherwise we'll use this one over here

play28:17

next up i'll go into the geometry tab

play28:19

and mess with this random scale slider a

play28:22

little bit

play28:24

this will just give us slight variations

play28:26

in our scale

play28:29

we can also move the random seed value

play28:32

and this will give us some variations of

play28:34

our plant

play28:42

we can now check these boxes if we like

play28:53

and apply color

play28:58

this plant was one of the simpler plants

play29:00

used in the magic market scene

play29:02

it shows off the basics of l systems

play29:04

hopefully this has given you the

play29:05

building blocks

play29:06

for you to create your own more complex

play29:08

alt systems

play29:10

i hope you found this helpful and until

play29:12

next time goodbye

Rate This

5.0 / 5 (0 votes)

Related Tags
HoudiniLシステムチュートリアル植物制作魔法市場プログラミングCG3Dモデル応用技術創造
Do you need a summary in English?