infinigen
infinigen copied to clipboard
[BUG] how to create some creatures with this codebase
Could you kindly provide some guide? I would like to know how to get the results from "Figure 12. Creature Generation" in your paper?
I also have this question.
Your best bet to produce samples (renders or blendfiles) of any specific asset type is to use our tools/asset_grid.py
script. Better tutorials for this are in the works, but you should be able to do the following provided the repo is installed correctly:
cd worldgen
../blender/blender --background -noaudio --python tools/asset_grid.py -- -f CarnivoreFactory -n 10 -r 1024x1024 -s 10
You should be able to swap -f CarnivoreFactory
for any subclass of AssetFactory you find in the codebase, including the other creatures defined in the assets/creatures/genomes folder.
If you want to use the code directly from a blender python script, you can do something like the following. This also allows you more control via kwargs over whether you want rigging, animation, fur, materials, etc.
from assets.creatures.genomes.fish import FishFactory
fac = FishFactory(factory_seed=0)
asset = fac.spawn_asset(0)
Thank you for your answer. And I would like to know how to generate a specified creature like a tiger and adjust the size of ears, rather than randomly generating a creature by a seed?
At the moment, adjusting specific creature parameters requires writing/editing python code, there isnt a convinient commandline option yet. Particularly, on this line, you could add some overrides corrresponding to the keys of this dictionary, eg you could edit the line to say:
ear_fac = parts.head_detail.CatEar({'length_rad1_rad2': (0.25, 0.1, 0})
This line would fix the length, starting width and ending width to the specified values.