RenderJobUnreal

pydantic model xrfeitoria.data_structure.models.RenderJobUnreal[source]

Render job model for Unreal.

Show JSON schema
{
   "title": "RenderJobUnreal",
   "description": "Render job model for Unreal.",
   "type": "object",
   "properties": {
      "map_path": {
         "description": "Map path of the render job.",
         "title": "Map Path",
         "type": "string"
      },
      "sequence_path": {
         "description": "Sequence path of the render job.",
         "title": "Sequence Path",
         "type": "string"
      },
      "output_path": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "format": "path",
               "type": "string"
            }
         ],
         "description": "Output path of the render job.",
         "title": "Output Path"
      },
      "resolution": {
         "description": "Resolution of the images rendered by the render job.",
         "maxItems": 2,
         "minItems": 2,
         "prefixItems": [
            {
               "type": "integer"
            },
            {
               "type": "integer"
            }
         ],
         "title": "Resolution",
         "type": "array"
      },
      "render_passes": {
         "description": "Render passes of the render job.",
         "items": {
            "$ref": "#/$defs/RenderPass"
         },
         "title": "Render Passes",
         "type": "array"
      },
      "file_name_format": {
         "default": "{sequence_name}/{render_pass}/{camera_name}/{frame_number}",
         "description": "File name format of the render job.",
         "title": "File Name Format",
         "type": "string"
      },
      "console_variables": {
         "additionalProperties": {
            "type": "number"
         },
         "default": {
            "r.MotionBlurQuality": 0
         },
         "description": "Additional console variables of the render job. Ref to :ref:`FAQ-console-variables` for details.",
         "title": "Console Variables",
         "type": "object"
      },
      "anti_aliasing": {
         "allOf": [
            {
               "$ref": "#/$defs/AntiAliasSetting"
            }
         ],
         "default": {
            "enable": false,
            "override_anti_aliasing": false,
            "spatial_samples": 8,
            "temporal_samples": 8,
            "warmup_frames": 0,
            "render_warmup_frame": false
         },
         "description": "Anti aliasing setting of the render job."
      },
      "export_audio": {
         "default": false,
         "description": "Whether to export audio of the render job.",
         "title": "Export Audio",
         "type": "boolean"
      }
   },
   "$defs": {
      "AntiAliasSetting": {
         "properties": {
            "enable": {
               "default": false,
               "description": "Whether to enable anti aliasing.",
               "title": "Enable",
               "type": "boolean"
            },
            "override_anti_aliasing": {
               "default": false,
               "description": "Whether to override anti aliasing.",
               "title": "Override Anti Aliasing",
               "type": "boolean"
            },
            "spatial_samples": {
               "default": 8,
               "description": "Spatial samples of the anti aliasing.",
               "minimum": 1,
               "title": "Spatial Samples",
               "type": "integer"
            },
            "temporal_samples": {
               "default": 8,
               "description": "Temporal samples of the anti aliasing.",
               "minimum": 1,
               "title": "Temporal Samples",
               "type": "integer"
            },
            "warmup_frames": {
               "default": 0,
               "description": "Warmup frames in engine which would rendered before actual frame range. This is crucial when particle system (Niagara) is used.",
               "minimum": 0,
               "title": "Warmup Frames",
               "type": "integer"
            },
            "render_warmup_frame": {
               "default": false,
               "description": "Whether to render warmup frame of the anti aliasing.",
               "title": "Render Warmup Frame",
               "type": "boolean"
            }
         },
         "title": "AntiAliasSetting",
         "type": "object"
      },
      "ImageFileFormatEnum": {
         "description": "Image file format enum.",
         "enum": [
            "PNG",
            "BMP",
            "JPEG",
            "JPEG",
            "OPEN_EXR"
         ],
         "title": "ImageFileFormatEnum",
         "type": "string"
      },
      "RenderOutputEnumBlender": {
         "description": "Render layer enum of Blender.",
         "enum": [
            "Image",
            "IndexOB",
            "Depth",
            "Denoising Depth",
            "Vector",
            "Normal",
            "DiffCol",
            "actor_infos.json",
            "camera_params"
         ],
         "title": "RenderOutputEnumBlender",
         "type": "string"
      },
      "RenderOutputEnumUnreal": {
         "description": "Render layer enum of Unreal.",
         "enum": [
            "img",
            "mask",
            "depth",
            "flow",
            "normal",
            "diffuse",
            "metallic",
            "roughness",
            "specular",
            "tangent",
            "basecolor",
            "lineart",
            "vertices",
            "skeleton",
            "actor_infos",
            "camera_params",
            "Audio"
         ],
         "title": "RenderOutputEnumUnreal",
         "type": "string"
      },
      "RenderPass": {
         "description": "Render pass model contains render layer and image format.\n\nSupported render layer and image format:\n\n    .. tabs::\n        .. tab:: RenderLayerBlender\n\n            :class:`~xrfeitoria.data_structure.constants.RenderOutputEnumBlender`:\n\n                - img\n                - mask\n                - depth\n                - flow\n                - normal\n                - diffuse\n                - denoising_depth\n\n        .. tab:: RenderLayerUnreal\n\n            :class:`~xrfeitoria.data_structure.constants.RenderOutputEnumUnreal`:\n\n                - img\n                - mask\n                - depth\n                - flow\n                - normal\n                - diffuse\n                - metallic\n                - roughness\n                - specular\n                - tangent\n                - basecolor\n\n        .. tab:: ImageFormat\n\n            :class:`~xrfeitoria.data_structure.constants.ImageFileFormatEnum`:\n\n                - png\n                - bmp\n                - jpg\n                - exr\n\nUsed in:\n    - :class:`~xrfeitoria.data_structure.models.RenderJobBlender`\n    - :class:`~xrfeitoria.data_structure.models.RenderJobUnreal`\n    - :meth:`Renderer.add_job <xrfeitoria.renderer.renderer_base.RendererBase.add_job>`\n    - :meth:`Sequence.add_to_renderer <xrfeitoria.sequence.sequence_base.SequenceBase.add_to_renderer>`\n    - ...\n\nExamples:\n\n    .. tabs::\n        .. tab:: define\n\n            .. code-block:: python\n                :linenos:\n\n                from xrfeitoria.data_structure.models import RenderPass\n                RenderPass('img', 'png')\n                RenderPass('mask', 'exr')\n                RenderPass('normal', 'jpg')\n                ...\n\n        .. tab:: RenderJobBlender\n\n            .. code-block:: python\n                :linenos:\n                :emphasize-lines: 6\n\n                from xrfeitoria.data_structure.models import RenderJobBlender, RenderPass\n                RenderJobBlender(\n                    sequence_name=...,\n                    output_path=...,\n                    resolution=...,\n                    render_passes=[RenderPass('img', 'png')],\n                )\n\n        .. tab:: RenderJobUnreal\n\n            .. code-block:: python\n                :linenos:\n                :emphasize-lines: 7\n\n                from xrfeitoria.data_structure.models import RenderJobUnreal, RenderPass\n                RenderJobUnreal(\n                    map_path=...,\n                    sequence_path=...,\n                    output_path=...,\n                    resolution=...,\n                    render_passes=[RenderPass('img', 'png')],\n                )\n\n        .. tab:: seq.add_to_renderer\n\n            .. code-block:: python\n                :linenos:\n                :emphasize-lines: 9\n\n                import xrfeitoria as xf\n                from xrfeitoria.data_structure.models import RenderPass\n\n                with xf.init_blender() as xf_runner:\n                    seq = xf_runner.Sequence.new(seq_name='test'):\n                        seq.add_to_renderer(\n                            output_path=...,\n                            resolution=...,\n                            render_passes=[RenderPass('img', 'png')],\n                        )\n\n                    xf_runner.render()",
         "properties": {
            "render_layer": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/RenderOutputEnumBlender"
                  },
                  {
                     "$ref": "#/$defs/RenderOutputEnumUnreal"
                  }
               ],
               "description": "Render layer of the render pass.",
               "title": "Render Layer"
            },
            "image_format": {
               "allOf": [
                  {
                     "$ref": "#/$defs/ImageFileFormatEnum"
                  }
               ],
               "description": "Image format of the render pass."
            }
         },
         "required": [
            "render_layer",
            "image_format"
         ],
         "title": "RenderPass",
         "type": "object"
      }
   },
   "required": [
      "map_path",
      "sequence_path",
      "output_path",
      "resolution",
      "render_passes"
   ]
}

Fields:
field anti_aliasing: AntiAliasSetting = AntiAliasSetting(enable=False, override_anti_aliasing=False, spatial_samples=8, temporal_samples=8, warmup_frames=0, render_warmup_frame=False)

Anti aliasing setting of the render job.

field console_variables: Dict[str, float] = {'r.MotionBlurQuality': 0}

Additional console variables of the render job. Ref to What is console_variables for details.

field export_audio: bool = False

Whether to export audio of the render job.

field file_name_format: str = '{sequence_name}/{render_pass}/{camera_name}/{frame_number}'

File name format of the render job.

field map_path: str [Required]

Map path of the render job.

field output_path: str | Path [Required]

Output path of the render job.

field render_passes: List[RenderPass] [Required]

Render passes of the render job.

field resolution: Tuple[int, int] [Required]

Resolution of the images rendered by the render job.

field sequence_path: str [Required]

Sequence path of the render job.

pydantic model AntiAliasSetting[source]

Show JSON schema
{
   "title": "AntiAliasSetting",
   "type": "object",
   "properties": {
      "enable": {
         "default": false,
         "description": "Whether to enable anti aliasing.",
         "title": "Enable",
         "type": "boolean"
      },
      "override_anti_aliasing": {
         "default": false,
         "description": "Whether to override anti aliasing.",
         "title": "Override Anti Aliasing",
         "type": "boolean"
      },
      "spatial_samples": {
         "default": 8,
         "description": "Spatial samples of the anti aliasing.",
         "minimum": 1,
         "title": "Spatial Samples",
         "type": "integer"
      },
      "temporal_samples": {
         "default": 8,
         "description": "Temporal samples of the anti aliasing.",
         "minimum": 1,
         "title": "Temporal Samples",
         "type": "integer"
      },
      "warmup_frames": {
         "default": 0,
         "description": "Warmup frames in engine which would rendered before actual frame range. This is crucial when particle system (Niagara) is used.",
         "minimum": 0,
         "title": "Warmup Frames",
         "type": "integer"
      },
      "render_warmup_frame": {
         "default": false,
         "description": "Whether to render warmup frame of the anti aliasing.",
         "title": "Render Warmup Frame",
         "type": "boolean"
      }
   }
}

Fields:
  • enable (bool)

  • override_anti_aliasing (bool)

  • render_warmup_frame (bool)

  • spatial_samples (int)

  • temporal_samples (int)

  • warmup_frames (int)

field enable: bool = False

Whether to enable anti aliasing.

field override_anti_aliasing: bool = False

Whether to override anti aliasing.

field render_warmup_frame: bool = False

Whether to render warmup frame of the anti aliasing.

field spatial_samples: int = 8

Spatial samples of the anti aliasing.

Constraints:
  • ge = 1

field temporal_samples: int = 8

Temporal samples of the anti aliasing.

Constraints:
  • ge = 1

field warmup_frames: int = 0

Warmup frames in engine which would rendered before actual frame range. This is crucial when particle system (Niagara) is used.

Constraints:
  • ge = 0

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.