主要内容

actorMeshSettings

R2026b

Mesh file options for ASAM OpenSCENARIO export of actors in scenario

Since R2026b

    Description

    The actorMeshSettings object specifies options for exporting mesh files (3D models) for the actors in a scenario when exporting your scenario to an ASAM OpenSCENARIO® XML format. The mesh files define the shape, structure, and surface details of actors. You can choose to export the actor meshes to various formats based on the simulator you are using to improve interoperability. You can export new mesh files in a selected format to create a self-contained and portable scenario, or reference existing project assets to avoid duplication and maintain consistency.

    Creation

    Description

    meshOps = actorMeshSettings creates a default actor mesh settings configuration object.

    meshOps = actorMeshSettings(PropertyName=Value) specifies properties using one or more name-value arguments.

    example

    Properties

    expand all

    Option to export mesh files for the actors in a scenario when exporting the scenario to an ASAM OpenSCENARIO XML format, specified as one of these options:

    • "Unspecified" — No mesh export specified.

    • "New" — Export mesh files for the actors in the scenario.

    • "ReferenceProjectAssets" — Refer to an existing actor mesh file.

    For more details on where the new files are exported or referenced, see the Actor mesh settings option on Export to ASAM OpenSCENARIO XML (RoadRunner Scenario) page.

    Mesh file format to export when exporting a scenario to an ASAM OpenSCENARIO XML format, specified as one of these options:

    • "Unspecified" — No mesh format specified.

    • "GLTF" — Export actor mesh files to the glTF (.gltf) format.

    • "FBX" — Export actor mesh files to the Filmbox (.fbx) format.

    • "OSGB" — Export actor mesh files to the OpenSceneGraph (.osgb) mesh format.

    Examples

    collapse all

    When you export your RoadRunner scenario, you can specify options for exporting mesh files for the actors in the scenario by using the actorMeshSettings object.

    Create a roadrunner object, specifying the path to an existing project. For example, this code shows the path to a project, on a Windows® machine, located at "C:\RR\MyProject". This code assumes that RoadRunner is installed in the default location, and returns an object, rrApp, that provides functions for performing basic tasks such as opening, closing, and saving scenes and projects.

    rrApp = roadrunner(ProjectFolder="C:\RR\MyProject");

    Open an existing scenario in RoadRunner Scenario by using the openScenario function with the roadrunner object rrApp and the filename of the specific scenario that you want to open.

    filename = "TrajectoryCutIn.rrscenario";
    openScenario(rrApp,filename)

    Create an actorMeshSettings object that specifies to export new mesh files for the actors in the scenario to the Filmbox (.fbx) format.

     meshOps = actorMeshSettings(ActorMeshExport="New",MeshFormat="FBX");

    Assign the meshOps object to the ActorMeshSettings property of an openScenarioXMLExportOptions object. Now, export your scenario using the exportScenario function, specifying the openScenarioXMLExportOptions object as input. For more information on exporting your scenario with MATLAB®, see exportScenario.

    filename = "TrajectoryCutIn.rrscenario.xosc";
    formatname = "OpenSCENARIO XML";
    options = openScenarioXMLExportOptions(ActorMeshSettings=meshOps);
    exportScenario(rrApp,filename,formatname,options)

    Version History

    Introduced in R2026b