Instance color
The Instance Color texture is used to hold an image and prepares each pixel of the image to be mapped to geometric instance IDs.
Octane Plugin is able to generate instances of an object and can also assign an ID to each of the instances generated such that number of instances results in a grid instance IDs. Colors can then be assigned via texture to each instance ID, in this case with an image in the Instance Color texture, matching the IDs with pixels of the image starting at the bottom left in row major order up to the top right.
实例颜色
实例颜色纹理用于保存图像,并准备要映射到几何实例ID的图像的每个像素。
Octane插件能够生成对象的实例,并且还可以将ID分配给所生成的每个实例,以使实例数量产生网格实例ID。 然后可以通过纹理将颜色分配给每个实例ID,在这种情况下,实例颜色纹理中的图像将ID与行主要顺序的左下角开始到右上角的图像像素匹配。
how to use
Instance Color has many uses, and these uses are described in the following mini tutorials. As you follow the tutorials, you can examine them on the scene. You can download all the scenes described in the tutorial from the link below.
Download the all scenes from this link
如何使用
实例颜色有许多用途,下面的微型教程中介绍了这些用途。 当您按照教程进行操作时,可以在现场检查它们。 您可以从下面的链接下载教程中描述的所有场景。
从此链接下载所有场景
INSTANCE COLOR FROM FILE
1- First create a cylinder object and change its properties as shown in the picture.
文件中的实例颜色
1-首先创建一个圆柱对象,然后更改其属性,如图所示。
2- Then create a Cloner object and assign the cylinder object to the Cloner. Change the cloner settings as shown in the image below.
2-然后创建一个Cloner对象,并将圆柱对象分配给Cloner。 如下图所示,更改克隆器设置。
3- Next is the Material and Instance Color Setup. First create the Diffuse Material. Then open the Node Editor and drag and drop the material you created into the Node editor window. Drag the Instance Color directly to the node editor from the menu on the left. Now, when Instance Color Node is selected, connect the tiny yellow spot on the upper right to the Diffuse channel of Material. Now select any image file with 10x10 pixel size from the menu on the right and load it. After the Material Setup, Assign it to Cloner Object. In the picture below you can see the material and Instance Color setup.
3-接下来是“材质和实例颜色设置”。 首先创建漫反射材质。 然后打开“节点编辑器”,并将创建的材质拖放到“节点编辑器”窗口中。 从左侧菜单将“实例颜色”直接拖到节点编辑器。 现在,当选择“实例颜色节点”时,将右上方的小黄点连接到“材质”的“漫反射”通道。 现在,从右侧菜单中选择任何10x10像素大小的图像文件并加载。 材质设置后,将其分配给“克隆对象”。 在下面的图片中,您可以看到材质和“实例颜色”设置。
4- If you have done everything properly, you will get a result similar to the following picture. As you can see, each pixel value of our 10x10 pixel sized image created Instance Color for our 10x10 grid cylinders in Cloner. The Instance IDs of 100 cylinders in Cloner were automatically generated. It’s just like the Shader Effector. However, this feature works effectively in smaller image files. For example, if your image size is 500x500 pixels, the 2500 Instance ID object to be created for this will most likely crash Cinema 4D. So, use it wisely.
4-如果您已正确完成所有操作,则将得到与下图相似的结果。 如您所见,我们的10x10像素大小的图像的每个像素值都为Cloner中的10x10网格圆柱创建了实例颜色。 “克隆器”中100个气缸的实例ID是自动生成的。 就像着色器效应器一样。 但是,此功能在较小的图像文件中有效。 例如,如果您的图像大小为500x500像素,则为此创建的2500实例ID对象很可能会使Cinema 4D崩溃。 因此,请明智地使用它。
INSTANCE COLOR from vertex color
In this example we will describe how Instance Color is made from a Vertex Color.
1- First create a cylinder object and change its properties as shown in the picture.
顶点颜色的实例颜色
在此示例中,我们将描述如何从“顶点颜色”制作“实例颜色”。
1-首先创建一个圆柱对象,然后更改其属性,如图所示。
2- Then create a “Plane” object and change its settings shown in the image below. After entering the settings, make it editable (Press C).
2-然后创建一个“平面”对象并更改其设置,如下图所示。 输入设置后,使其可编辑(按C)。
3- Now we will paint the vertices of the Plane object. Select Plane Object and then select the Point Mode.
Press Shift + C and select Paint Tool from the command menu.
3-现在,我们将绘制平面对象的顶点。 选择“平面对象”,然后选择“点模式”。
按Shift + C,然后从命令菜单中选择“绘制工具”。
4- Paint the vertex in any color and shape using the Paint menu. Do not forget to select "Vertex Color (RGB)" from the paint menu. Once the painting is finished, the "Vertex Color Tag" will be automatically created in the Object Manager, next to the plane object. You will then use this Tag as Instance Color.
4-使用“绘制”菜单以任何颜色和形状绘制顶点。 不要忘记从绘画菜单中选择“顶点颜色(RGB)”。 绘制完成后,将在对象管理器中平面对象旁边自动创建“顶点颜色标记”。 然后,您将使用此标签作为实例颜色。
5- Create a Cloner object and assign the cylinder object to the Cloner. We also need to define Plane, which we just created, as the object to which the cylinder clones will distribute. See the picture below for settings.
5-创建一个Cloner对象,并将圆柱对象分配给Cloner。 我们还需要将刚刚创建的Plane定义为圆柱体克隆将分发到的对象。 请参见下图进行设置。
6- Next is the Material and Instance Color Setup. First create the Diffuse Material. Then open the Node Editor and drag and drop the material you created into the Node editor window. Drag the Instance Color directly to the node editor from the menu on the left. Now, when Instance Color Node is selected, connect the tiny yellow spot on the upper right to the Diffuse channel of Material. Now it's time to set the Vertex TAG. When Instance Color Node is selected, select Particle as Source from the menu on the right. In the Color Source section, drag and drop the Vertex Color TAG of the Plane objet. After the Material Setup, Assign it to Cloner Object. In the picture below you can see the material and Instance Color setup.
6-接下来是“材质和实例颜色设置”。 首先创建漫反射材质。 然后打开“节点编辑器”,并将创建的材质拖放到“节点编辑器”窗口中。 从左侧菜单将“实例颜色”直接拖到节点编辑器。 现在,当选择“实例颜色节点”时,将右上方的小黄点连接到“材质”的“漫反射”通道。 现在是时候设置“顶点标记”了。 选择“实例颜色节点”后,从右侧菜单中选择“粒子”作为“源”。 在“颜色源”部分中,拖放“平面”对象的“顶点颜色”标记。 材质设置后,将其分配给“克隆对象”。 在下面的图片中,您可以看到材质和“实例颜色”设置。
7- If you have done everything properly, you will get a result similar to the following picture. As you can see, the cylindrical objects were colored by the vertex color Tag of the plane. Although it is not a very practical method, at least it gives you more control and flexibility. You can also work with more vertex counts. Remember that too much vertex will increase your cloner objects count and the system will slow down as usual.
7-如果您正确完成了所有操作,将得到与下图类似的结果。 如您所见,圆柱对象由平面的顶点颜色Tag着色。 尽管这不是一种非常实用的方法,但至少它为您提供了更多的控制和灵活性。 您也可以使用更多的顶点数。 请记住,过多的顶点会增加克隆对象的数量,并且系统将照常减速。
INSTANCE COLOR FROM PARTICLE EMITTER
In this example we will describe how Instance Color is made from a Particle Emitter.
1- First create a Platonic object and change its properties as shown in the picture.
粒子发射器的实例颜色
在此示例中,我们将描述如何从粒子发射器生成“实例颜色”。
1-首先创建一个柏拉图对象并更改其属性,如图所示。
2- Now create a standard Cinema 4D particle emitter object and change its properties as shown in the picture. After you finish the setup, press the play button in the Viewport and allow the particles to flow at least 35-40 frames.
2-现在创建一个标准的Cinema 4D粒子发射器对象,并更改其属性,如图所示。 完成设置后,请在视口中按播放按钮,并使粒子至少流动35-40帧。
3- Now we need to identify the emitter object as a particle to Octane. We will use the “Octane Object Tag” for this. Right-click on the Emitter object and select "Octane Object Tag" from the pop-up menu. Then select the Object Tag and drag & drop the "Platonic" object to Particle Rendering Tab. Complete the setup as shown in the following image.
3-现在我们需要将发射器对象标识为Octane的粒子。 为此,我们将使用“Octane标签”。 右键单击Emitter对象,然后从弹出菜单中选择“ Octane Object Tag”。 然后选择“对象标签”,然后将“ Plateonic”对象拖放到“粒子渲染”选项卡上。 完成安装,如下图所示。
4- Next is the Material and Instance Color Setup. Create materials and Instance Colors as you did in previous tutorials. This time, Drag and drop the "Emitter" object in the "Color Source" section of the Instance Color settings. Enter the settings you see in the picture and complete the setup. After complete the setup assign the material to the “Platonic” object.
4-接下来是“材质和实例颜色设置”。 像以前的教程一样创建材质和实例颜色。 这次,将“发射器”对象拖放到“实例颜色”设置的“颜色源”部分中。 输入您在图片中看到的设置,然后完成设置。 完成设置后,将材质分配给“ Plateonic”对象。
5- If you have done everything properly, you will get a result similar to the following picture. As you can see in the picture, Platonic objects that we have defined as Particle, created Instance Color according to the gradient values. You can also create Instance Color from the particles' age, speed, etc.
5-如果您正确完成了所有操作,则将得到与下图相似的结果。 从图片中可以看到,我们定义为“粒子”的柏拉图对象根据渐变值创建了“实例颜色”。 您还可以根据粒子的年龄,速度等来创建“实例颜色”。
INSTANCE COLOR ON OCTANE SCATTER OBJECT
In this example we will apply the Instance Color to Octane Scatter Object.
1- First create a sphere object and change its properties as shown in the picture.
Octane散射物体的实例颜色
在此示例中,我们将“实例颜色”应用于“Octane散布对象”。
1-首先创建一个球体对象并更改其属性,如图所示。
2- Then create a “Plane” object and change its settings shown in the image below. After entering the settings, make it editable (Press C).
2-然后创建一个“平面”对象并更改其设置,如下图所示。 输入设置后,使其可编辑(按C)。
3- Now we will paint the vertices of the Plane object. Select Plane Object and then select the Point Mode.
Press Shift + C and select Paint Tool from the command menu.
3-现在,我们将绘制平面对象的顶点。 选择“平面对象”,然后选择“点模式”。
按Shift + C,然后从命令菜单中选择“绘制工具”。
4- Paint the vertex in any color and shape using the Paint menu. Do not forget to select "Vertex Color (RGB)" from the paint menu. Once the painting is finished, the "Vertex Color Tag" will be automatically created in the Object Manager, next to the plane object. You will use this Tag as Instance Color later.
4-使用“绘制”菜单以任何颜色和形状绘制顶点。 不要忘记从绘画菜单中选择“顶点颜色(RGB)”。 绘制完成后,将在对象管理器中平面对象旁边自动创建“顶点颜色标记”。 稍后,您将使用此标签作为实例颜色。
5- Create a Scatter object and assign the sphere object to the Scatter. We also need to define Plane, which we just created, as the object to which the sphere clones will distribute. See the picture below for settings.
5-创建一个散点图对象,并将球体对象分配给该散点图。 我们还需要将刚刚创建的Plane定义为球形克隆将分发到的对象。 请参见下图进行设置。
6- Next is the Material and Instance Color Setup. First create the Diffuse Material. Then open the Node Editor and drag and drop the material you created into the Node editor window. Drag the Instance Color directly to the node editor from the menu on the left. Now, when Instance Color Node is selected, connect the tiny yellow spot on the upper right to the Diffuse channel of Material. Now it's time to set the Vertex TAG. When Instance Color Node is selected, select Particle as Source from the menu on the right. In the Color Source section, drag and drop the Vertex Color TAG of the Plane objet. After the Material Setup, Assign it to Scatter Object. In the picture below you can see the material and Instance Color setup.
6-接下来是“材质和实例颜色设置”。 首先创建漫反射材质。 然后打开“节点编辑器”,并将创建的材质拖放到“节点编辑器”窗口中。 从左侧菜单将“实例颜色”直接拖到节点编辑器。 现在,当选择“实例颜色节点”时,将右上方的小黄点连接到“材质”的“漫反射”通道。 现在是时候设置“顶点标记”了。 选择“实例颜色节点”后,从右侧菜单中选择“粒子”作为“源”。 在“颜色源”部分中,拖放“平面”对象的“顶点颜色”标记。 设置材质后,将其分配给散布对象。 在下面的图片中,您可以看到材质和“实例颜色”设置。
7- If you have done everything properly, you will get a result similar to the following picture. As you can see, the sphere objects were colored by the vertex color Tag of the plane. By using Octane Scatter Object you can get rid of the limit of Cloner and generate a large number of instances. Since Scatter Object is Octane's native tool, it works quite fast and efficiently. In this way, you can produce millions of instances and color them as you wish.
7-如果您正确完成了所有操作,将得到与下图类似的结果。 如您所见,球体对象由平面的顶点颜色Tag着色。 通过使用Octane Scatter Object,您可以摆脱Cloner的限制,并生成大量实例。 由于Scatter Object是Octane的本机工具,因此可以快速高效地工作。 这样,您可以产生数百万个实例,并根据需要为其着色。
INSTANCE COLOR ON SCATTER OBJECT + MOGRAPH
In this example we will create an Instance color using Octane Scatter Object and Mograph.
1- First create a disc object and change its properties as shown in the picture.
散射对象+图形上的实例颜色
在此示例中,我们将使用Octane Scatter Object和Mograph创建实例颜色。
1-首先创建一个光盘对象并更改其属性,如图所示。
2- Now create a Cube object and change its properties as shown in the picture below.
2-现在创建一个多维数据集对象并更改其属性,如下图所示。
3- Create an Octane Scatter Object and make the Cube object child. Then drag and drop the Disc object to the surface section of the Scatter. The following picture shows the setup.
3-创建一个Octane散布对象,并使多维数据集对象成为子对象。 然后将Disc对象拖放到Scatter的表面部分。 下图显示了设置。
4- Now we will use Mograph in Scatter Object. To do this, first create a Random Effector from the Mograph menu and drag it to the Effector section of the Octane Scatter Object. Change the “Random Effector” properties as you see in the picture below. You don’t have to enter these properties exactly. You can change as you like the settings in the Transform and Falloff sections. For example, you can select "On" instead of “user defined” in the Color section, and you can create more colorful cubes. Or you can change the shape of the Falloff. It’s up to you.
4-现在我们将在分散对象中使用Mograph。 为此,首先从Mograph菜单中创建一个随机效应器,然后将其拖动到Octane Scatter Object的效应器部分。 如下图所示,更改“ Random Effector”属性。 您不必完全输入这些属性。 您可以根据需要更改“变换”和“衰减”部分中的设置。 例如,您可以在“颜色”部分中选择“开”而不是“用户定义”,并且可以创建更多彩色的多维数据集。 或者,您可以更改衰减的形状。 由你决定。
5- Next is the Material and Instance Color Setup. First create a Glossy Material. Then open the Node Editor and drag and drop the material you created into the Node editor window. Drag the Instance Color directly to the node editor from the menu on the left. Now, when Instance Color Node is selected, connect the tiny yellow spot on the upper right to the Diffuse channel of Material. Now it's time to set the Scatter Object as a Instance Source. When Instance Color Node is selected, select Particle as Source from the menu on the right. In the Color Source section, drag and drop the Octane Scatter Object. After the Material Setup, Assign it to Scatter Object. In the picture below you can see the material and Instance Color setup.
5-接下来是“材质和实例颜色设置”。 首先创建光泽材质。 然后打开“节点编辑器”,并将创建的材质拖放到“节点编辑器”窗口中。 从左侧菜单将“实例颜色”直接拖到节点编辑器。 现在,当选择“实例颜色节点”时,将右上方的小黄点连接到“材质”的“漫反射”通道。 现在是时候将Scatter对象设置为实例源了。 选择“实例颜色节点”后,从右侧菜单中选择“粒子”作为“源”。 在“颜色源”部分中,拖放“Octane散布对象”。 设置材质后,将其分配给散布对象。 在下面的图片中,您可以看到材质和“实例颜色”设置。
6- If you have done everything properly, you will get a result similar to the following picture (apart from the other cosmetic elements. You can also create HDRI environment, another light sources or secondary geometry etc.). As you can see, the cube objects were colored by the Random effector using “Instance Color”. By using Octane Scatter Object you can get rid of the limit of Cloner and generate a large number of instances. You can also use all the mograph tools.
6-如果您正确地完成了所有操作,则将获得与下图类似的结果(除了其他装饰元素。您还可以创建HDRI环境,其他光源或辅助几何体等)。 如您所见,多维数据集对象由随机效应器使用“实例颜色”着色。 通过使用Octane Scatter Object,您可以摆脱Cloner的限制,并生成大量实例。 您也可以使用所有测绘仪工具。
INSTANCE COLOR from x-partIcles emItter
In this example we will describe how Instance Color is made from a X-Particles Emitter.
1- First create a Platonic object and change its properties as shown in the picture.
x粒子发射器的实例颜色
在此示例中,我们将描述如何从X-Particles发射器生成“实例颜色”。
1-首先创建一个柏拉图对象并更改其属性,如图所示。
2- Now create a “xpEmitter” from the X-Particles menu and also create a “xpTurbulence” from the Xparticles/Modifiers/Motion Menu. Make the “xpEmitter” child to “xpTurbulence”. Change their properties as shown in the picture. After you finish the setup, set your animation timeline to 500 and press the play button in the Viewport. Allow the particles to flow up to the 430-450 frames.
2-现在从X-Particles菜单创建一个“ xpEmitter”,并从Xparticles / Modifiers / Motion菜单创建一个“ xpTurbulence”。 使“ xpEmitter”子级变为“ xpTurbulence”。 如图所示,更改其属性。 完成设置后,将动画时间轴设置为500,然后在视口中按“播放”按钮。 让颗粒流到430-450帧。
3- Now we need to identify the xpEmitter object as a particle to Octane. We will use the “Octane Object Tag” for this. Right-click on the xpEmitter object and select "Octane Object Tag" from the pop-up menu. Then select the Object Tag and drag & drop the "Platonic" object to Particle Rendering Tab. Complete the setup as shown in the following image.
3-现在,我们需要将xpEmitter对象标识为Octane的粒子。 为此,我们将使用“Octane标签”。 右键单击xpEmitter对象,然后从弹出菜单中选择“Octane对象标签”。 然后选择“对象标签”,然后将“ Plateonic”对象拖放到“粒子渲染”选项卡上。 完成安装,如下图所示。
4- Next is the Material and Instance Color Setup. Create materials and Instance Colors as you did in previous tutorials. This time, Drag and drop the "xpEmitter" object in the "Color Source" section of the Instance Color settings. Enter the settings you see in the picture and complete the setup. After complete the setup assign the material to the “Platonic” object.
4-接下来是“材质和实例颜色设置”。 像以前的教程一样创建材质和实例颜色。 这次,将“ xpEmitter”对象拖放到“实例颜色”设置的“颜色源”部分中。 输入您在图片中看到的设置,然后完成设置。 完成设置后,将材质分配给“ Plateonic”对象。
5- If you have done everything properly, you will get a result similar to the following picture. As you can see in the picture, Platonic objects that we have defined as xpParticles, created Instance Color according to the gradient values. This time we used the Age parameter to adjust the appearance of the Instance Colors. Also we set the Age attribute in the Emission Parameters section of the xpEmitter object. Here we have identified Instance Colors with these values.
5-如果您正确完成了所有操作,则将得到与下图相似的结果。 如您在图片中看到的,我们定义为xpParticles的柏拉图对象根据渐变值创建了“实例颜色”。 这次,我们使用Age参数调整了实例颜色的外观。 同样,我们在xpEmitter对象的“发射参数”部分中设置了Age属性。 在这里,我们用这些值标识了“实例颜色”。
赶快留个言打破零评论!~