Reynante Martinez
  • CG Art
  • Tutorials
  • Freebies
  • Products
  • Competititions
  • Music

Picture


Picture
When dealing with foliage and trees, we usually tend to apply a single texture on the leaves, regardless of which side the leaves have.

In this brief tutorial/article, I'll introduce you to a basic concept in Cycles that enables you to utilize multiple textures so your planes will have a front texture and a back texture, perfect for use on leaves.

By the end of this tutorial, you should have a basic understanding on how to manipulate image textures using a variety of node techniques and hopefully to clear some confusion that you might have had.


Optional downloads​
  • leaf texture
    (external link)
Software used
  • Blender 2.78c
  • Cycles

Ready? Let's go!


1 Enable Helper Addon
To start off, enable the Import Images as Planes addon. This will make our lives a lot easier. However, you can skip this step if you want to manually apply your textures instead.
Step 1


2 Import the Texture as Plane
In the 3D Viewport, press SHIFT-A and select Mesh > Images as Planes.
Step 2


3 Browse Texture
A dialog window will appear asking you for the location of your texture. When you have it, make sure that Use Alpha option is enabled in the addon settings.
Step 3


4 Adjusting the Image Ratio
Now, when you render your scene, it doesn't look like what we actually wanted. But it's a start.
Step 4
Proceed to the Object Data tab and under UV Maps, create a front UV map and a back UV map.
Step 4-1
Split your screen and make the other half a UV/Image Editor. Then browse for the texture you've downloaded.
Step 4-1
Adjust your UV map (make sure that you have the front UV map selected) such that the it covers only the front portion of the texture, setting aside the back texture.
Step 4-1
Select the back UV map and repeat the procedure above. By this time, it will be a matter of approximating the size and matching the front and back UVs accordingly. Do the necessary adjustment later as needed.
Step 4-1
In the 3D Viewport, select the Plane object and adjust its scale so it matches the size ratio of the leaf.
Step 4-1


5 Setting Up the Node Group
Now the fun part! Proceed to the Node Editor and you should see something like this for the material node:
Step 5
Add a UV Map input and attach it to the Vector input of the Image Texture.
Step 5-1
Duplicate the previous node configuration but this time change the UV map to back.
Step 5-1


6 Combining the Front and Back Textures
This step is the most-crucial of all, don't skip this one.

Now that we have the front and back node layout in place, it's time to combine them. To do this, simply add another Mix Shader and connect the Shader output sockets into the input socket, as seen below:
Step 6
To tell Cycles which side is which texture, we need to add some geometry information, and there's a handy node for that.

Go to Add > Input > Geometry, then connect the Backfacing node output to the Mix Shader's Fac input.
Step 6
Now, when you rotate the plane, the back texture will show. No need for duplicate meshes. :)

Picture
I hope you learned a thing or two. If you like this article, spread the word, leave me a comment, and share it with your friends (if I deserve it).

And if you fancy, you can visit me on the following links:


  • Artstation
  • FB page
  • Twitter

Have fun and happy Blending! :)

- Reyn


P.S. CMV's Lite Version is landing soon. Stay tuned! :)
VISIT CMV



Reynante M. Martinez © 2017-2018. ​All Rights Reserved

SIGN UP FOR MY NEWSLETTER

Join my mailing list to get the latest news,
freebies, ​and inspiration.
SIGN UP NOW
FOLLOW ME
CONTACT
reyn@reynantemartinez.com
(63)916-237-0143
ABOUT
TERMS & CONDITIONS
​PRIVACY POLICY