10
$\begingroup$

In order to make ivy created by IvyGen addon more attractive and convincing I'd like its leaves to have different colors, not repeating several times across a leaf (with that sharp and easy-to-see transition just in the leaf's center). The main problem here is that the leaves are all joined in one mesh, so the ColorRamp stops (used in material) assign to them as to one object.

enter image description here

How to make the leaves colored differently and not repeating ?

$\endgroup$

2 Answers 2

13
$\begingroup$

I will post several possible ways to achieve this kind of task.

First way

Basically, the most intuitive way is to use separating every single leaf into new object by using P > By Loose Parts and it's already described here (also some tutorials about modeling and rendering ivy use this technique as well).

The main downside for this is that it needs large amount of computations and may freeze PC for some time. More than that, after the procedure is finished, the 3D Viewport still will response much slower because there will be way more objects in the scene to take into account (in case of one not very large ivy ~5000 objects, i.e. leaves).

Second way

Some great solutions are provided in this thread. There are several of them (at least 3 different ones):

  • using Random group connected to Color Group;
  • using UV Align\Distribute addon (thus creating UV Map) and a script executing
  • and the third one already listed here above

The main reason why I decided to go further is that I wanted to get possibility to setup this color randomness really fast so to test some ivys while modeling environment scene (and also I didn't find that thread from the beginning).

Third way

This way assumes using 2 UV maps, one for different leaves' color, while another - for actually the texture (image based). Basically it is one of those listed in the BA thread (except for the script), only combined with another solutions.

After the ivy is created, it has UV map by default, and it's for actually image texture as is told above.
Therefore create one more UV map (I called it "Leaves-1"), it willl serve for different leaves' color task. With this map selected and set to active, enter Edit mode, U > Lightmap Pack (you may also use Smart UV Project option as well, it will fit ivy leaves' needs). After this is done, with leaves still selected, in Object Data tab, UV maps scroll hit that small camera button next to the default map so it to be one used for rendering.

Now, setting nodes part.
Basically, the nodes will be the same as they are in case of leaves / plants creating - with alpha mask using, along bump and normal maps etc. except for one thing. Instead of using Object Info node (with Random output used) what should be done if using first way, UV Map node will be used with newly created UV map name assigned:

ivy-gen_Diff-Leaf-Color_3

ColorRamp used here will determine difference between leaves' image texture color. The result on the left is with bottom ColorRamp used. The result on the right is an attempt to add several hues, so I added Mapping and Separate XYZ nodes and added one more color stop in the ColorRamp:

ivy-color-ramps

It is possible to change ColorRamp interpolation mode to Constant, the difference of the leaves' color will be somewhat sharper. Also some colors will become more visible (brownish in my case)


Advantages

  1. There shouldn't be done no additional computations
  2. Only one extra step required - this may be set up very fast
  3. The color manipulation is rather easy and comfortable (with ColorRamp)
  4. The result is looking somewhat convincing

Disadvantages

  1. Some sharp color transition within one leaf sometimes may happen, especially with Interpolation mode set to Constant in ColorRamp
  2. It's not the best solution if adding more colors to color stops is needed, it may not handle them all correctly
  3. Because of combining color and image texture is done with MixRGB node image texture may become less visible (if the color appearence is set to high)

Addition

And with mixing one of solutions from the Second way with this one the result may look like this:

color-ramp_With-Random-Group-Combine

This can be achieved by connecting Random group (instead of UV Map node) to the ColorRamp from the 3rd solution. Random Group is proposed in that BA thread:

ivy-gen_Diff-Leaf-Color_Random-Group

$\endgroup$
3
$\begingroup$

sv_node_tree_colorize_shell

Another way, maybe slightly more technical is to use Sverchok to procedurally colorize each polygon shells of Ivy object (single mesh leaves) and that will be the Color Vertex pass you can use in Cycles to quickly add some randomness to the color.

enter image description here

But however, if you randomize using procedural texture noise, you might get something that is more or less good enough.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .