#usda 1.0 ( """ This shows and object with a pose which is fixed per sample, but the background is moving within the sample. This is done by using Clip instead of Frame samplers on the object. """ ) def Xform "Scene" { def FrameSampler "RandomRotation" { float3[] rotation = [(-180, -180,-180), (180, 180, 180)] } def Xform "ObjectsRoot" { def Xform "ObjectsPlaceholder" { } def Xform "DefaultObjectPrim" { def FrameSampler "RandomRelativeGaussianTranslation" { rel ref_model_diameter = <..> float3[] translation = [(-0.275, -0.275, -0.275), (0.275, 0.275, 0.275)] float3 gaussian_sampling_mean = (0, 0, 0) float3 gaussian_sampling_stddev = (0.11, 0.11, 0.11) } def FrameSampler "RandomUniformRotationEliza" { # This range gets set by the template. float3[] rotation = [(-90, -180, -180), (90, 180, 180)] # The template choses from these range options based on object parameters. def TemplatingParameters "RotationRanges" { float[] limited_x_range = [0, 90] float[] limited_y_range = [-90, 90] float[] limited_z_range = [-10, 10] float3[] all = [(-90, -180, -180), (90, 180, 180)] } } # A PoseLocalToWorld label request will be added after centering and scale } def FrameSampler "ActivateRandomObject" { rel ref_variation_path = rel ref_copy_attribute_destination = string[] copy_attributes_names = ["model_diameter"] } def FrameSampler "RandomRelativeInverseZ" { rel ref_model_diameter = float[] range = [0.75, 15] } def LabelRequest "VariationLR" { string[] request:names = ["ActivateRandomObjectChoice"] } } def Camera "main_camera" { float camera:field_of_view = 45 float2 clippingRange = (0.0001, 1000) string[] image:output = ["color", "mask"] def FrameSampler "FocalScaling" { rel ref_model_diameter = rel ref_focal_target = float patch_diameter_factor = 1.1 bool use_previous_frame = false } def FrameSampler "ImageProcessing" { float[] bloom = [0.0, 0.2] float[] camera_noise = [0.0, 0.3] float[] tint_hue = [0.0, 1.0] float[] tint_strength = [0.0, 0.75] float[] exposure = [-1.0, 1.0] float[] gaussian_range = [0.0, 3.0] float[] motion_blur_strength = [0.0, 0.02] float[] motion_blur_angle = [0.0, 360.0] } def LabelRequest "CameraLR" { string[] request:names = ["PoseLocalToWorld", "CameraIntrinsics", "PatchDistance"] } } def Xform "BackCube" ( references = @Cube.usda@ ) { over "Cube" { double size = 100 } int shader_mask_value = 0 float model_diameter = 100 def FrameSampler "RandomPoseInFOVByPixelSize" { rel ref_model_diameter = <..> rel ref_camera = float3[] rotation = [(-90, -180, -180), (90, 180, 180)] bool inverse_z_sampling = false float[] pixel_count_ratio_range = [0.6, 1.3] float border_region = 0.3 } def ClipSampler "RandomVisibility" { float probability = 0.9 } } def Xform "ForeObjectBase" () { int shader_mask_value = 0 float model_diameter = 0.02 def FrameSampler "RandomPoseBetweenObjectAndCameraInFOVWithOverlap" { rel sampling_dependencies = [] rel ref_target_model = rel ref_camera = float[] interpolation_range = [0.3, 0.9] float[] occlusion_overlapping_threshold = [0.3, 0.9] } def FrameSampler "RandomUniformRotationEliza" { float3[] rotation = [(-90, -180,-180), (90, 180, 180)] } def FrameSampler "AdaptiveScale" { # Reference to the model diameter that the foreground prims (occluders) must match. # The diameter changes based on which object was activated by RandomActiveObject sampler which copies the selected child prim model diameter to the placeholder prim. rel ref_model_diameter = } } def Xform "Occluders" { def ClipSampler "RandomVisibility" { float probability = 0.5 } def Xform "ForeCube1" ( references = @Cube.usda@ inherits = ) { } def Xform "ForeCone1" ( references = @Cone.usda@ inherits = ) { } def Xform "ForeCapsule1" ( references = @Capsule.usda@ inherits = ) { } def Xform "ForeSphere1" ( references = @Sphere.usda@ inherits = ) { } def FrameSampler "RandomSwitch" { # Iterates over occluders, at most one occluder per image } } } def DomeLight "Background" { float3 xformOp:rotateXYZ = (0, 180, 0) uniform token[] xformOpOrder = ["xformOp:rotateXYZ"] def ClipSampler "RandomBackground" { asset folder = @LeonaroTexturesAssets/TextureImages@ string[] filenames = ["*.hdr", "*.exr", "*.jpg"] } }