Table Of Contents

Previous topic

25.6. json2json

Next topic

25.18. cgfx2json

This Page

25.11. dae2json

25.11.1. Usage

Syntax

dae2json [options] -i source.dae -o target.json

Convert Collada (.dae) files into a Turbulenz JSON asset. dae2json is based on the Collada specification http://www.khronos.org/files/collada_spec_1_5.pdf.

The engine uses Y up convention. There is some support for conversion from X and Z up but modeling with Y up is recommended.

25.11.2. Options

This tool uses the Standard Asset Tool Options.

Added SDK 0.25.0

--nvtristrip=NVTRISTRIP

Path to NvTriStripper, setting this enables vertex cache optimizations.

25.11.3. Example

dae2json -v -m -i assets/models/duck.dae -o apps/sampleapp/models/duck.dae.json

25.12. obj2json

25.12.1. Usage

Syntax

obj2json [options] -i source.obj -o target.json

Convert Wavefront (.obj) files into a Turbulenz JSON asset.

25.12.2. Options

This tool uses the Standard Asset Tool Options.

25.12.3. Example

obj2json -v -m -i assets/models/watercan.obj -o samples/models/watercan.obj.json

Note

The tool does not have support for .mtl files yet, but expects any relevant materials to be declared in a .material file and included as a dependancy in deps.yaml

The tool sets the default node name of the asset parsed to be the file name (without the path), unless anything else is supplied. This could lead to clashes with other nodes with the same name.

Each surface is assumed to only have a single material. A new surface will be made upon requiring a new material.

25.13. material2json

25.13.1. Usage

Syntax

material2json [options] -i source.materials -o target.json

Convert Material Yaml (.material) files into a Turbulenz JSON asset.

25.13.2. Options

This tool uses the Standard Asset Tool Options.

25.13.3. Example

material2json -v -m -i assets/materials/defaults.material -o apps/sampleapp/materials/materials.json

25.14. effect2json

25.14.1. Usage

Syntax

effect2json [options] -i source.effects -o target.json

Convert Effect Yaml (.effect) files into a Turbulenz JSON asset.

25.14.2. Options

This tool uses the Standard Asset Tool Options.

25.14.3. Example

effect2json -v -m -i assets/effects/defaults.effect -o apps/sampleapp/effects/effects.json

25.15. bmfont2json

25.15.1. Usage

Syntax

bmfont2json [options] -i source.fnt -o target.json

Convert Bitmap Font Generator data (.fnt) files into a Turbulenz JSON asset. Only text .fnt files are supported.

25.15.2. Options

--version

Show version number and exit.

--help, -h

Show help message and exit.

--verbose, -v

Verbose output.

--silent, -s

Silent running

--metrics, -m

Output asset metrics

--log=OUTPUT_LOG

Write to log file

25.15.3. Asset Generation Options

--json_indent=SIZE, -j SIZE

JSON output pretty printing indent size, defaults to 0.

25.15.4. Asset Location Options

--prefix=URL, -p URL

Texture URL to prefix to all texture references.

--assets=PATH, -a PATH

PATH of the asset root.

25.15.5. File Options

--input=INPUT, -i INPUT

Input file to process.

--output=OUTPUT, -o OUTPUT

Output file to process.

25.15.6. Example

bmfont2json -v -i assets/fonts/opensans.fnt -o apps/sampleapp/fonts/opensans.json

25.16. maptool

25.16.1. Usage

Syntax

maptool [options] basemap.json

Adds profile entries to the overrides section of mapping table basemap.json and write the output to a file or stdout. See The MappingTable Object for further details.

25.16.2. Options

-o <outfile>

(optional) Write to a file (instead of stdout)

--profile <name>,<maptable.json>[,parent]

Add the table in maptable.json as a profile called name to the overrides section of basefile.json. The profile must not already exist in basefile.json. If parent is specified, the profile is specified as inheriting from the profile of that name. The parent profile must already exist in basefile.json or be added in the same invocation. This option can be used multiple times in the same invocation.

25.17. Standard Asset Tool Options

25.17.1. Options

--version

Show version number and exit.

--help, -h

Show help message and exit.

--verbose, -v

Verbose output.

--silent, -s

Silent running

--metrics, -m

Output asset metrics

--log=OUTPUT_LOG

Write to log file

25.17.2. Asset Generation Options

--json_indent=SIZE, -j SIZE

JSON output pretty printing indent size, defaults to 0.

--keep-unused-images

Keep images with no references to them.

--include-type=TYPE, -I TYPE

Only include objects of class TYPE in export.

--exclude-type=TYPE, -E TYPE

Exclude objects of class TYPE from export.

Note

Classes currently supported for include and exclude: geometries, nodes, animations, images, effects, materials, lights, physicsmaterials, physicsmodels and physicsnodes.

Warning

Using these options can create incomplete assets which require fixup at runtime.

25.17.3. Asset Location Options

--url=URL, -u URL

Asset URL to prefix to all asset references

--assets=PATH, -a PATH

PATH of the asset root.

--definitions=JSON_FILE, -d JSON_FILE

definition JSON_FILE to include in build, this option can be used repeatedly for multiple files

25.17.4. File Options

--input=INPUT, -i INPUT

Input file to process.

--output=OUTPUT, -o OUTPUT

Output file to process.