forked from OpeningDesign/Bonsai_Tutorials
288 lines
5.2 KiB
Text
288 lines
5.2 KiB
Text
1
|
|
00:00:00,000 --> 00:00:06,940
|
|
So, Shahruul on the OSARCH website asked if we can create a unique pattern like this gravel
|
|
|
|
2
|
|
00:00:06,940 --> 00:00:09,100
|
|
pattern here in Bonsai.
|
|
|
|
3
|
|
00:00:09,100 --> 00:00:10,400
|
|
And yes you can.
|
|
|
|
4
|
|
00:00:10,400 --> 00:00:16,880
|
|
So he created this seed file, this gravel pattern, which I opened in Inkscape here.
|
|
|
|
5
|
|
00:00:16,880 --> 00:00:19,200
|
|
See it's just vector based.
|
|
|
|
6
|
|
00:00:19,200 --> 00:00:23,600
|
|
Then I opened up our patterns SVG file here.
|
|
|
|
7
|
|
00:00:23,600 --> 00:00:28,080
|
|
And again to remind you where that's located, it's at that path there.
|
|
|
|
8
|
|
00:00:28,080 --> 00:00:29,080
|
|
It's called patterns SVG.
|
|
|
|
9
|
|
00:00:29,159 --> 00:00:33,160
|
|
These are all our drawing assets.
|
|
|
|
10
|
|
00:00:33,160 --> 00:00:42,920
|
|
So just copy the vector lines there and paste it in our patterns file.
|
|
|
|
11
|
|
00:00:42,920 --> 00:00:44,280
|
|
And I'm going to group it.
|
|
|
|
12
|
|
00:00:44,280 --> 00:00:46,280
|
|
Right click and group.
|
|
|
|
13
|
|
00:00:46,280 --> 00:00:49,760
|
|
And I'm going to scale it down.
|
|
|
|
14
|
|
00:00:49,760 --> 00:00:53,560
|
|
Control to hold the aspect ratio.
|
|
|
|
15
|
|
00:00:53,560 --> 00:00:57,560
|
|
Delete that.
|
|
|
|
16
|
|
00:00:57,560 --> 00:00:59,560
|
|
Previous.
|
|
|
|
17
|
|
00:00:59,560 --> 00:01:04,560
|
|
And scale it down.
|
|
|
|
18
|
|
00:01:04,560 --> 00:01:14,240
|
|
And we want to select it and go up to pattern and objects to pattern.
|
|
|
|
19
|
|
00:01:14,240 --> 00:01:19,520
|
|
If we go to our XML editor you'll see that it creates that new pattern under the def
|
|
|
|
20
|
|
00:01:19,520 --> 00:01:21,860
|
|
tag here.
|
|
|
|
21
|
|
00:01:21,860 --> 00:01:25,820
|
|
And just names it random pattern 11.
|
|
|
|
22
|
|
00:01:25,820 --> 00:01:32,300
|
|
Which we will change to gravel 2.
|
|
|
|
23
|
|
00:01:32,300 --> 00:01:36,300
|
|
You'll notice that most of these patterns are not under the def tag.
|
|
|
|
24
|
|
00:01:36,300 --> 00:01:44,900
|
|
I think the way an SVG should be organized, all the patterns should be in the def tag.
|
|
|
|
25
|
|
00:01:44,900 --> 00:01:50,340
|
|
We'll keep it there for now but it doesn't necessarily have to be.
|
|
|
|
26
|
|
00:01:50,340 --> 00:01:52,900
|
|
So save the file.
|
|
|
|
27
|
|
00:01:52,900 --> 00:01:55,420
|
|
Go back to our bonsai.
|
|
|
|
28
|
|
00:01:55,420 --> 00:01:59,420
|
|
And I've created a section here at the retaining wall.
|
|
|
|
29
|
|
00:01:59,420 --> 00:02:02,660
|
|
And I just run the drawing.
|
|
|
|
30
|
|
00:02:02,660 --> 00:02:05,420
|
|
Take note that the fill mode is turned shapely.
|
|
|
|
31
|
|
00:02:05,420 --> 00:02:09,340
|
|
And I'm just going to run the drawing.
|
|
|
|
32
|
|
00:02:09,340 --> 00:02:13,060
|
|
See what we're dealing with.
|
|
|
|
33
|
|
00:02:13,060 --> 00:02:15,040
|
|
So we'll right click on Chrome.
|
|
|
|
34
|
|
00:02:15,040 --> 00:02:17,880
|
|
Go to inspect to see what the rule is.
|
|
|
|
35
|
|
00:02:17,880 --> 00:02:19,400
|
|
Assigned to this.
|
|
|
|
36
|
|
00:02:19,400 --> 00:02:20,400
|
|
This rule.
|
|
|
|
37
|
|
00:02:20,400 --> 00:02:22,600
|
|
I'm going to copy that.
|
|
|
|
38
|
|
00:02:22,600 --> 00:02:29,640
|
|
I'm going to go to our default CSS that I have open in a text editor here.
|
|
|
|
39
|
|
00:02:29,640 --> 00:02:32,280
|
|
And just search for it.
|
|
|
|
40
|
|
00:02:32,280 --> 00:02:33,280
|
|
There's the rule.
|
|
|
|
41
|
|
00:02:33,280 --> 00:02:38,799
|
|
I'm going to copy and I'm just going to paste it to seed our gravel pattern.
|
|
|
|
42
|
|
00:02:38,800 --> 00:02:45,320
|
|
I'm going to change that to gravel2.
|
|
|
|
43
|
|
00:02:45,320 --> 00:02:50,980
|
|
And then I'm going to change this to gravel2.
|
|
|
|
44
|
|
00:02:50,980 --> 00:02:55,520
|
|
So anything in this URL is basically looking in the patterns file for a pattern with an
|
|
|
|
45
|
|
00:02:55,520 --> 00:02:57,400
|
|
ID of this name.
|
|
|
|
46
|
|
00:02:57,400 --> 00:02:59,280
|
|
So we already did that.
|
|
|
|
47
|
|
00:02:59,280 --> 00:03:08,760
|
|
So I'm going to save.
|
|
|
|
48
|
|
00:03:08,760 --> 00:03:12,880
|
|
And then I'm going to go back to our bones eye file.
|
|
|
|
49
|
|
00:03:12,880 --> 00:03:15,840
|
|
And select the object here.
|
|
|
|
50
|
|
00:03:15,840 --> 00:03:20,120
|
|
And we're going to go to our materials and we're going to change the layer set name to
|
|
|
|
51
|
|
00:03:20,120 --> 00:03:22,120
|
|
gravel2.
|
|
|
|
52
|
|
00:03:22,120 --> 00:03:30,079
|
|
And then I'm going to run the drawing again.
|
|
|
|
53
|
|
00:03:30,079 --> 00:03:32,000
|
|
There's our gravel pattern.
|
|
|
|
54
|
|
00:03:32,000 --> 00:03:36,600
|
|
So if you want to later on change the scale of that pattern.
|
|
|
|
55
|
|
00:03:36,600 --> 00:03:40,440
|
|
Let's say it's too big.
|
|
|
|
56
|
|
00:03:40,440 --> 00:03:43,120
|
|
Patterns file here.
|
|
|
|
57
|
|
00:03:43,120 --> 00:03:55,800
|
|
And we want to pull out this, the G, the group of that pattern there.
|
|
|
|
58
|
|
00:03:55,800 --> 00:04:00,120
|
|
Out to the bottom here.
|
|
|
|
59
|
|
00:04:00,120 --> 00:04:04,080
|
|
In order to see it in the viewport here.
|
|
|
|
60
|
|
00:04:04,080 --> 00:04:11,400
|
|
And so let's just scale it down.
|
|
|
|
61
|
|
00:04:11,400 --> 00:04:14,000
|
|
And let's take note of these dimensions here.
|
|
|
|
62
|
|
00:04:14,000 --> 00:04:16,959
|
|
Let's actually just change it to 10.
|
|
|
|
63
|
|
00:04:16,959 --> 00:04:18,780
|
|
And 10.
|
|
|
|
64
|
|
00:04:18,780 --> 00:04:22,320
|
|
Scale it down to that to make it easy.
|
|
|
|
65
|
|
00:04:22,320 --> 00:04:29,880
|
|
Alright and after that change we want to drag it back then now into our patterns tag.
|
|
|
|
66
|
|
00:04:30,520 --> 00:04:41,360
|
|
And that 10 by 10 you want to reflect in the patterns tag here as well.
|
|
|
|
67
|
|
00:04:41,360 --> 00:04:46,400
|
|
So 10 and then 10.
|
|
|
|
68
|
|
00:04:46,400 --> 00:04:52,040
|
|
And then you want to save.
|
|
|
|
69
|
|
00:04:52,040 --> 00:04:55,700
|
|
Then go back to bones eye and then rerun the drawing.
|
|
|
|
70
|
|
00:04:55,700 --> 00:04:56,700
|
|
And see what happens.
|
|
|
|
71
|
|
00:04:57,700 --> 00:04:58,700
|
|
And there it is.
|
|
|
|
72
|
|
00:04:58,700 --> 00:04:59,420
|
|
A smaller scale.
|
|
|