



> ###
Warning, Potential AI generated content⚠️
This post is suspected to have been generated with the help of an artificial intelligence, chat bot, or other language model tools without proper attribution.
There is reason to believe this post was not written by a human due to its structure, and grammatical construction, and has been marked by our community.
Current AI chat bots are a language models, that means they are like a parrot, they can mimic human language well, but they are built to write seemingly logical, seemingly factual grammatically valid text, rather than actually be correct, like a human would.
The veracity of the following content cannot be ascertained. See the Concerns regarding AI generated content.
Ive been trying to learn Blender for a few weeks and Ive put lots of late nights and early starts in. The more I learn about Blender the more I realise how little know!
I am trying to create a scene that I can use as input to a batch render process. I am trying to get the batch process to work before I refine the scene to a finished look. When I start rendering I want the colour of the fire surround to cycle through say 10 different colours/textures.
For each colour fire surround, I want to render with a different set of three flame jpgs, its important to know that the flames change/animate as the camera pans around the fireplace. Potentially I might have 12 sets of three jpg flames. Therefore I would produce 120 mpeg files of around 10 seconds long each.
I also have a small problem in that shadows from the fire surround are not cast on the images of flames which I will need for when there is no fire or small flames. From reading, I think this may be because the picture is "emissive"? How can I fix this, please?
The Scene is attached ( I think with all supported files embedded)
- How can I make a batch script? (I have attached a ChatGPT attempt below )
- How can shadows be cast inside the fire surround?
I am happy to share the scene.
# Define your colors (RGB tuples from 0 to 1)
colors = [
(1, 0, 0), # Red
(0, 1, 0), # Green
(0, 0, 1), # Blue
# Add more colors as needed
]
Path to the JPEG files, assuming they're named sequentially
jpeg_paths = [f"\flames{i}.jpg" for i in range(1, 3)]
print (jpeg_paths)
Reference to the object you want to color
color_object = bpy.data.objects['Cube.001']
Reference to the plane object to which you want to apply JPEG textures
texture_object = bpy.data.objects['Picture']
for color in colors:
# Apply color to the color_object
if color_object.data.materials:
material = color_object.data.materials[0]
else:
material = bpy.data.materials.new(name="ObjectMaterial")
color_object.data.materials.append(material)
material.diffuse_color = color + (1,) # RGB + Alpha
for jpeg_path in jpeg_paths:
# Load the JPEG as a texture
bpy.ops.image.open(filepath=jpeg_path, directory="/", files=[{"name":jpeg_path}], relative_path=True, show_multiview=False)
# Assuming the plane uses a material that has an Image Texture node
# Set the image of the texture node to the loaded image
texture_material = texture_object.data.materials[0] # Assuming it has a material
for node in texture_material.node_tree.nodes:
if node.type == 'TEX_IMAGE':
node.image = bpy.data.images[jpeg_path.split('/')[-1]]
break
# Render settings
bpy.context.scene.render.filepath = f'/path/to/output/{color}_{jpeg_path.split("/")[-1].split(".")[0]}'
bpy.ops.render.render(write_still=True) # Render the scene
,








