Core (.core)#
Subpackages#
- Placement (.core.placement)
- animation_policy
PolicyErrorget_altitude()walk_same_altitude()AnimPolicyBrownianAnimPolicyPanAnimPolicyRandomForwardWalkAnimPolicyRandomWalkLookaroundAnimPolicyFollowObjectvalidate_keyframe_range()try_animate_trajectory()try_animate_with_pathfinding()keyframe()animate_trajectory()policy_create_bezier_path()
- camera
get_sensor_coords()adjust_camera_sensor()spawn_camera()cam_name()get_id()spawn_camera_rigs()get_camera_rigs()set_active_camera()terrain_camera_query()CameraProposalcamera_pose_proposal()keep_cam_pose_proposal()AnimPolicyGoToProposalscompute_base_views()build_bvh_and_attrs()camera_selection_preprocessing()sample_random_locs()configure_cameras()anim_valid_camrig_pose_func()animate_cameras()save_camera_parameters()
- camera_trajectories
- density
- detail
- factory
- instance_scatter
- particles
- path_finding
- placement
- split_in_view
- Module contents
- animation_policy
- Constraints (.core.constraints)
- Constraint Language (.core.constraints.constraint_language)
- constants
- expression
- gather
- geometry
- relations
- result
- rooms
- set_reasoning
- types
- util
bvh_caching_config()group()meshes_from_names()blender_objs_from_names()name_from_mesh()project_to_xy_path2d()project_to_xy_poly()closest_edge_to_point_poly()closest_edge_to_point_edge_list()compute_outward_normal()get_transformed_axis()set_axis()get_plane_from_3dmatrix()project_points_onto_plane()to_2d_coordinates()ensure_correct_order()sample_random_point()delete_obj()is_planar()planes_parallel()distance_to_plane()subset()add_object_cached()col_from_subset()plot_geometry()sync_trimesh()translate()rotate()set_location()set_rotation()blender_centroid()order_objects_by_principal_axis()
- Module contents
- Evaluator (.core.constraints.evaluator)
- Node Impl (.core.constraints.evaluator.node_impl)
- domain_contains
- eval_memo
- evaluate
- indoor_util
meshes_from_names()blender_objs_from_names()name_from_mesh()project_to_xy_path2d()project_to_xy_poly()closest_edge_to_point()compute_outward_normal()get_transformed_axis()set_axis()get_plane_from_3dmatrix()project_points_onto_plane()to_2d_coordinates()ensure_correct_order()sample_random_point()delete_obj()is_planar()planes_parallel()distance_to_plane()is_within_margin_from_plane()
- Module contents
- Example Solver (.core.constraints.example_solver)
- Reasoning (.core.constraints.reasoning)
- checks
- usage_lookup
- Constraint Language (.core.constraints.constraint_language)
- Rendering (.core.rendering)
- post_render
- render
remove_translucency()set_pass_indices()set_material_pass_indices()make_clay()compositor_postprocessing()configure_compositor_output()shader_random()global_flat_shading()postprocess_blendergt_outputs()postprocess_materialgt_output()configure_compositor()set_displacement_mode()render_image()
- resample
- Module contents
- Core Utilities (.core.util)
- blender
set_geometry_option()deep_clone_obj()copy()get_all_bpy_data_targets()ViewportModeCursorLocationSelectObjectsDisableModifiersEnableParentCollectionsTemporaryObjectgarbage_collect()GarbageCollectselect_none()select()delete()delete_collection()traverse_children()iter_object_tree()get_collection()unlink()put_in_collection()group_in_collection()group_toplevel_collections()spawn_empty()spawn_point_cloud()spawn_vert()spawn_line()spawn_plane()spawn_cube()spawn_cylinder()spawn_sphere()spawn_icosphere()clear_scene()spawn_capsule()to_mesh()get_camera_res()set_geomod_inputs()modify_mesh()constrain_object()apply_transform()import_mesh()boolean()split_object()move_modifier()join_objects()clear_mesh()apply_modifiers()recalc_normals()save_blend()joined_kd()make_instances_real()objectdata_from_VF()object_from_VF()object_from_trimesh()object_to_vertex_attributes()object_to_trimesh()blender_internal_attr()merge_by_distance()origin_set()apply_geo()avg_approx_vol()parent_to()apply_matrix_world()surface_area()approve_all_drivers()count_objects()count_instance()bounds()create_noise_plane()purge_empty_materials()global_polygon_normal()global_vertex_coordinates()
- camera
- imu
- logging
- math
FixedSeedAddedSeedBBoxmd5_hash()int_hash()round_to_nearest()lerp_sample()inverse_interpolate()cross_matrix()rodrigues()rotate_match_directions()lerp()dict_lerp()dict_convex_comb()randomspacing()linvec()homogenize()dehomogenize()clip_gaussian()normalize()project_to_unit_vector()wrap_around_cyclic_coord()new_domain_from_affine()affine_from_new_domain()resize()
- ocmesher_utils
- organization
TaskMaterialsLandTileAssetsAssetFileProcessTerrainNamesTransparencyElementNamesElementNames.AtmosphereElementNames.LiquidElementNames.CavesElementNames.CloudsElementNames.LandTilesElementNames.GroundElementNames.MountainsElementNames.WarpedRocksElementNames.VoronoiRocksElementNames.VoronoiGrainsElementNames.UpsidedownMountainsElementNames.VolcanosElementNames.FloatingIce
TagsAttributesSelectionCriterionsElementTagSurfaceTypes
- pipeline
- random
- rrt
validate_node_nature()validate_node_indoors()RRTRRT.generate_path()RRT.next_goal()RRT.prox_check()RRT.node_in_object()RRT.is_valid()RRT.rand_valid_node()RRT.rand_node()RRT.parent()RRT.cost()RRT.get_vertices()RRT.wireup()RRT.getDist()RRT.sample_free()RRT.nearest()RRT.neighborhood()RRT.steer()RRT.get_bbox()RRT.is_in_bbox()RRT.line_not_valid()
AnimPolicyRRTvalidate_cam_pose_rrt()
- test_utils
- Module contents
- blender
execute_tasks#
- infinigen.core.execute_tasks.render(...)[source]#
- Parameters:
scene_seed
output_folder
camera
render_image_func -- (default:
<function render_image>)resample_idx -- (default:
None)hide_water -- (default:
False)
- infinigen.core.execute_tasks.execute_tasks(...)[source]#
- Parameters:
compose_scene_func (Callable)
populate_scene_func (Callable)
input_folder (Path)
output_folder (Path)
task (str)
scene_seed (int)
resample_idx (int) -- (default:
None)output_blend_name (str) -- (default:
'scene.blend')generate_resolution -- (default:
(1280, 720))fps (int) -- (default:
24)reset_assets -- (default:
True)dryrun -- (default:
False)optimize_terrain_diskusage -- (default:
False)point_trajectory_src_frame -- (default:
1)
generator#
init#
- infinigen.core.init.apply_scene_seed(seed, task=None)[source]#
- Parameters:
seed
task -- (default:
None)
- infinigen.core.init.apply_gin_configs(...)[source]#
Apply gin configuration files and bindings.
- Parameters:
configs_folder (Path) -- The path to the toplevel folder containing the gin configuration files.
configs (list[str]) -- A list of filenames to find within the configs_folder.
overrides (list[str]) -- A list of gin-formatted pairs to override the configs with.
skip_unknown (bool) -- If True, ignore errors for configs that were set by the user but not used anywhere
mandatory_folders (list[Path]) -- For each folder in the list, at least one config file must be loaded from that folder.
mutually_exclusive_folders (list[Path]) -- For each folder in the list, at most one config file must be loaded from that folder.
finalize_config -- (default:
False)
- infinigen.core.init.configure_render_cycles(...)[source]#
- Parameters:
min_samples
num_samples
time_limit
adaptive_threshold
exposure
denoise
- infinigen.core.init.configure_cycles_devices(use_gpu=True)[source]#
- Parameters:
use_gpu -- (default:
True)
surface#
- infinigen.core.surface.write_attribute(...)[source]#
- Parameters:
objs
node_func
name -- (default:
None)data_type -- (default:
None)apply -- (default:
False)
- infinigen.core.surface.read_attr_data(...) numpy.array[source]#
- Parameters:
obj
attr
domain -- (default:
'POINT')result_dtype -- (default:
None)
- infinigen.core.surface.write_attr_data(...)[source]#
- Parameters:
obj
attr
data (array)
type -- (default:
'FLOAT')domain -- (default:
'POINT')
- infinigen.core.surface.smooth_attribute(...)[source]#
- Parameters:
obj
name
iters -- (default:
20)weight -- (default:
0.05)verbose -- (default:
False)
- infinigen.core.surface.attribute_to_vertex_group(...)[source]#
- Parameters:
obj
attr
name -- (default:
None)min_thresh -- (default:
0)binary -- (default:
False)
- infinigen.core.surface.eval_argument(...)[source]#
- Parameters:
nw
argument
default_value -- (default:
1.0)
- infinigen.core.surface.shaderfunc_to_material(...)[source]#
Convert a shader_func(nw) directly to a bpy.data.material
Used in add_material and transpiler’s Nodes.SetMaterial handler
- Parameters:
shader_func
name -- (default:
None)
- infinigen.core.surface.seed_generator(size=8, chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ')[source]#
- Parameters:
size -- (default:
8)chars -- (default:
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
- infinigen.core.surface.add_material(...)[source]#
- Parameters:
objs
shader_func
selection -- (default:
None)input_args -- (default:
None)input_kwargs -- (default:
None)name -- (default:
None)reuse -- (default:
False)
- infinigen.core.surface.assign_material(objs, material, selection=None)[source]#
- Parameters:
objs (Object | list[Object])
material (pf.Material)
- infinigen.core.surface.add_geomod(...)[source]#
- Parameters:
objs
geo_func
name -- (default:
None)apply -- (default:
False)reuse -- (default:
False)input_args -- (default:
None)input_kwargs -- (default:
None)attributes -- (default:
None)show_viewport -- (default:
True)selection -- (default:
None)domains -- (default:
None)input_attributes -- (default:
None)
tagging#
- infinigen.core.tagging.tag_object(obj, name=None, mask=None)[source]#
- Parameters:
obj
name -- (default:
None)mask -- (default:
None)
- infinigen.core.tagging.vert_mask_to_tri_mask(obj, vert_mask, require_all=True)[source]#
- Parameters:
obj
vert_mask
require_all -- (default:
True)
- infinigen.core.tagging.tag_canonical_surfaces(obj, rtol=0.01)[source]#
- Parameters:
obj
rtol -- (default:
0.01)
- infinigen.core.tagging.tag_nodegroup(...)[source]#
- Parameters:
nw (NodeWrangler)
input_node
name (Tag)
selection -- (default:
None)
- infinigen.core.tagging.tagged_face_mask(obj, tags) ndarray[source]#
- Parameters:
obj (Object)
tags (Subpart)
- infinigen.core.tagging.extract_tagged_faces(obj, tags, nonempty=False) bpy_types.Object[source]#
extract the surface that satisfies all tags
- Parameters:
obj (Object)
tags (set)
nonempty -- (default:
False)
- infinigen.core.tagging.extract_mask(obj, face_mask, nonempty=False) bpy_types.Object[source]#
- Parameters:
obj (Object)
face_mask (array)
nonempty -- (default:
False)
- infinigen.core.tagging.tag_support_surfaces(obj, angle_threshold=0.1)[source]#
Tags faces of the object (or its mesh children) whose normal is close to the +z direction with the “support” tag.
Args: obj (bpy.types.Object): The object to tag (can be any type of object). angle_threshold (float): The cosine of the maximum angle deviation from +z to be considered a support surface.
- Parameters:
obj
angle_threshold -- (default:
0.1)