Back |
![]() |
![]() |
For this, I wrote four shaders, *KTleafS.sl, KTleafD.sl, KTtreeS.sl, KTtreeD.sl*. Fig.1 is the first image (Shader Off). Fig.2 is the final image (Shader On). |
![]() |
![]() |
![]() |
The ringed Cylinder in Fig.3 changes its shape by KTleafD.sl in the directions of XYZ(Fig.4), KTleafS.sl gives it color in a shape of a leaf(Fig.5). The shape of the leaf relies on the size of Cylinder in RIB and the parameter of KTleafS.sl *leafW*. Therefor, by changing them, the leaves can be wide or narrow(Fig.6). | ||
![]() |
||
In Fig.2, about 300 Cylinders that have parameters of the two shaders to change its shape like a line of leaves and display about 20 leaves per cylinder are placed. That is to say, about 6000 leaves are expressed.
|
![]() |
![]() |
|
The Cone in Fig.7 changes its shape in the directions of XY by KTtreeD.sl which has 3 parameters of vector(Fig.8). In the shader there is a function *smoothstep()* to express the way the boughs and twigs curve. Also, KTtreeS.sl gives the Cone surface color like a tree-trunk. You can see this result in Fig.9. | ||
![]() |
||
In Fig.2, 9 Cones are placed. The volume of the RIB is approxinately 170KB. |