This feature allows to ask the model to generate scenes using available prefabs.
The configured language model is used for Python code generation that manipulates prefabs through the interface available in Python Editor Bindings.
NOTE: The available system prompt has been prepared for strong Claude models. It is useful to adjust the prompt (e.g. add examples) for other, especially weaker models. For best results Claude Sonnet 3.5 is recommended.
The setup procedure is the same as described in this section. Select Scene Generation (Python)
feature in the 12. step.
For this feature, it is also necessary to make some adjustments:
- in the 8. step increase the
Max tokens to sample
parameter to a large value as the responses containing code can be quite long. For example, for Claude models useMax tokens to sample=4096
. - (if you are using Anthropic API): in the 10. step (AI Service Provider configuration) increase
Request timeout (ms)
to a large value, e.g. 30000ms (30s). Large models like Opus (which are recommended for this feature) can sometimes response quite slowly.
The feature is currently configured (with prefabs.yaml
file) to use prefabs available in WarehouseAssets. Thus, the WarehouseAssets gem must be enabled in the project.
cd <o3de-directory>
scripts/o3de.sh
scripts/o3de.sh register -gp <o3de-extras>/Gems/WarehouseAssets
scripts/o3de.sh enable-gem -pp <project name> -gp <o3de-extras>/Gems/WarehouseAssets
Example questions
- Create a warehouse with several rows of various racks
- Remove small racks
- Move the racks closer to the wall
- Create the same warehouse next to the existing one
NOTE: The more specifc the request is, the better the results will be. For example, instead of asking to create a warehouse, ask to create a warehouse with a specific number of rows and racks.
- Only prefabs from the
WarehouseAssets
gem are available - Currently the model can not rotate objects in the scene
- Prompts for smaller/weaker models may need to be adjusted