Cycles rendering using python script does not render correctly #42938

Closed
opened 2014-12-17 18:08:56 +01:00 by Arnout Boelens · 12 comments

System Information
Debian Linux (unstable)
VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller

Blender Version
Broken: 2.71 2.72b
Worked: 2.70

Short description of error
Making a scene, rendering it, and saving it as an image using a python script gives all my objects a gray/white checkered surface. Using the script to create a scene and then render it in the GUI works fine.

Exact steps for others to reproduce the error
Run attached python script. blender version 2.70 works, 2.71 and up does not

**System Information** Debian Linux (unstable) VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller **Blender Version** Broken: 2.71 2.72b Worked: 2.70 **Short description of error** Making a scene, rendering it, and saving it as an image using a python script gives all my objects a gray/white checkered surface. Using the script to create a scene and then render it in the GUI works fine. **Exact steps for others to reproduce the error** Run attached python script. blender version 2.70 works, 2.71 and up does not
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @boeleman

Added subscriber: @boeleman
Author

Python script 3DblenderV.py
Result Blender 2.70 3DrenderV270.png
Result Blender 2.72 3DrenderV272.png
Background image read by script background.jpg
x3d file loaded by script gave an upload failure because it is too large

Python script [3DblenderV.py](https://archive.blender.org/developer/F132645/3DblenderV.py) Result Blender 2.70 ![3DrenderV270.png](https://archive.blender.org/developer/F132646/3DrenderV270.png) Result Blender 2.72 ![3DrenderV272.png](https://archive.blender.org/developer/F132648/3DrenderV272.png) Background image read by script ![background.jpg](https://archive.blender.org/developer/F132651/background.jpg) x3d file loaded by script gave an upload failure because it is too large

Added subscriber: @Sergey

Added subscriber: @Sergey

Debugging what might be wrong in such a long script is quite difficult unless you're the original author of it. So please strip the scene and the script as much as possible. it also looks like you can provide .blend file instead.

Debugging what might be wrong in such a long script is quite difficult unless you're the original author of it. So please strip the scene and the script as much as possible. it also looks like you can provide .blend file instead.
Author

I think I found the line in the script that is causing trouble. Writing my files like this:

bpy.data.images['Render Result'].save_render(filepath=filename_ofimage+'.'+str(currentframe).zfill(4)+'.png')

gives the bad render result, while writing like this:

bpy.data.images['Render Result'].save_render(filepath='image.png')

gives the correct result.

I think I found the line in the script that is causing trouble. Writing my files like this: bpy.data.images['Render Result'].save_render(filepath=filename_ofimage+'.'+str(currentframe).zfill(4)+'.png') gives the bad render result, while writing like this: bpy.data.images['Render Result'].save_render(filepath='image.png') gives the correct result.

I'm not sure why would that be an issue. But with the files you're provided we\re unable to help you. It is important to have as small as possible setup which clearly demonstrates the issue. For now we only have rather really huge script which we can not even run because no input data for it is uploaded.

I'm not sure why would that be an issue. But with the files you're provided we\re unable to help you. It is important to have as small as possible setup which clearly demonstrates the issue. For now we only have rather really huge script which we can not even run because no input data for it is uploaded.
Author

I wrote a more minimal script bug.py, This is the x3d file bug.x3d. Run: blender -P bug.py -b . This will generate 3 files: bug.png, bug.0000.png, and bug.0001.png. The first 2 look fine, but the last one "bug.0001.png" does not render.

I wrote a more minimal script [bug.py](https://archive.blender.org/developer/F133422/bug.py), This is the x3d file [bug.x3d](https://archive.blender.org/developer/F133423/bug.x3d). Run: blender -P bug.py -b . This will generate 3 files: bug.png, bug.0000.png, and bug.0001.png. The first 2 look fine, but the last one "bug.0001.png" does not render.

This issue was referenced by 7bb29c5528

This issue was referenced by 7bb29c55287468dde964ac16c4b47ffad498e974

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 7bb29c5528.

Closed by commit 7bb29c5528.

This issue was referenced by 31862bc562

This issue was referenced by 31862bc562874a674ae2d7525cbda4af20199ca5
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#42938
No description provided.