Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 2.22 KB

GeneratingIndividualAssets.md

File metadata and controls

44 lines (28 loc) · 2.22 KB

Generating Individual Assets

This tutorial will help you generate images, .blend files, or baked OBJ/USD/etc files for any asset of your choosing.

Example Commands

Shown are three examples of using our generate_individual_assets.py script to create images and .blend files. If you want to create asset files in another format (e.g. OBJ, FBX, USD) you should first generate blend files then use our docs to bake them to the format of your choosing.

mkdir outputs
python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f CoralFactory -n 8 --save_blend
python -m infinigen_examples.generate_individual_assets --output_folder outputs/seashells -f seashells -n 1 --save_blend
python -m infinigen_examples.generate_individual_assets --output_folder outputs/chunkyrock -f chunkyrock -n 1 --save_blend

Running the above commands will save images and .blend files into your outputs folder. You can customize what object is generated by changing the -f argument to the name of a different AssetFactory defined in the codebase (see the file tests/test_meshes_basic.txt for a partial list).

Please run python -m infinigen.tools.generate_individual_assets --help for a full list of commandline arguments.

Creating OBJ, USD, FBX and other file formats

You can use the --export flag to export each generated asset to a format of your choosing. Please see ExportingToExternalFileFormats for details and limitations regarding exporting.

Examples:

# Save a coral as an OBJ with texture maps
python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f CoralFactory -n 1 --render none --export obj

# Save a bush as OpenUSD 
python -m infinigen_examples.generate_individual_assets --output_folder outputs/bush -f BushFactory -n 1 --render none --export usdc

# See the full list of supported formats
python -m infinigen_examples.generate_individual_assets --help