Vision-as-Inverse-Graphics Agent via Interleaved Multimodal Reasoning
Paper
β’
2601.11109
β’
Published
instance_id
stringlengths 14
17
| task_description
stringclasses 7
values | start_render
imagewidth (px) 512
512
| goal_render
imagewidth (px) 512
512
| start_code
stringlengths 136
1.54k
| goal_code
stringlengths 146
1.7k
| blend_file_path
stringlengths 51
54
| blend_file_size_mb
float64 2.2
1.05k
|
|---|---|---|---|---|---|---|---|
level3/attribute9
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (0.2645, 0.2215, -2.9188)
bpy.data.objects["Camera1"].rotation_euler = (-0.0698, 2.4260, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 14.7161, 0.8306)
toilet.location = (1.9395, 14.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-2.0000, 0.0000, 0.4400)
bpy.data.objects["Camera1"].rotation_euler = (-0.1396, 5.7945, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level3/attribute9/blender_file.blend
| 733.03
|
||
level3/attribute8
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (0.2645, 0.2215, -2.9188)
bpy.data.objects["Camera1"].rotation_euler = (-0.0698, 2.4260, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 14.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-2.0000, 0.0000, 0.4400)
bpy.data.objects["Camera1"].rotation_euler = (-0.1396, 5.7945, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level3/attribute8/blender_file.blend
| 733.03
|
||
level3/attribute7
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (0.2645, 0.2215, -2.9188)
bpy.data.objects["Camera1"].rotation_euler = (-0.0698, 2.4260, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-2.0000, 0.0000, 0.4400)
bpy.data.objects["Camera1"].rotation_euler = (-0.1396, 5.7945, 0.0000)
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level3/attribute7/blender_file.blend
| 730.83
|
||
level3/attribute6
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 2.5
lamp_on_shelf.data.energy = 57
light_on_ceilling.data.energy = 0
lamp_on_the_cupboard.data.color = (1, 0.85, 0)
lamp_on_shelf.data.color = (0.2, 0.6, 1)
light_on_ceilling.data.color = (1, 0.95, 0.6)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (13.9023, 3.0485, 0.1584)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level3/attribute6/blender_file.blend
| 903.46
|
||
level3/attribute5
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 0.5
lamp_on_shelf.data.energy = 2.5
light_on_ceilling.data.energy = 400
lamp_on_the_cupboard.data.color = (0.8, 0.9, 1)
lamp_on_shelf.data.color = (0.5, 0.7, 1)
light_on_ceilling.data.color = (1, 0, 0)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (14.4023, 2.7485, 0.1584)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level3/attribute5/blender_file.blend
| 903.46
|
||
level3/attribute4
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 0
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 3.7485, 0.1584)
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level3/attribute4/blender_file.blend
| 1,049.1
|
||
level3/attribute3
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 2.5
lamp_on_shelf.data.energy = 57
light_on_ceilling.data.energy = 0
lamp_on_the_cupboard.data.color = (1, 0.85, 0)
lamp_on_shelf.data.color = (0.2, 0.6, 1)
light_on_ceilling.data.color = (1, 0.95, 0.6)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level3/attribute3/blender_file.blend
| 1,052.87
|
||
level3/attribute2
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 0.5
lamp_on_shelf.data.energy = 2.5
light_on_ceilling.data.energy = 400
lamp_on_the_cupboard.data.color = (0.8, 0.9, 1)
lamp_on_shelf.data.color = (0.5, 0.7, 1)
light_on_ceilling.data.color = (1, 0, 0)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level3/attribute2/blender_file.blend
| 1,052.87
|
||
level3/attribute1
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image. You need to adjust the camera angle so that you can see the object you want to modify.
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 0
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Adjust the camera pose to align with the target image
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level3/attribute1/blender_file.blend
| 1,052.17
|
||
level2/attribute9
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror.
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 14.7161, 0.8306)
toilet.location = (1.9395, 14.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level2/attribute9/blender_file.blend
| 733.03
|
||
level2/attribute8
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror.
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 14.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level2/attribute8/blender_file.blend
| 733.03
|
||
level2/attribute7
|
First move the cabinet to the correct position, then move the plant to the correct position. You need to move the cabinet to observe the plant in the mirror.
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (2.4661, 14.201, 0.1277)
plant.location = (3.2168, 14.327, 0.57311)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
|
import bpy
import math
import numpy as np
# a set of helper functions that you can use
# 1) move_to: move the object to location
# 2) move_by: move the object by the vector of change
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
def move_to(obj, location):
""" Set the object location.
"""
obj.location = location
bpy.context.view_layer.update()
return obj
def move_by(obj, vector):
""" Shift the object location by a 3D vector
"""
obj.location[0] += vector[0]
obj.location[1] += vector[1]
obj.location[2] += vector[2]
bpy.context.view_layer.update()
return obj
# These are movable objects.
# with open('log.txt', 'w') as f:
# f.write(bpy.data.objects)
cabinet = bpy.data.objects['Cabinet']
plant = bpy.data.objects['Plant']
mirror = bpy.data.objects['Mirror']
sink = bpy.data.objects['Sink']
toilet = bpy.data.objects['Toilet']
# These are the current locations of the movable objects
cabinet.location = (0.55602, 12.284, 0.1277)
plant.location = (3.1586, 15.049, 0.92)
mirror.location = (0.1374, 13.5573, 1.3960)
sink.location = (1.7123, 12.7161, 0.8306)
toilet.location = (1.9395, 12.5101, 0.4867)
# DO NOT SURPASS the range for the x, y, z coordinates of all objects:
# x: (0.3 , 3)
# y: (12 ,15)
# z: (0, 3)
# # ζ转θ§εΊ¦οΌ-89.9οΌ 1.38οΌ 0.03οΌεδ½ζ―εΊ¦
# mirror.rotation_euler = (math.radians(-89.9), math.radians(1.38), math.radians(0.03))
# mirror.scale = (1.848, 1.848, 1.848)
|
data/blenderbench/level2/attribute7/blender_file.blend
| 733.03
|
||
level2/attribute6
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 2.5
lamp_on_shelf.data.energy = 57
light_on_ceilling.data.energy = 0
lamp_on_the_cupboard.data.color = (1, 0.85, 0)
lamp_on_shelf.data.color = (0.2, 0.6, 1)
light_on_ceilling.data.color = (1, 0.95, 0.6)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (13.9023, 3.0485, 0.1584)
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level2/attribute6/blender_file.blend
| 903.46
|
||
level2/attribute5
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 0.5
lamp_on_shelf.data.energy = 2.5
light_on_ceilling.data.energy = 400
lamp_on_the_cupboard.data.color = (0.8, 0.9, 1)
lamp_on_shelf.data.color = (0.5, 0.7, 1)
light_on_ceilling.data.color = (1, 0, 0)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (14.4023, 2.7485, 0.1584)
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level2/attribute5/blender_file.blend
| 903.46
|
||
level2/attribute4
|
First adjust the brightness of the room, then adjust the position of the basketball so that it looks the same as the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 0
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location (Object name: 'basketball')
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 3.7485, 0.1584)
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The basketball location
basketball = bpy.data.objects['basketball']
basketball.location = (13.4023, 2.7485, 0.6584)
# basketball.location = (13.4023, 3.7485, 0.1584)
|
data/blenderbench/level2/attribute4/blender_file.blend
| 903.46
|
||
level2/attribute3
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 2.5
lamp_on_shelf.data.energy = 57
light_on_ceilling.data.energy = 0
lamp_on_the_cupboard.data.color = (1, 0.85, 0)
lamp_on_shelf.data.color = (0.2, 0.6, 1)
light_on_ceilling.data.color = (1, 0.95, 0.6)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level2/attribute3/blender_file.blend
| 906.73
|
||
level2/attribute2
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
lamp_on_the_cupboard.data.energy = 0.5
lamp_on_shelf.data.energy = 2.5
light_on_ceilling.data.energy = 400
lamp_on_the_cupboard.data.color = (0.8, 0.9, 1)
lamp_on_shelf.data.color = (0.5, 0.7, 1)
light_on_ceilling.data.color = (1, 0, 0)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level2/attribute2/blender_file.blend
| 906.73
|
||
level2/attribute1
|
First adjust the room brightness, then adjust the size of the character's belly so that it looks like the target image.
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 0
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character (Object name: 'Stylized Fat Character')
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
import bpy
import math
import numpy as np
# Accessing the light objects
lamp_on_the_cupboard = bpy.data.objects['lamp_on_the_cupboard']
lamp_on_shelf = bpy.data.objects['lamp_on_shelf']
light_on_ceilling = bpy.data.objects['light_on_ceilling']
# Drastically changing energy levels
lamp_on_the_cupboard.data.energy = 1.5
lamp_on_shelf.data.energy = 1.2
light_on_ceilling.data.energy = 200
# Vibrant and drastic color changes
lamp_on_the_cupboard.data.color = (1, 1, 1)
lamp_on_shelf.data.color = (1, 1, 1)
light_on_ceilling.data.color = (1, 1, 1)
# The key of stylized fat character
bpy.data.shape_keys["Key"].key_blocks["BellySag"].value = 5
bpy.data.shape_keys["Key"].key_blocks["BellyShrink"].value = 3
bpy.data.shape_keys["Key"].key_blocks["ShoulderWideness"].value = 0
bpy.data.shape_keys["Key"].key_blocks["BackTaper"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestEnlarge"].value = 0
bpy.data.shape_keys["Key"].key_blocks["ChestArea"].value = 0
bpy.data.shape_keys["Key"].key_blocks["MoreChin"].value = 0
bpy.data.shape_keys["Key"].key_blocks["Abs"].value = 0
bpy.data.shape_keys["Key"].key_blocks["eyelids"].value = 0
bpy.data.shape_keys["Key"].key_blocks["nose"].value = 0
|
data/blenderbench/level2/attribute1/blender_file.blend
| 906.73
|
||
level1/camera9
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (0.1104, -2.6639, 9.8843)
bpy.data.objects["Camera1"].rotation_euler = (0.3142, 0, 0)
|
import bpy
bpy.data.objects["Camera1"].location = (5.9589, -5.6058, 4.0383)
bpy.data.objects["Camera1"].rotation_euler = (1.2839, 0.0000, 0.8149)
|
data/blenderbench/level1/camera9/blender_file.blend
| 3.92
|
||
level1/camera8
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (7.3589, -6.9258, 4.9583)
bpy.data.objects["Camera1"].rotation_euler = (1.2664, 0.0000, 0.7800)
|
import bpy
bpy.data.objects["Camera1"].location = (-4.1656, 0.0020, 3.7237)
bpy.data.objects["Camera1"].rotation_euler = (1.5708, 0.0000, -1.5708)
|
data/blenderbench/level1/camera8/blender_file.blend
| 2.2
|
||
level1/camera7
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (1.3353, 1.4740, 1.5357)
bpy.data.objects["Camera1"].rotation_euler = (-0.7679, 0.2094, 0.0000)
|
import bpy
bpy.data.objects["Camera1"].location = (2.4674, 0.2196, -1.2138)
bpy.data.objects["Camera1"].rotation_euler = (-0.4014, 2.0071, 0.0000)
|
data/blenderbench/level1/camera7/blender_file.blend
| 189.55
|
||
level1/camera6
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (2.4689, -2.6258, 1.3083)
bpy.data.objects["Camera1"].rotation_euler = (1.4060, 0.0000, 0.7626)
|
import bpy
bpy.data.objects["Camera1"].location = (-1.0800, 1.0600, 0.7700)
bpy.data.objects["Camera1"].rotation_euler = (1.5708, 0.0000, 3.9968)
|
data/blenderbench/level1/camera6/blender_file.blend
| 5.45
|
||
level1/camera5
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (-1.2250, 0.7100, -2.8300)
bpy.data.objects["Camera1"].rotation_euler = (-0.4363, 3.3161, 0.0349)
|
import bpy
bpy.data.objects["Camera1"].location = (-3.1800, -0.0500, 2.5700)
bpy.data.objects["Camera1"].rotation_euler = (0.3491, -0.8029, -0.2269)
|
data/blenderbench/level1/camera5/blender_file.blend
| 1,042.16
|
||
level1/camera4
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (1.1400, 0.8500, 0.5300)
bpy.data.objects["Camera1"].rotation_euler = (2.4435, 1.1170, 2.6354)
|
import bpy
bpy.data.objects["Camera1"].location = (-1.1222, -0.3259, 4.4354)
bpy.data.objects["Camera1"].rotation_euler = (-0.0873, 0.5934, 0.2094)
|
data/blenderbench/level1/camera4/blender_file.blend
| 1,042.09
|
||
level1/camera3
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (6.7303, -4.8700, 3.7385)
bpy.data.objects["Camera1"].rotation_euler = (1.2811, -0.0000, 0.9355)
bpy.data.objects["Camera1"].data.lens = 50
|
import bpy
bpy.data.objects["Camera1"].location = (-1.6577, -1.7238, 1.9317)
bpy.data.objects["Camera1"].rotation_euler = (1.4033, -0.0000, 5.6653)
bpy.data.objects["Camera1"].data.lens = 21
|
data/blenderbench/level1/camera3/blender_file.blend
| 18.8
|
||
level1/camera2
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (-3.4813, 4.5001, 0.5115)
bpy.data.objects["Camera1"].rotation_euler = (1.6678, 0.0000, 3.8693)
|
import bpy
bpy.data.objects["Camera1"].location = (3.9689, -4.6158, 2.1883)
bpy.data.objects["Camera1"].rotation_euler = (1.3188, 0.0000, 0.7800)
|
data/blenderbench/level1/camera2/blender_file.blend
| 20.3
|
||
level1/camera1
|
Adjust the camera position so that the viewing angle is consistent with the target image
|
import bpy
bpy.data.objects["Camera1"].location = (1.0765, -1.2848, 1.4343)
bpy.data.objects["Camera1"].rotation_euler = (1.5701, 0.0000, 0.6753)
|
import bpy
bpy.data.objects["Camera1"].location = (-1.0292, 1.6960, 1.1705)
bpy.data.objects["Camera1"].rotation_euler = (1.5701, 0.0000, 3.6424)
|
data/blenderbench/level1/camera1/blender_file.blend
| 11.39
|
BlenderBench is a comprehensive benchmark dataset for evaluating models on 3D scene editing tasks in Blender. The dataset challenges agents to understand visual differences between initial and target scenes, then generate appropriate Blender Python code to transform the initial scene to match the target.
The dataset covers three main difficulty levels:
Each instance in the dataset contains:
instance/
βββ blender_file.blend # Blender scene file
βββ start.py # Initial scene configuration code
βββ goal.py # Target scene configuration code
βββ task.txt # Natural language task description
βββ renders/
βββ start/
β βββ render1.png # Rendered image of initial scene (512x512)
βββ goal/
βββ render1.png # Rendered image of target scene (512x512)
When loaded using datasets.load_dataset(), each example contains:
instance_id (string): Unique identifier (e.g., "level1/camera1")level (string): Difficulty level ("level1", "level2", or "level3")instance_name (string): Instance name within the leveltask_description (string): Natural language description of the taskstart_code (string): Python code for the initial scene setupgoal_code (string): Python code for the target scene configurationstart_render (image): Rendered image of the initial scene (512x512 PNG)goal_render (image): Rendered image of the target scene (512x512 PNG)blend_file_path (string): Relative path to the .blend fileblend_file_size_mb (float): Size of the .blend file in MBThe dataset provides a single training split containing all instances. You can filter by difficulty level using the dataset configurations:
all: All instances (default)level1: Only level 1 instanceslevel2: Only level 2 instanceslevel3: Only level 3 instancespip install datasets huggingface_hub
from datasets import load_dataset
# Load all instances
dataset = load_dataset("DietCoke4671/BlenderBench")
# Load only level 1 instances
dataset = load_dataset("DietCoke4671/BlenderBench", "level1")
# Access an example
example = dataset["train"][0]
print(f"Task: {example['task_description']}")
print(f"Level: {example['level']}")
# Display images
example['start_render'].show() # Initial scene
example['goal_render'].show() # Target scene
# Access code
print(f"Start code:\n{example['start_code']}")
print(f"Goal code:\n{example['goal_code']}")
To actually render and evaluate generated code, you'll need Blender installed:
import subprocess
from pathlib import Path
def render_with_blender(blend_file, code, output_dir):
"""
Execute Blender code and render the result.
Args:
blend_file: Path to .blend file
code: Python code to execute in Blender
output_dir: Directory to save rendered output
"""
# Save code to temporary file
code_file = Path(output_dir) / "temp_code.py"
with open(code_file, 'w') as f:
f.write(code)
# Run Blender
cmd = [
"blender",
"--background",
str(blend_file),
"--python", str(code_file),
"--render-output", str(output_dir / "render.png"),
"--render-frame", "1"
]
subprocess.run(cmd)
# Example usage
example = dataset["train"][0]
render_with_blender(
blend_file=f"path/to/{example['blend_file_path']}",
code=example['start_code'],
output_dir="output/"
)
from datasets import load_dataset
import openai
# Load dataset
dataset = load_dataset("DietCoke4671/BlenderBench", "level1")
def solve_blender_task(example):
"""
Use an AI agent to solve a BlenderBench task.
"""
# Prepare prompt with task description and images
prompt = f"""
You are an expert Blender Python programmer. Your task is to:
Task: {example['task_description']}
Given the initial scene code and rendered image, generate Blender Python code
to transform the scene to match the target image.
Initial code:
{example['start_code']}
Generate the modified code that will produce the target scene.
"""
# Call your AI model (e.g., GPT-4 with vision)
response = openai.ChatCompletion.create(
model="gpt-4-vision-preview",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": prompt},
{
"type": "image_url",
"image_url": {"url": encode_image(example['start_render'])}
},
{
"type": "image_url",
"image_url": {"url": encode_image(example['goal_render'])}
}
]
}
]
)
return response.choices[0].message.content
# Solve all level 1 tasks
for example in dataset["train"]:
solution = solve_blender_task(example)
print(f"Solution for {example['instance_id']}:")
print(solution)