Unique Texture to every face

Hi, I am using D5 to render my building made in Sketchup. I apply the textures in D5, so I need every face to have a different color or name for D5 to understand that they are different textures. Is there a way that I can apply a unique color to every face of the model instead of clicking every single face?

Be careful what you wish. Do you know how many faces your model has? My models are small, but they still generally have thousands of faces.

I can imagine it will become laggy but I haven’t found any other solution for using D5 without applying all of this textures. Right now I’m applying them manually and every time I export to D5 I find out that I’ve missed one somewhere and I need to restart the process in D5 after changing the texture in Sketchup. That’s why I want to apply textures to all the faces. My models don’t have a lot of detail as I import most of the objects after in D5.

It seems to me that a reasonably simple Ruby snippet could do what you ask, but…

I know nothing about D5 Render. Why does it require every face in the SketchUp model to have a distinct texture (or is that perhaps an aspect of your workflow that isn’t really required by D5)? Will the rendering cause every face to look different? That seems strange to me and unreasonable, especially if in D5 you will apply the same texture to different faces, e.g. all the walls of a room get the same paint or several different rooms have their walls painted the same. It would be inefficient and just as painful to manually apply distinct yet identical textures to all those faces in D5 as to do so in SketchUp! It feels like I am missing some aspect of working with D5.

I hope you use groups and components effectively in your models, since otherwise they will be a terrible mess to work with! But if you do use components, things get complicated fast. For example, there are two ways to color the faces of a component instance in the SketchUp model: you can open it and apply the texture to each face, or you can leave the faces uncolored (“default” material) and texture the instance as a single object. But to do the former, you must make every instance of every component unique because otherwise instances share the internals of the component across all of them, including the textures of faces. Making them all unique will bloat your model greatly. And if you do the latter, it is the instance that has the texture, not the faces. SketchUp’s renderer understands this and applies the texture to each face that does not have its own texture, but there is no texture on the face itself. Does D5 understand this? Most renderers do…

If you use groups, the bloating from make unique has already happened. But as @Anssi pointed out, you will need a gigantic number of textures and will run a potential risk of exceeding the number of textures that SketchUp can support. Certainly you will get a huge file size and performance problems.

Maybe with this link its easier to understand. From here, I started assigning a new color to each face.