urho3d工具

AssetImporter

加载开放资源导入库支持的各种三维格式(http://assimp.sourceforge.net/)并保存Urho3D模型、动画、材质和场景文件。有关支持的格式列表,请参阅http://assimp.sourceforge.net/main_features_formats.html.

Blender的另一种导出路径是使用Urho3D插件(https://github.com/reattiva/Urho3D-Blender).

用法:

AssetImporter <command> <input file> <output file> [options]

Commands:

model       Output a model

anim        Output animation(s)

scene       Output a scene

node        Output a node and its children (prefab)

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

-j          Save scene in JSON format, default format is XML

-h          Generate hard instead of smooth normals if input has no normals

-i          Use local ID's for scene nodes

-l          Output a material list file for models

-na         Do not output animations

-nm         Do not output materials

-nt         Do not output material textures

-nc         Do not use material diffuse color value, instead output white

-nh         Do not save full node hierarchy (scene mode only)

-ns         Do not create subdirectories for resources

-nz         Do not create a zone and a directional light (scene mode only)

-nf         Do not fix infacing normals

-ne         Do not save empty nodes (scene mode only)

-mb <x>     Maximum number of bones per submesh. Default 64

-p <path>   Set path for scene resources. Default is output file path

-r <name>   Use the named scene node as root node

-f <freq>   Animation tick frequency to use if unspecified. Default 4800

-o          Optimize redundant submeshes. Loses scene hierarchy and animations

-s <filter> Include non-skinning bones in the model's skeleton. Can be given a

            case-insensitive semicolon separated filter list. Bone is included

            if its name contains any of the filters. Prefix filter with minus

            sign to use as an exclude. For example -s "Bip01;-Dummy;-Helper"

-t          Generate tangents

-v          Enable verbose Assimp library logging

-eao        Interpret material emissive texture as ambient occlusion

-cm         Check and do not overwrite if material exists

-ct         Check and do not overwrite if texture exists

-ctn        Check and do not overwrite if texture has newer timestamp

-am         Export all meshes even if identical (scene mode only)

-bp         Move bones to bind pose before saving model

-split <start> <end> (animation model only)

            Split animation, will only import from start frame to end frame

-np         Do not suppress $fbx pivot nodes (FBX files only)

材质列表是一个文本文件,每行一个材质,保存在Urho3D模型旁边。场景编辑器使用它在为StaticModel、StaticModelGroup、AnimatedModel或Skybox组件设置新模型时自动应用导入的默认材质,也可以通过调用ApplyMaterialList()手动调用。如果不需要,可以安全地删除列表文件。

在模型或场景模式下,AssetImport实用程序还将自动将非骨架节点动画保存到输出文件目录中。

OgreImporter

加载OGRE.mesh.xml和.skeleton.xml文件,并将它们保存为Urho3D.mdl(模型)和.ani(动画)文件。有关其他3D格式和整个场景导入,请参见AssetImport。然而,该工具不能像这样完整地处理OGRE格式。

用法:

OgreImporter <input file> <output file> [options]

Options:

-l      Output a material list file

-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

-mb <x> Maximum number of bones per submesh, default 64

注意:在不同的模型中使用动画时,仅输出骨骼旋转可能会有所帮助,但如果已使用骨骼位置更改来实现效果,则动画可能会变得不那么生动。由于Urho3D没有专门尝试重新定位动画,因此在原本不适合的模型中使用动画可能会导致无法预测的残缺。

PackageTool

递归检查目录中的文件和子目录,并创建PackageFile。可以将包文件添加到ResourceCache中,并将其用作文件系统(只读)中的文件。可以选择使用LZ4压缩库压缩文件数据。

在Android上使用程序包文件时要小心,因为.apk本身已经是一个程序包,由于已经使用了压缩,任意查找可能会执行得很差。从实验上看,在Android上,压缩包可能是有利的,因为在这种情况下,.apk包可能会跳过自己的压缩,从而获得更好的搜索和读取性能。

包装:

PackageTool -p<options> <input directory name> <output package name> [base path]

Options:

  q - enable quiet mode

  c - enable LZ4 compression

Base path is an optional prefix that will be added to the file entries.

当PackageTool运行时,它将进入源目录,然后查找子目录和任何文件。默认情况下,包内的路径将相对于源目录,但如果需要额外的路径前缀,则可以通过可选的基本路径参数指定。

例如,这会将Urho3D Data目录中的所有资源文件转换为名为Data.pak的包(从bin目录执行命令)

  PackageTool -pcq Data Data.pak"

-c选项启用文件上的LZ4压缩。q选项允许在不向标准输出流发送输出的情况下执行操作。

开箱:

   PackageTool -u<options> <input package name> <output directory name>

  Options:

    q - enable quiet mode

例如

   PackageTool -uq CoreData.pak CoreData

打印信息:

    PackageTool -<mode> <package name>

    Modes:

    i - print package file information

    l - print file names (including their paths) contained in the package

    L - similar to l but also output compression ratio (compressed package file only)

例如:

    PackageTool -i CoreData.pak

RampGenerator

创建用于灯光衰减和聚光灯光斑形状的1D和2D渐变纹理。或者从.ies输入文件烘焙图像。 hōng bèi

用法:        

  RampGenerator <output file> <width> <power> [dimensions]

RampGenerator <input file> <output png file> <width> [dimensions]

输出以PNG格式保存。功率参数被输入到pow()函数以确定斜坡形状;值越高,边缘处的亮度越高,褪色越突然。

SpritePacker

获取一系列图像并将其打包到单个纹理中,然后创建一个sprite sheet xml文件。

用法:

   SpritePacker -options <input file> <input file> <output png file>

Options:

    -h Shows this help message.

    -px Adds x pixels of padding per image to width.

    -py Adds y pixels of padding per image to height.

    -ox Adds x pixels to the horizontal position per image.

    -oy Adds y pixels to the horizontal position per image.

    -frameHeight Sets a fixed height for image and centers within frame.

    -frameWidth Sets a fixed width for image and centers within frame.

    -trim Trims excess transparent space from individual images offsets by frame size.

    -xml 'path' Generates an SpriteSheet xml file at path.

    -debug Draws allocation boxes on sprite.

脚本编译器

将AngelScript文件编译为二进制字节码,以加快加载速度。还可以以Doxygen格式转储脚本API。

用法    

ScriptCompiler <input file> [resource path for includes]

ScriptCompiler -dumpapi <Doxygen output file> [C header output file]

输出文件以.asc(编译的AngelScript.)扩展名保存。二进制文件不会自动加载,而不是文本格式(.as)脚本文件,而是对象中的资源请求和资源引用需要指向编译的文件。在应用程序的最终构建中,简单地用编译的脚本替换文本格式的脚本文件可能很方便。

脚本API转储模式可用于替换“Docs”目录中的“ScriptAPI.dox”文件。如果未提供输出文件名,则脚本API将被转储到标准输出(控制台)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乘小舟舟,游大世界

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值