Page 1 of 2
different materials on instanced objects
Posted: Wed Mar 27, 2013 4:32 pm
by kavorka
Does anyone know how to apply different materials to objects that are instance copies?
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 4:43 pm
by ROUBAL
If there are not many different materials, you can just make a copy (don't forget to rename each copy !) of the mesh object node for each material and give to each mesh node the desired materials. Then, create a scatter node for each mesh node.
I gave an example on the page linked below. The mesh node of the bus has been duplicated (doesn't require more memory), and material and textures have been modified :
http://render.otoy.com/forum/viewtopic. ... s&start=50
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 5:23 pm
by kavorka
does this mean I need to manually place the object in Octane, or can I copy it's placement from Blender?
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 5:32 pm
by ROUBAL
kavorka wrote:does this mean I need to manually place the object in Octane, or can I copy it's placement from Blender?
You place the mesh object node (the obj) in Octane as usually, and you create a scatter file in Blender as usually. The difference, is that you have to create several scatter files for each group of different material. This can mean different particle systems or different duplication groups using renamed copies of the original object that you have to duplicate.
For my own, I wouldn't rename the object in Blender, but just rename each csv file just after it is generated. I also add Scatter_ before the name. This precaution can avoid overwritting a scatter file when generating an other one with same duplicated object name.
I hope that it is clear enough, because I don't see how to explain better

Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 5:49 pm
by kavorka
will this work if i only have 1 obj per material change? ( remember trying to export an instance when I had only 1 object and it didn't work.
I have 6 watches with different colors to show in 1 image. Each watch is about .5 mil polys and I wanted to just use instances and then in Octane apply the different materials to each.
Could I use the instance csv file in conjunction with the placement node? If the csv file has the placement of each instance, maybe this will work (i mean to look in the file and find the coordinates of each instance and plugging that into each placement node). have to try tonight.
Never tried using the placement node, I always just use scatter.
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 6:01 pm
by smicha
I just wanted to make sure I can apply two different materials on two instances using material map and... I cannot. As I remember well it worked well in previous versions. Or my new TITAN is the reason ?
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 6:14 pm
by ROUBAL
@Kavorka :
If you need only one object with each set of materials and colors, don't bother yourself with scatter files. Just duplicate your object node in Octane to get as many objects node you need. Create a placement node for each and type by hand the coordinates.
You can also create in Blender a scatter file including the coordinates of the 6 watches. Add one scatter node per obj node, and apply the same scatter file (including the 6 watches) to all obj nodes. then, edit by hand the scatter file in Octane Nodes inspector by deleting all unwanted lines for each scatter node. You can save and rename each modified scatter list as a csv file to avoid the scene broken when relaoding the ocs later (it could call the original csv file with the 6 instances).
@Smicha :
I don't master material map nodes, and don't actually understand their use. This said, it seems that your setup uses only one obj, and I think that it is the reason why it doesn't work. I think that material map nodes are used to modify the materials without changing them in the original obj which remains unmodified for further use.
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 6:23 pm
by smicha
ROUBAL wrote:
@Smicha :
I don't master material map nodes, and don't actually understand their use. This said, it seems that your setup uses only one obj, and I think that it is the reason why it doesn't work. I think that material map nodes are used to modify the materials without changing them in the original obj which remains unmodified for further use.
I cannot agree. There two instances (one obj). Connecting a material map node to an obj an additional input for a material node occurs (at once). So in my example there are two different material maps, and there are two different materials and textures connected to them. What I should get as a final result are two boxes with two different materials. Should I?
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 6:52 pm
by kavorka
I saw in another post the the material map is broken in this version but will be fixed in the next release
Re: different materials on instanced objects
Posted: Wed Mar 27, 2013 9:29 pm
by smicha
kavorka wrote:I saw in another post the the material map is broken in this version but will be fixed in the next release
Thanks.