facebookresearch / clevr-dataset-gen

A Diagnostic Dataset for Compositional Language and Elementary Visual Reasoning
Other
577 stars 204 forks source link

Cannot run render_images.py on Blender 2.81 #23

Open TommasoBendinelli opened 4 years ago

TommasoBendinelli commented 4 years ago

With Blender 2.81, on macOS Mojave I get the following error when I run blender --background --python render_images.py -- --num_images 10

Blender 2.81 (sub 16) (hash f1aa4d18d49d built 2019-12-04 14:33:18) found bundled python: /Applications/Blender.app/Contents/Resources/2.81/python Read blend: data/base_scene.blend Traceback (most recent call last): File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 568, in main(args) File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 187, in main output_blendfile=blend_path, File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 264, in render_scene bpy.ops.mesh.primitive_plane_add(radius=5) File "/Applications/Blender.app/Contents/Resources/2.81/scripts/modules/bpy/ops.py", line 201, in call ret = op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "radius" unrecognized

Blender quit

oaishi commented 4 years ago

I ran through the same issue too, Blender 2.81 changed few configurations, the best is to use Blender 2.78c as the authors did.

guicho271828 commented 4 years ago

You can use these commits IBM/photorealistic-blocksworld@b6a5cedca8ca79dc83e588cae3baf924355456fd IBM/photorealistic-blocksworld@7816279b43e71e90e70e5c18eb5001136b1172e0 IBM/photorealistic-blocksworld@e930ff0e38c330f58aa8d5304222ec9b1a28d714 IBM/photorealistic-blocksworld@3908f36d117cfb2b5cc4a0c50e7267ef576376bc

maskaravivek commented 3 years ago

Thanks @guicho271828 for sharing the fixes. As some of the newer graphic cards are not supported by older version of blender, this fix is quite helpful.

andrecavalcante commented 3 years ago

The fixes above work but then a I get a new error:

old_use_antialiasing = render_args.use_antialiasing AttributeError: 'RenderSettings' object has no attribute 'use_antialiasing'

guicho271828 commented 3 years ago

probably a new change in blender. Which version is it?

andrecavalcante commented 3 years ago

probably a new change in blender. Which version is it?

2.93.2 and 2.81a

guicho271828 commented 2 years ago

It is working until 2.91 https://app.travis-ci.com/github/IBM/photorealistic-blocksworld/builds/235932705

guicho271828 commented 2 years ago

no, actually 2.92

guicho271828 commented 2 years ago

actually 2.93.3 also worked after I fixed the url.

aOlmo commented 2 years ago

Removing radius=5 did it for me

jackyzyb commented 2 years ago

The fixes above work but then a I get a new error:

old_use_antialiasing = render_args.use_antialiasing AttributeError: 'RenderSettings' object has no attribute 'use_antialiasing'

Same here. I try to use Blender 2.8 and 2.9 and this issue always exists. Have you already found the solution?