Material overrides?

lets say i have 100 objects that need exactly the same material except for the diffuse texture. whats the best way to handle this? do i really need 100 materials? cumbersome… :confused:

or what if i have to animate the opacity of 100 objects individually?

are those cases for the new override system? does this work already?

1 Like

Make a node group. They’re linked until you unlink them. So editing one edits all.

1 Like

i am not sure i understand? editing one edits all is not what i am after… i would like to reuse the same node setup on all objects but override single textures or alpha values for certain objects for example. is this possible?

Then use a node group with an alpha input or a color input (to be attached to the image texture node of your choice.)

Then what are you after?

1 Like

You can use the object info output random to apply a random color to the others but recurrence may occurs.
This is in input nodes

1 Like

To edit hundred materials you could do this:

As for the texture thingy… You could experiment with UDIM where you have a 100 times wide texture and use one material. Either way. You can’t escape that you need to do a hundred things if you have a hundred objects.

1 Like

thanks for all of your tips! i will experiment with it this week…

@bandages: i think i get what you mean now after reading the manual for node groups. thanks!

It would be so nice instead if we can use image sequence and can link data into the frame parameters.
image_seq

Sounds very complicated.

I find it not complicated, you have an directory with a bunch of textures, for example, textures that shows what is behind a window or textures with advertising for signs.
So we can just give object info random into offset and get different textures in that place.

While that might be nice, I can definitely see why devs didn’t do it that way. An uncompressed video (image sequence, avi, whatever) can easily be in the multiple tens of gigabytes, and if you want to access it per-sample, you need to load all of them, unciompressed. New users would be complaining that they were out of memory and not understanding why.

You can do something similar to this by using a sprite sheet technique instead-- loading all of the relevant frames onto a single image, and using your frame offset as a coordinate offset instead. You can also use Blender to create that sprite sheet from an existing movie…

Yes, an animated image interface might be a slightly nicer way to access this information, but it can still be accessed. (And actually, in terms of the original question, the animated image would be inferior to the sprite sheet: you’d need to be using something like UV to specify offset without new materials anyways. Still, what’s the difference between editing 100 materials and editing 100 UV maps? Same amount of work.)

Wouldn’t it just build the image when you hit render and only require the memory to hold one frame per node? I don’t see how noding the i.e. offset parameter would be any different than manually setting multiple nodes differently and using object id to select between them.

Each material is evaluated per-bounce, per-sample. It’s a compiled program running on the GPU. It can’t check every single time it runs for if the texture is loaded-- it has to know where that texture is.

Imagine if you plugged something like floor(ray length * constant) into offset on an image sequence. How do you know which frames from an image sequence you need? You need to render to get that ray depth, and it’s a per-sample, per-bounce value.

It wouldn’t quite be impossible to load only the images from a sequence that you needed. But it would require a lengthy set of interim calculations to even figure out which frames you needed. (If you did that, you could use the exact same technique to only load the parts of 2D textures that you needed as well.)

Yes, i guessed so that movie formats are not good for it,
so i mean “image sequences”, that are still images with a sequence number in the filename.
There should be no big difference if i define 100 single images or one image sequence of 100 images.

But i dont know how blender handle it intern, so it could be totaly wrong.

i had some time to try it now… so i still need 100 materials but node groups make it much nicer to work with. i didn’t know that they can be instances. :slight_smile: i can put everything that should be the same for every material into a group and the texture or value that should be individual for each object stays outside.

thanks @bandages!