5
$\begingroup$

I have very large number of planes in my scene and each needs to be assigned a color, and to do that, I am assigning a material to each plane. Blender is allowing 2^15, i.e. 32768 materials. But the number of planes in the scene are on the order of millions.

How can I make blender handle more materials so that I can color all the planes?

$\endgroup$
1
  • $\begingroup$ Are you using BI or Cycles? $\endgroup$
    – gandalf3
    Commented Apr 4, 2014 at 20:18

2 Answers 2

2
$\begingroup$

Blender Internal

In Blender Internal you can set object colors independent of the material.

  1. Set the object color in Properties > Object > Display (or with object.color)

    enter image description here

  2. Enable Object color for the material in Properties > Material settings > Options:

    enter image description here

All these cubes have the same material, but are colored individually via object color:

enter image description here

Cycles

For Cycles, see this post.

$\endgroup$
0
5
$\begingroup$

Use the same material for every object but have different colors for it.

I assume you will generate this dynamically. Some methods I can think of:

  • Generate a 4096x4096 texture and assign that. Use nearest interpolation (like in minecraft). Have each planes UV-coordinates point out what pixel to use.
  • Use vertex colors for each plane. Have the material use the the vertex colors. Use the attribute node: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Attribute
  • If you don't need exact colors, if you are content with a random color, use the object info node to get a random value for each node, insert it into a color ramp node.
$\endgroup$

You must log in to answer this question.

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