Scene Converter

Scene Converter

Der Scene Converter ist ein Kommandozeilen-Tool.

Verwendung

scene_converter <param 1> <param 2> ...

Beispiel:

scene_converter.exe -c scene_config.xml -lv -a "fbxName=original/%1.fbx" -a "outPath=converted/" -a "imageNormal=default/default_normal.png" -a "imageSpecular=default/default_specular.png"

Beschreibung

  • --config oder -c, optional, mehrfach möglich : XML-Konfigurationsdatei.
  • --attribute or -a, optional, multiple : Attribut für die Verwendung in der XML Datei (attribute="{}")
  • --analyze oder -z, optional : Dateiname der Szene die analysiert werden soll. Kann nicht gemeinsam mit dem --config Parameter verwendet werden.
  • --quiet oder -q, optional, Switch : Ausgabe von Informationen unterdrücken.
  • --debug oder -d, optional, Switch : Debug-Informationen ausgeben.
  • --launch_viewer oder -lv, optional, switch : Szene nach erfolgreicher Konvertierung im Szenen-Viewer anzeigen.

XML-Konfigurationsdatei

Die Konfigurationsdatei ist eine Standard-XML-Datei und sollte wie folgt beginnen:

  • <?xml version="1.0" encoding="utf-8"?>

Erlaubte XML Tags:

  • <SceneConverter> An XML scene converter file is recognized by its <SceneConverter> root element.
    Attributes and child tags:
    • pathName String,
    • <InputPackage> Input package description and properties.
      Attributes and child tags:
      • fileName String,
    • <InputProperties> Input properties description and properties.
      Attributes and child tags:
      • id String,
      • <ImageLocation> ImageLocation.
        Attributes and child tags:
        • pathName String,
      • <Material> Material replacement.
        Attributes and child tags:
        • createWithId String,
        • createWithGraphNodeId String,
        • createWithSlot SInt32,
        • findIdMatchingPattern String,
        • replaceWithGraphNodeId String,
        • replaceWithSlot SInt32,
        • replaceWithMaterialSlot SInt32,
        • replaceWithTextureSlot SInt32,
        • replaceWithParametersSlot SInt32,
        • replaceWithShaderResourceIdPattern String,
        • ignore Bool, default NO
        • ambientColor Color,
        • diffuseColor Color,
        • specularColor Color,
        • emissiveColor Color,
        • shininess Double,
        • bumpScale Real, default 0.0
        • blendMode Murl::IEnums::BlendMode,
        • lightingEnabled Bool, default NO
        • coloringEnabled Bool, default YES
        • canBeMerged Bool, default YES
        • replaceWithVertexShaderResourceIdPattern String,
        • replaceWithFragmentShaderResourceIdPattern String,
        • <Texture> Texture.
          Attributes and child tags:
      • <Texture> Texture.
        Attributes and child tags:
        (see above)
      • <Clip> Clip description and properties.
        Attributes and child tags:
        • createWithId String,
        • findIdMatchingPattern String,
        • replaceWithId String,
        • duration Double,
        • <Skeleton> Skeleton description and properties.
          Attributes and child tags:
          • sourceSkeletonId String,
          • sourceClipId String,
          • sourcePoseId String,
          • destinationPoseId String,
          • <Constraint> Constraint description and properties.
            Attributes and child tags:
            • nodeId String,
            • minX Double,
            • maxX Double,
            • minY Double,
            • maxY Double,
            • minZ Double,
            • maxZ Double,
        • <MorphTarget> MorphTarget description and properties.
          Attributes and child tags:
          • sourceMorphTargetId String,
          • keyFrameFileName String,
          • keyFrameFilePath String,
      • <Node> Node description and properties.
        Attributes and child tags:
        • createWithId String,
        • findIdMatchingPattern String,
        • responseGroups MurlMaskUInt32,
        • flatten Bool, default NO
        • rotateX Angle,
        • rotateY Angle,
        • rotateZ Angle,
        • translateX Double,
        • translateY Double,
        • translateZ Double,
        • indexType Murl::IEnums::IndexType,
      • <Mesh> Mesh description and properties.
        Attributes and child tags:
        • findIdMatchingPattern String,
        • findMaterialIdMatchingPattern String,
        • replaceWithId String,
        • ignore Bool, default NO
        • translateU Double, default 0.0
        • translateV Double, default 0.0
        • scaleU Double, default 1.0
        • scaleV Double, default 1.0
    • <InputImage> Input image description and properties.
      Attributes and child tags:
    • <InputScene> Input scene description and properties.
      Attributes and child tags:
      • id String,
      • fileName String,
      • pathName String,
      • maxVertexCount SInt32,
      • maxIndexCount SInt32,
      • optimizeGraph Bool,
      • splitVertices Bool,
      • maxBoneCount SInt32,
      • maxBoneWeights SInt32,
      • normalSmoothLimit Angle,
      • tangentSmoothLimit Angle,
      • translateX Double,
      • translateY Double,
      • translateZ Double,
      • rotateX Angle,
      • rotateY Angle,
      • rotateZ Angle,
      • colorAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • normalAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • tangentAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • boneWeightAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction0 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX0 Double, default 0.0
      • texCoordModuloY0 Double, default 0.0
      • texCoordAction1 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX1 Double, default 0.0
      • texCoordModuloY1 Double, default 0.0
      • texCoordAction2 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX2 Double, default 0.0
      • texCoordModuloY2 Double, default 0.0
      • texCoordAction3 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX3 Double, default 0.0
      • texCoordModuloY3 Double, default 0.0
      • texCoordAction4 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX4 Double, default 0.0
      • texCoordModuloY4 Double, default 0.0
      • texCoordAction5 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX5 Double, default 0.0
      • texCoordModuloY5 Double, default 0.0
      • texCoordAction6 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX6 Double, default 0.0
      • texCoordModuloY6 Double, default 0.0
      • texCoordAction7 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordModuloX7 Double, default 0.0
      • texCoordModuloY7 Double, default 0.0
      • scale Double,
      • scaleX Double,
      • scaleY Double,
      • scaleZ Double,
      • <ImageLocation> ImageLocation.
        Attributes and child tags:
        (see above)
      • <Material> Material replacement.
        Attributes and child tags:
        (see above)
        • <Texture> Texture.
          Attributes and child tags:
          (see above)
      • <Texture> Texture.
        Attributes and child tags:
        (see above)
      • <Clip> Clip description and properties.
        Attributes and child tags:
        (see above)
        • <Skeleton> Skeleton description and properties.
          Attributes and child tags:
          (see above)
          • <Constraint> Constraint description and properties.
            Attributes and child tags:
            (see above)
        • <MorphTarget> MorphTarget description and properties.
          Attributes and child tags:
          (see above)
      • <Node> Node description and properties.
        Attributes and child tags:
        (see above)
      • <Mesh> Mesh description and properties.
        Attributes and child tags:
        (see above)
      • <SkeletonSplit> SkeletonSplit description and properties.
        Attributes and child tags:
        • boneId String,
      • <Properties> Properties description and properties.
        Attributes and child tags:
        • sourcePropertiesId String,
    • <InputPose> Input pose description and properties.
      Attributes and child tags:
      • id String,
      • fileName String,
      • pathName String,
      • maxVertexCount SInt32,
      • maxIndexCount SInt32,
      • <Node> Node description and properties.
        Attributes and child tags:
        (see above)
      • <Mesh> Mesh description and properties.
        Attributes and child tags:
        (see above)
      • <Properties> Properties description and properties.
        Attributes and child tags:
        (see above)
    • <InputSkeleton> Input skeleton description and properties.
      Attributes and child tags:
      • id String,
      • fileName String,
      • pathName String,
      • maxVertexCount SInt32,
      • maxIndexCount SInt32,
      • <Node> Node description and properties.
        Attributes and child tags:
        (see above)
      • <Mesh> Mesh description and properties.
        Attributes and child tags:
        (see above)
      • <Properties> Properties description and properties.
        Attributes and child tags:
        (see above)
    • <InputMorphTarget> Input morph target description and properties.
      Attributes and child tags:
      • id String,
      • fileName String,
      • pathName String,
      • maxVertexCount SInt32,
      • maxIndexCount SInt32,
      • colorAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • normalAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • tangentAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • boneWeightAction Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction0 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction1 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction2 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction3 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction4 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction5 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction6 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • texCoordAction7 Murl::IEnums::ComponentActionSceneConverter, default DEFAULT
      • <Node> Node description and properties.
        Attributes and child tags:
        (see above)
      • <Mesh> Mesh description and properties.
        Attributes and child tags:
        (see above)
      • <Properties> Properties description and properties.
        Attributes and child tags:
        (see above)
    • <OutputPackage> Output package description and properties.
      Attributes and child tags:
      • fileName String,
      • packageId String,
      • staticInstanceParentId String,
      • createStaticInstance Bool, default YES
      • createFolders Bool, default NO
      • removeUnused Bool, default NO
      • <GraphInstance> Graph Instance description and porperties
        Attributes and child tags:
        • graphId String,
        • filePrefix String,
        • rootNodeId String,
        • generateMeshes Bool, default NO
        • generateColliders Bool, default NO
        • generateShadows Bool, default NO
        • generateTriangleStrips Bool, default NO
        • useCpuSkinning Bool, default NO
        • vertexCacheSize UInt32, default 16
        • maxNumberOfLightStages UInt32, default 1
        • shadowMaterialSlot UInt32, default 0
        • shadowVolumeGenerationMode Murl::IEnums::ShadowVolumeGenerationMode, default DEFAULT
        • shadowFacesToExtrude Murl::IEnums::PolygonFaces, default BACK_ONLY
        • <IncludedNode> IncludedNode description and properties.
          Attributes and child tags:
          • findIdMatchingPattern String,
        • <ExcludedNode> ExcludedNode description and properties.
          Attributes and child tags:
          • findIdMatchingPattern String,

XML Beispiel

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 Spraylight GmbH -->

<SceneConverter xmlns="http://murlengine.com" sceneId="Scene" ignoreFiles="no" translateX="0" translateY="0" translateZ="0" rotateX="0d" rotateY="0d" rotateZ="0d" scale="1" outPath="../packages/" packageName="bf110mp">

    <InputPackage fileName="../packages/materials.murlres"/>

    <InputScene id="{sceneId}" fileName="bf110/bf110.obj"
        translateX="{translateX}" translateY="{translateY}" translateZ="{translateZ}"
        rotateX="{rotateX}" rotateY="{rotateY}" rotateZ="{rotateZ}"
        scale="{scale}">

        <ImageLocation pathName="./bf110"/> 
        
        <Material findIdMatchingPattern="*"
            replaceWithGraphNodeId="/myMaterial/mat_color_light_texture"
        />
        <Material findIdMatchingPattern="transparent*"
            replaceWithGraphNodeId="/myMaterial/mat_color_alpha"
        />
        <Material findIdMatchingPattern="transparent*"
            replaceWithGraphNodeId="/myMaterial/mat_color_light_alpha_twopass"
            ambientColor="0.0f,0f,0.5f,1f"
        />

    </InputScene>

    <OutputPackage fileName="{outPath}{packageName}" packageId="{packageName}" createFolders="yes">
        <GraphInstance graphId="GraphInstance" filePrefix="graph_instance" generateMeshes="yes"/>
    </OutputPackage>

</SceneConverter>


Copyright © 2011-2018 Spraylight GmbH.