Urho3D
|
Loads various 3D formats supported by Open Asset Import Library (http://assimp.sourceforge.net/) and saves Urho3D model, animation, material and scene files out of them. For the list of supported formats, look at http://assimp.sourceforge.net/main_features_formats.html.
Usage:
AssetImporter <command> <input file> <output file> [options] Commands: model Output a model scene Output a scene dump Dump scene node structure. No output file is generated lod Combine several Urho3D models as LOD levels of the output model Syntax: lod <dist0> <mdl0> <dist1 <mdl1> ... <output file> Options: -b Save scene in binary format, default format is XML -i Use local ID's for scene nodes -mX Output a material list file X (model mode only) -na Do not output animations -nm Do not output materials -ns Do not create subdirectories for resources -nz Do not create a zone and a directional light (scene mode only) -pX Set path X for scene resources. Default is output file path -rX Use scene node X as root node -t Generate tangents to model(s)
Loads OGRE .mesh.xml and .skeleton.xml files and saves them as Urho3D .mdl (model) and .ani (animation) files. For other 3D formats and whole scene importing, see AssetImporter instead. However that tool does not handle the OGRE formats as completely as this.
Usage:
OgreImporter <input file> <output file> [options] Options: -na Do not output animations -nm Do not output morphs -r Output only rotations from animations -s Split each submesh into own vertex buffer -t Generate tangents
Note: outputting only bone rotations may help when using an animation in a different model, but if bone position changes have been used for effect, the animation may become less lively. Unpredictable mutilations might result from using an animation in a model not originally intended for, as Urho3D does not specifically attempt to retarget animations.
Examines a directory recursively for files and subdirectories and creates a PackageFile. The package file can be added to the ResourceCache and used as if the files were on a (read-only) filesystem.
Usage:
PackageTool <directory to process> <package name> [basepath]
When PackageTool runs, it will go inside the source directory, then look for subdirectories and any files. Paths inside the package will by default be relative to the source directory, but if an extra path prefix is desired, it can be specified by the optional basepath argument.
For example, this would convert all the resource files inside the Urho3D Data directory into a package called Data.pak (execute the command from the Bin directory)
PackageTool Data Data.pak
Creates 1D and 2D ramp textures for use in light attenuation and spotlight spot shapes.
Usage:
RampGenerator <output file> <width> <power> [dimensions]
The output is saved in PNG format. The power parameter is fed into the pow() function to determine ramp shape; higher value gives more brightness and more abrupt fade at the edge.
The texconv tool from the DirectX SDK needs to be available through the system PATH.
Compiles HLSL shaders using an XML definition file that describes the shader permutations, and their associated HLSL preprocessor defines.
The output consists of shader bytecode for each permutation, as well as information of the constant parameters and texture units used. See Binary shader format for details.
Usage:
ShaderCompiler <definitionfile> [options] Options: -tVS|PS Compile only vertex or pixel shaders, by default compile both -vX Compile only the shader variation X -dX Add a define. Add SM3 to compile for Shader Model 3 -dDefine Add an arbitrary define Shader binaries will be output into the same directory as the definition file. Specify a wildcard to compile multiple shaders from the directory.
The D3DX library from the DirectX runtime or SDK needs to be installed. Note that when running in Direct3D9 mode, the engine will automatically invoke ShaderCompiler if it can not find a shader in binary form. Depending on shader complexity this can take a substantial amount of time. To avoid this, execute the file CompileAllShaders.bat in the Bin directory to precompile all shader permutations. It is also highly recommended to not ship ShaderCompiler with Urho3D applications, but to instead precompile all shaders. After precompiling you can delete all .hlsl files from the CoreData directory of the shipping build.
Note that GLSL shaders in the Bin/CoreData/Shaders/GLSL directory also use similar XML definition files, but no precompiling tool exists for them; they are always compiled during runtime.