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, defaultNO
ambientColor
Color,diffuseColor
Color,specularColor
Color,emissiveColor
Color,shininess
Double,bumpScale
Real, default0.0
blendMode
Murl::IEnums::BlendMode,lightingEnabled
Bool, defaultNO
coloringEnabled
Bool, defaultYES
canBeMerged
Bool, defaultYES
replaceWithVertexShaderResourceIdPattern
String,replaceWithFragmentShaderResourceIdPattern
String,<Texture>
Texture.
Attributes and child tags:
findIndex
SInt32,findFileNameMatchingPattern
String,createWithFileName
String,createWithImageId
String,createWithTextureId
String,createWithSlot
SInt32,replaceWithFileName
String,replaceWithImageId
String,replaceWithGraphNodeId
String,replaceWithSlot
SInt32,sizeX
UInt32,sizeY
UInt32,flipX
Bool,flipY
Bool,rotation
Murl::IEnums::Orientation,ignore
Bool, defaultNO
srgb
Bool,semantic.r
Murl::IEnums::TextureSemantic,semantic.g
Murl::IEnums::TextureSemantic,semantic.b
Murl::IEnums::TextureSemantic,semantic.a
Murl::IEnums::TextureSemantic,
<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, defaultNO
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, defaultNO
translateU
Double, default0.0
translateV
Double, default0.0
scaleU
Double, default1.0
scaleV
Double, default1.0
<InputImage>
Input image description and properties.
Attributes and child tags:
id
String,fileName
String,sizeX
UInt32,sizeY
UInt32,flipX
Bool,flipY
Bool,rotation
Murl::IEnums::Orientation,srgb
Bool,<Map>
Map description and properties.
Attributes and child tags:
sourceImageId
String,sourceComponent
Murl::IEnums::ColorComponent,destinationComponent
Murl::IEnums::ColorComponent,
<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, defaultDEFAULT
normalAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
tangentAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
boneWeightAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction0
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX0
Double, default0.0
texCoordModuloY0
Double, default0.0
texCoordAction1
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX1
Double, default0.0
texCoordModuloY1
Double, default0.0
texCoordAction2
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX2
Double, default0.0
texCoordModuloY2
Double, default0.0
texCoordAction3
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX3
Double, default0.0
texCoordModuloY3
Double, default0.0
texCoordAction4
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX4
Double, default0.0
texCoordModuloY4
Double, default0.0
texCoordAction5
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX5
Double, default0.0
texCoordModuloY5
Double, default0.0
texCoordAction6
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX6
Double, default0.0
texCoordModuloY6
Double, default0.0
texCoordAction7
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordModuloX7
Double, default0.0
texCoordModuloY7
Double, default0.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, defaultDEFAULT
normalAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
tangentAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
boneWeightAction
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction0
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction1
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction2
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction3
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction4
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction5
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction6
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
texCoordAction7
Murl::IEnums::ComponentActionSceneConverter, defaultDEFAULT
<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, defaultYES
createFolders
Bool, defaultNO
removeUnused
Bool, defaultNO
<GraphInstance>
Graph Instance description and porperties
Attributes and child tags:
graphId
String,filePrefix
String,rootNodeId
String,generateMeshes
Bool, defaultNO
generateColliders
Bool, defaultNO
generateShadows
Bool, defaultNO
generateTriangleStrips
Bool, defaultNO
useCpuSkinning
Bool, defaultNO
vertexCacheSize
UInt32, default16
maxNumberOfLightStages
UInt32, default1
shadowMaterialSlot
UInt32, default0
shadowVolumeGenerationMode
Murl::IEnums::ShadowVolumeGenerationMode, defaultDEFAULT
shadowFacesToExtrude
Murl::IEnums::PolygonFaces, defaultBACK_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
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <? 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 > |