You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I render images using the Front3D dataset, only the textures of the furniture are loaded correctly, while the walls and ceilings do not have any textures. Is this due to the JSON files in the Front3D dataset itself, or is there something that needs to be modified?
Minimal code example
importblenderprocasbprocimportargparseimportosimportnumpyasnpparser=argparse.ArgumentParser()
parser.add_argument("front", help="Path to the 3D front file")
parser.add_argument("future_folder", help="Path to the 3D Future Model folder.")
parser.add_argument("front_3D_texture_path", help="Path to the 3D FRONT texture folder.")
parser.add_argument("output_dir", help="Path to where the data should be saved")
args=parser.parse_args()
ifnotos.path.exists(args.front) ornotos.path.exists(args.future_folder):
raiseException("One of the two folders does not exist!")
bproc.init()
mapping_file=bproc.utility.resolve_resource(os.path.join("front_3D", "3D_front_mapping.csv"))
mapping=bproc.utility.LabelIdMapping.from_csv(mapping_file)
# set the light bouncesbproc.renderer.set_light_bounces(diffuse_bounces=200, glossy_bounces=200, max_bounces=200,
transmission_bounces=200, transparent_max_bounces=200)
# load the front 3D objectsloaded_objects=bproc.loader.load_front3d(
json_path=args.front,
future_model_path=args.future_folder,
front_3D_texture_path=args.front_3D_texture_path,
label_mapping=mapping
)
# Init sampler for sampling locations inside the loaded front3D housepoint_sampler=bproc.sampler.Front3DPointInRoomSampler(loaded_objects)
# Init bvh tree containing all mesh objectsbvh_tree=bproc.object.create_bvh_tree_multi_objects([oforoinloaded_objectsifisinstance(o, bproc.types.MeshObject)])
poses=0tries=0defcheck_name(name):
forcategory_namein ["chair", "sofa", "table", "bed"]:
ifcategory_nameinname.lower():
returnTruereturnFalse# filter some objects from the loaded objects, which are later used in calculating an interesting scorespecial_objects= [obj.get_cp("category_id") forobjinloaded_objectsifcheck_name(obj.get_name())]
proximity_checks= {"min": 1.0, "avg": {"min": 2.5, "max": 3.5}, "no_background": True}
whiletries<10000andposes<10:
# Sample point inside househeight=np.random.uniform(1.4, 1.8)
location=point_sampler.sample(height)
# Sample rotation (fix around X and Y axis)rotation=np.random.uniform([1.2217, 0, 0], [1.338, 0, np.pi*2])
cam2world_matrix=bproc.math.build_transformation_mat(location, rotation)
# Check that obstacles are at least 1 meter away from the camera and have an average distance between 2.5 and 3.5# meters and make sure that no background is visible, finally make sure the view is interesting enoughifbproc.camera.scene_coverage_score(cam2world_matrix, special_objects, special_objects_weight=10.0) >0.8 \
andbproc.camera.perform_obstacle_in_view_check(cam2world_matrix, proximity_checks, bvh_tree):
bproc.camera.add_camera_pose(cam2world_matrix)
poses+=1tries+=1# Also render normalsbproc.renderer.enable_normals_output()
bproc.renderer.enable_segmentation_output(map_by=["category_id"])
# render the whole pipelinedata=bproc.renderer.render()
# write the data to a .hdf5 containerbproc.writer.write_hdf5(args.output_dir, data)
Files required to run the code
No response
Expected behavior
I expect the walls and ceilings to load their textures correctly during rendering.
BlenderProc version
3.5.1
The text was updated successfully, but these errors were encountered:
When I render the Front 3D dataset, the windows appear gray, which looks quite jarring. Is there any way to resolve this issue? For example, can I generate a view of the scenery outside the windows?
Describe the issue
When I render images using the Front3D dataset, only the textures of the furniture are loaded correctly, while the walls and ceilings do not have any textures. Is this due to the JSON files in the Front3D dataset itself, or is there something that needs to be modified?
Minimal code example
Files required to run the code
No response
Expected behavior
I expect the walls and ceilings to load their textures correctly during rendering.
BlenderProc version
3.5.1
The text was updated successfully, but these errors were encountered: