Magic Market | L-Systems
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
🌿 Lシステムの基礎とシンプルな植物の作成
この段落では、Lシステムの基礎とシンプルな植物を作るプロセスについて説明されています。Lシステムは最初に恐れられるかもしれませんが、これらの記号は単なる簡単な指示に過ぎず、理解すれば恐れは消えて興味深いシステムを作り始めることができます。基本的な記号として「f」が使われており、これは「forward」(前進)を意味します。また、直角を拐るためには「+」を使い、左に拐る場合は「-」を使用します。さらに、枝分かれを表現するためには角括弧を使用します。この段落では、これらの基本的な記号を使って、マジックマーケットのシーンで使用されるシンプルな植物を作成する方法が紹介されています。
🌳 Lシステムのルールと複雑な構造の作成
この段落では、Lシステムのルールを設定する方法と、それを使って複雑な構造を作る方法が説明されています。ルールを編集することで、基本的な構造を作り出すことができます。この段落では、ルールの変更と世代数(generations)の調整によって、植物の形状をコントロールする方法が紹介されています。世代数を上げることで、ルールの置換回数が増加し、より複雑な構造が作られます。また、ルールのサブスティテーションを通じて、より複雑なLシステムを作り出すことができます。
🍃 植物の形状と解像度の調整
この段落では、植物の形状を調整し、解像度を向上させる方法が説明されています。植物の茎の長さやカーブを調整し、花や葉の形状を与える方法が紹介されています。茎のカーブを上げるためには、「upward bend」の記号を使用し、茎を下げるためには「down angle」の記号を使用します。また、解像度を上げるためには、より多くのセグメントを追加する方法が説明されています。これにより、茎の長さやカーブを細かく調整することができます。
🌸 植物への葉と花の追加
この段落では、植物に葉と花を追加する方法が説明されています。まず、オブジェクトマージを使用して、事前に作成された花や花びらのジオメトリを組み込みます。そして、Lシステムのルール内でこれらのジオメトリを参照するために、特定の記号を追加します。また、花や葉のサイズを調整し、植物の見た目を自然なようにするために、変形ノードを使用する方法が紹介されています。最後に、植物の茎の長さや太さを調整し、花びらが頂部に現れるように設定します。
🌱 植物のバリエーションとランダム化
この段落では、植物のバリエーションを作り出す方法と、ランダム化する方法が説明されています。複数の葉のジオメトリを用意し、スイッチノードを使用してランダムに選択する方法が紹介されています。また、確率の設定を通じて、どの葉のジオメトリが使用されるかを制御する方法も説明されています。さらに、ランダムなスケールとシード値の調整を通じて、植物の外見を多様化する方法が説明されています。この段落は、Lシステムを使って複雑で自然な植物を作るための技術を紹介しています。
Mindmap
Keywords
💡Houdini L-systems
💡Forward (f)
💡Turn (plus and minus)
💡Branching (square brackets)
💡Rule substitution
💡Generations
💡Geometry
💡Taper
💡Randomization
💡Probability
💡Magic Market Scene
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
[Music]
hi and welcome to this tutorial on
houdini l systems
in this video i'll go over the process
that i use to create
the simple plant for the magic market
scene
our systems might seem scary at first i
mean what do all these letters and
symbols mean
but once you understand that all these
letters and symbols are basically just a
set of simple directions
all that fear falls away and you can
start creating some very interesting
systems
let's begin with the basics the most
used symbol
will be f think of f as standing
for forward so we place an f
and move forward a set distance
cool now let's move forward again so we
place another f
simple enough so traveling in a straight
line is kind of boring
let's turn right to do this we place a
plus which means turn right
remember these symbols have nothing to
do with their usual meaning
plus has nothing to do with addition so
we've stated that our next step
is to turn right next we want to move
forward again
so we place another f
now let's turn left to turn left we use
the symbol
minus remember it's just step by step
directions so we turn left from our
current position
so if you're using l systems chances are
you're going to want to create something
that has
branching such as a tree branching in l
systems is done with square brackets
the open brackets represents the start
of a branch
and closed represents the end of a
branch the brackets basically contain
extra information separate from the
current path we are on
so let's start again we'll go forward
twice with
f f now we're going to turn right
but this time it is going to branch off
from the current path
to do this we drop down a square bracket
this is the start of a branch
followed by a plus f and close brackets
this looks the same as before let's see
what happens if we add another f
after the brackets the path continues
from before
the square brackets now if we wanted
we could keep traveling up our main path
by adding more instructions after the
square bracket
or we could add more information to our
branch
by adding more instructions within the
square brackets
i could continue going over the basics
but let's create something a little bit
more interesting
and learn as we go
alright let's get started by dropping
down a l system
let's dive inside and here we'll find
our l system node
you see at the moment it's given us this
default tree
to change that let's go into the rules
tab
as you can see here this contains all
the rules to create this tree
since we don't want it let's remove the
rules like that
and let's type what we created earlier
f f square brackets
plus f f minus
f outside of the square brackets ff
and press enter as we can see here
this isn't exactly what we created
earlier we're missing those
right angles to change that we can go
up here to the values tab
this contains all the global values for
our l system
the one we interested in is this angle
at the moment that 28 i can adjust with
the slider
i can set this to 90 degrees and that
fixes the problem
another way of doing it is to go back to
our rules
create an explicit value so for our
turn right instruction with the plus
sign
let's drop down some brackets and put in
the value
of 90. let's do the same
for our turn left instruction
and there we go let's clear this premise
and type f f
gives us forward forward now let's drop
in
an a what is a well currently a is
nothing
so let's give it a value in our first
rule
let's type in a equals
and this is where we'll give a some
instructions
let's say f plus
f square brackets
plus f
so there we go as you can see we've got
ffa which is forward forward
and then we bring in a which is f plus f
square brackets plus f this is cool
because we can now substitute rules
into rules giving us the ability to
create very complex
all systems let's add an a to the end of
our rule
like this so basically what this is
doing
is calling a within
a so once a is run we call a
again let's press enter
as you can see we have this now this is
controlled
with generations you can find
generations within the geometry tab up
here
the moment it's set to 7 we can push it
up to
15 and we get something like this
let's bring it back down to 7. as you
can see if i
bring the slider down shrinks bring it
up again
it grows this generation
is controlling how many times we have
the rule substitution
this is a powerful concept within our
systems generations
but we'll get back to it later so let's
get into one of the plants i created for
the magic market scene
it has a nice simple structure that will
allow us to try a few techniques
first things first let's bring up some
reference
looking at this image we can try to
break down its structure
we can see that it's broken up into
segments at the end of each segment
it branches out into three which is made
up of
two leaves and one flower so let's get
started with this plant
let's delete what we've created
let's drop down a
enter a doesn't exist yet so let's
create it
a equals f
and we want it to branch off so square
brackets
f enter there we go
at the moment it looks like a single
line but if we
activate display points we'll see that
we've got two segments
the problem is
that it's currently pointing straight up
we want it to angle down a little bit
so to do that let's drop in the symbol
and this symbol means angle down
let's press enter and see we've got it
angled down
cool so let's create our other two
branches
we'll just do exactly what we did with
the first one
okay we've got three branches here but
we can't see it because they're
currently sitting
on top of each other to fix this we want
to
roll each branch so to roll it
let's put in the symbol
put it between that branch and that
branch
and now we've got a separation but we
want an
equal angle between them so remember we
can set an explicit angle
or an explicit value by putting bracket
after the symbol and putting the value
we want
120.
there it is
currently we have the first segment of
our plant but we want multiple segments
to do this
we just call a back into our rule at the
end
here we go now remember this is
controlled with
the generation amount so if i bring this
down
push it up
as you can see when i'm moving it like
this we get a gradual growth
i prefer to have it in more of a step in
manner
so to do that i'm going to disable
continuous angles
continuous length and continuous width
now what i get
is this
i find this a lot easier to work with
when you're trying to get the look of a
plant down
the next thing i noticed from our
reference image
is that the stem for the flower is a lot
longer than the stem for the leaves
now i can adjust the length of the
individual
stems but i prefer to add some
resolution
so to add resolution i'm just going to
add more segments
to do that i'll just add
another two f's in our first branch
and that gives us this as you can see i
now have three segments
for this branch now obviously this is
too long we need to adjust the length
to do that i can go in
and within brackets after the ef give it
a length of
let's say 0.02
that adjusts the first segment so we
have to do it for the next two as well
there we go we can see we've adjusted
each one
now this works but it's kind of tedious
and it's getting a little bit messy
so let's do rule substitution for this
let's create a new rule
call it b let's just copy and paste what
we've done here
so b equals what we have over here
and now we can remove all of this
just leave in that down angle symbol
and drop down b so now we're doing a
rule substitution we get the exact same
result
but what i'm going to do for this
is remove all of this
just keep that single line
and instead of calling b and once here
i'm going to call it in
three times
this will make sense further down the
road
so currently this is too short so let's
adjust the length make it slightly
longer
and let's add another segment let's put
another b
in there cool so let's do the same thing
for the other two
the stems that will have the leaves on
them
they all share the same rule so let's
create another rule for them and call it
c c equals
let's give it a length of
0.01
and let's remove this f and put our c in
three times and then the same for this
cool
so now we have our long stem that is
controlled
with the b rule and the two shorter ones
which are controlled with c
so the next thing we want to do is add
some shape to the plant
at the moment all the stems are straight
lines
so let's add a little curvature to it we
can see from our reference image that
the stems which have flowers on the end
bend upwards while the small stems of
the leaves on the end bend downwards
so let's do the one for the
flower stems first to do that we're
going to use the symbol for an
upward bend
and we're going to override the global
value by putting a value of 10 degrees
in brackets
as you can see it now bends upwards
now let's sort out the smaller stems for
the leaves
we'll use the symbol for down angle
once again override the global value
and give it a value of 10 degrees
there we go now instead of viewing this
as lines and points
let's view it as geometry firstly i'm
going to disable the display points
i'm going to go over to geometry tab and
change the type from skeleton to tube
at the moment it's a bit of a mess so
let's fix that up by going into the
tube tab and changing these values of
rows and columns let's push it up so
that we have more resolution
there we go now we can adjust the
thickness with the slider over here
but for the moment i'm going to keep it
at its default
now let's have our plant taper on the
ends of each branches
but also taper overall with each
generation
if we hover over the thickness scale
we'll see this pops up
it says how much the exclamation
operation will affect the thickness
exclamation mark is the symbol used to
control the thickness scale
so if we go back to our rules and put
the exclamation down
you can see now that is a slight taper
as it goes towards the end
let's do the same for our c rule
so if we go back to the tube
this affects the thickness scale let's
drop this down to
0.8
and let's drop the overall thickness to
0.07
so at the moment each branch has a taper
what i want to tackle next is to have an
overall taper for the plant
this needs to be controlled with the
generations
so to do that let's go back to our rule
and for our overall plant put the
exclamation mark down
now we can see the plant starts and as
it goes up
tapers off
what our plant needs now is a little bit
of variation
to do this let's add in
the symbol followed by brackets
and a value of 20.
what this means is we'll get a random
value
for the angle to a maximum of
the value we've put in brackets which in
this case is 20 degrees
so we'll get a random value up to
20 degrees let's do the same
thing for this one
and choose a value of 10. now let's add
a little bit of variation to the main
stem let's go to this rule here
now that gives the variation i'm looking
for but it's also giving me a random
angle right from the base
which makes the entire plant lean over
i want the the plant to come out of the
ground straight and then start bending
so to overcome this i'll just add a
another segment at the base in the
premise i will put
f
and our first segment is straight it's a
little bit long
so i want to adjust the length to do
that
drop brackets after the f and give it a
value
that's better
now that we have the main shape of our
plant done let's add the
leaves flowers and flower buds to do
this
i'm going to call in some geometry i
created
with an object merge
let's have a look at these geometries on
their own
there's a leaf here's the flower
and here's the flower bud
so let's plug in each one of these
into our first three inputs
if we hover over the input we'll see it
says leaf j
input leaf k input and leave
m input j k and m can then be used
within our rules to reference
these geometries so let's go back to our
system
let's add our flower first a flower
needs to be put on to the end of the
long stem
which is at the end of these four b's
remember our flower is plugged into our
second input
k so all i have to do is drop a k
over here press enter
now if we have a look we can see our
flowers on the end
let's do the leaves next our leaves are
connected
into the first input which is j
so let's put a j at the end of this
and at the end of our second stem
now we have some leaves
as you can see our leaves and flowers
are too small so let's scale them up
we can use a transform node
let's do the leaves first
looking at the plant the next thing i
see that needs some changing
are the size of the leaves and the
flowers at the moment the leaves and the
flowers
are the same size from the base of the
plant up to the tip what i want
is for the size to decrease as we go out
the plant
to do this i will drop in the symbol
over here
and that will just multiply each
generation
by this value here so i can shrink it
down if i want
but i'll leave it at the default value
of 0.9
the next problem now is that our stem
for our flower is way too long
so let's change the length of that by
coming in here
making it smaller
now let's change the length and the
thickness of the leaf stems
let's change the length first
and then to change the thickness all i
have to do is put a comma
and give this a value
i think something like that will be okay
let's add some more generations to this
let's make it seven
if we look at our reference image again
you can see that we want the flower buds
to appear
but only at the top of the plant so to
do this
let's create another rule
so let's go over the rule we just typed
on we have the length scaling down with
each generation
we also have the thickness being scaled
down with each generation
we now have a segment for the length of
0.02
we then have our first branch
which is a downward angle followed by
b this rule over here being substituted
into it
three times and an m
which is our third input of our l system
we then have it rolling counterclockwise
by 120 degrees and then we just
repeat that another two times
and then i ended up removing the a at
the end
to use this new rule let's put it in the
premise after a the reason for this
is i only want the flower buds to appear
at the end of the plant
and not to be used in each generation
as you can see here we now have our
three stems with flower buds
now if i would like to change the angle
of these stems i could always just go in
here
and give it a value so let's say 20.
now i'd have to do it for this one as
well
and this one over here now this works
but if i was unhappy with that value i'd
have to go in and change each value
there is however a better way of doing
this
if you come over to the values tab
you'll see that we have this
variable b variable c variable
d we can use this
in place of a value so i'm going to use
variable b in there
in there and over here
now if i want to make any changes to it
i just have to come over here
and adjust it and we'll adjust all three
for me
so we have b c and e that we can make
use of
but we can also create our own by coming
over here
and add in one and we can give it any
name we'd like
so if we wanted to we could call it
flower
but for instance and then within our
rule
we'll just call it so instead of b we'd
have
flowerbed
now at the moment this doesn't look too
bad
but i'm only using a single type of
geometry for the leaves
i'd like to add some randomization and
variance to this
i add in another leaf geometry but as
you can see all our inputs for
geometry are used
fortunately there is a way to add more
geometry first of all
let's bring in our second leaf geometry
we'll now drop a switch node
and connect our two leaves into
we're going to make use of stampin to do
this
type in stamp
open brackets
and the location of our l-system
and also a default value
now let's go back to our rules
and after the j which is our first
input we'll just add this
this one at the end controls which input
we're using in our switch node
the first input is zero the second one
let's add it to the other j as well
we'll make this one zero
as you can see we have a combination of
our original leaf
plus our second one
now this isn't exactly random currently
we have
a leaf one and leaf two
leaf one and leaf two leave one and
leave two and this happens with eat with
each generation
so to give it a little bit of
randomization
let's first duplicate this rule
just copy it and paste it here
and i'm going to change these to both be
from input 0 on the switch node
and this first one over here will both
be from input
1. we now have identical rules with the
only difference being the switch
input values this being 1 1 this being
zero zero to give this a bit of
randomization
we're going to use probability
to do this all we have to do is add this
at the end of our rule
0.5
after a colon this is our probability
fifty percent so there's a fifty percent
chance that we will use this rule
otherwise we'll use this one over here
next up i'll go into the geometry tab
and mess with this random scale slider a
little bit
this will just give us slight variations
in our scale
we can also move the random seed value
and this will give us some variations of
our plant
we can now check these boxes if we like
and apply color
this plant was one of the simpler plants
used in the magic market scene
it shows off the basics of l systems
hopefully this has given you the
building blocks
for you to create your own more complex
alt systems
i hope you found this helpful and until
next time goodbye
Weitere ähnliche Videos ansehen
A Comprehensive Cookbook for Claude 3
Accenture CEO on earnings beat and revenue cut, spending and generative AI
The Problem with Human Specialness in the Age of AI | Scott Aaronson | TEDxPaloAlto
Nvidia 2024 AI Event: Everything Revealed in 16 Minutes
This Midjourney Update is WILD + Pika's New AI Video Feature
コンテンツには5種類ある3 実際にわっきーのコンテンツをその視点で見る
5.0 / 5 (0 votes)