2
$\begingroup$

I was trying to figure out how to batch process out a bunch of different materials on an object.

I have multiple works that are the same size and I am trying to figure out how to quickly render them all out without having to change materials (art works) for each render.

I thought that I could set up an animation, with MixRBG nodes animated to change on each frame.

I can get 8 mix nodes and they seem to be working. On the 9th node, I get the pinkie of doom! It doesn't matter if it is a repeated image or new image. It still shows pink.

I did test to make sure that the last image was valid and accurate. I even switched to a different image/folder. Same issue.

Which suggests to me that I over stocked the memory, as @DuarteFarrajotaRamos suggested.

So I can do 8 frames and then rebuild the material. Or I can try doing 33 different planes and animating their visibility.Seems a bit excessive.

At 8 nodes it works:

Now it works (only 8 mix rgb nodes

At 9 it fails: 9 nodes no go

I tried running a test on No-Can-Do's concept. It really seems like it should work: In materials preview, I can see each image change as I scroll forward.

It works in the cycles preview as well.

But, Render Animation (and render frame too) disregards the image sequence completely. Immediately after attempting a render and getting just the metal surface, Blender seems to forget the image sequence all together and both the Material Preview and Cycles Preview no longer have the image sequence. It is still in the nodes, but not showing up.

I think I am missing a simple step somewhere but I am not sure what it is!

Image sequence in the material Image Sequence set up

Rendering doesn't include the image sequence. No image showing in render

The image is gone in the preview as well. Blender lost the path?

$\endgroup$
  • 1
    $\begingroup$ Are you sure, that last image is exists, and path is correct? $\endgroup$ – Crantisz Jun 10 at 22:26
  • 2
    $\begingroup$ There are known limits on the number of textures that can be loaded into GPU memory at a time. These limits are shared among other internal uses for buffers and features. There are probably also limits on the number of textures a single material can use (though 8 sounds low). This looks a lot easier to solve with a bunch of different animated planes rather than trying to animating a single material $\endgroup$ – Duarte Farrajota Ramos Jun 10 at 22:42
  • 3
    $\begingroup$ As a workaround,, rename the images so that they have a common name and a number extension at the end, like if they were an image sequence. Then create a material that uses the image sequence to automate the change in texture. $\endgroup$ – no-can-do Jun 11 at 9:03
  • $\begingroup$ Yes, I did test to make sure that the last image was valid and accurate. I even switched to a different image/folder. Same issue. Which suggests to me that I over stocked the memory, as @DuarteFarrajotaRamos suggested. Doing 33 different planes seems a bit excessive. I am running a test on No-Can-Do's concept. $\endgroup$ – Matt McKee Jun 11 at 14:56
  • $\begingroup$ Image sequence should work. Make sure that the settings for frame, Start frame and Offset are valid. In the image editor load the sequence and see if it is loading correctly, press the right arrow key to move to the next frame. Pink means that the image is not found on the disk or folder, or that cannot be mapped correctly. $\endgroup$ – susu Jun 11 at 20:05
1
$\begingroup$

Okay, so the original challenge was to create a material that would change every frame, so that I would end up with 33 images that would have a different art piece on the wall.

First, I tried using a mixRGB shader animated to switch between images. But, I got stymied by a memory problem. Blender would only see the first 8 images before it seemed to lose its mind.

Then, on a recommendation from @no-can-do , I switched the image texture node from single to image sequence.

This seemed to work until I rendered, then it would lose the images again.

I upgraded from 2.82a to 2.83, and rendered again. And, it worked!

Image sequence is set up with the number of frames (number of images in the directory I was linking to), start frame of 1 with 0 offset. I also clicked the Auto Refresh on.

Here's my set up:

material set up for image sequence

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.