Skip to content

Commit

Permalink
Merge pull request #96 from ynput/update_blender_user_guide
Browse files Browse the repository at this point in the history
Updated Blender documentation
  • Loading branch information
simonebarbieri authored Nov 30, 2023
2 parents 2ac266c + 365a231 commit 4b66ada
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 60 deletions.
94 changes: 34 additions & 60 deletions website/docs/addon_blender_artist.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,108 +46,84 @@ other convention.
Now create **Model instance** from it to let AYON know what in the scene you want to
publish. Go **AYON → Create... → Model**.

![Model create instance](assets/blender-model_create_instance.jpg)
![Model create instance](assets/blender-model_create_instance.png)

`Asset` field is a name of asset you are working on - it should be already filled
with correct name as you've started Blender or switched context to specific asset. You
can edit that field to change it to different asset (but that one must already exists).
See [Variant](artist_concepts.md#variant) and [Product](artist_concepts.md#product)
for more detail on what they are and how they are used in AYON.

`Product` field is a name you can decide on. It should describe what kind of data you
have in the model. For example, you can name it `Proxy` to indicate that this is
low resolution stuff. See [Product](artist_concepts.md#product).

<!-- :::note LOD support
By changing product name you can take advantage of _LOD support_ in AYON. Your
asset can contain various resolution defined by different products. You can then
switch between them very easy using [Inventory (Manage)](artist_tools_inventory).
There LODs are conveniently grouped so they don't clutter Inventory view.
Name your product like `main_LOD1`. Important part is that `_LOD1`. You can have as many LODs as you need.
::: -->

Read-only field just under it show final product name, adding product field to
name of the group you have selected.

`Use selection` checkbox will use whatever you have selected in Outliner to be
`Use selection` toggle will use whatever you have selected in Outliner to be
wrapped in Model instance. This is usually what you want. Click on **Create** button.

You'll notice then after you've created new Model instance, there is a new
collection in Outliner called after your asset and product, in our case it is
`character1_modelDefault`. The assets selected when creating the Model instance
collection in Outliner called after your product and variant, in our case it is
`/assets/props/suzanne_modelMain`. The assets selected when creating the Model instance
are linked in the new collection.

And that's it, you have your first model ready to publish.

Now save your scene (if you didn't do it already). You will notice that path
in Save dialog is already set to place where scenes related to modeling task on
your asset should reside. As in our case we are working on asset called
**character1** and on task **modeling**, path relative to your project directory will be
`project_XY/assets/character1/work/modeling`. The default name for the file will
be `project_XY_asset_task_version`, so in our case
`simonetest_character1_modeling_v001.blend`. Let's save it.
your asset should reside. As in our case we are working on product called
**suzanne** and on task **modeling**, path relative to your project directory will be
`project_XY/assets/props/suzanne/work/modeling`. The default name for the file will
be `project_XY_product_task_version`, so in our case
`test_suzanne_modeling_v001.blend`. Let's save it.

![Model create instance](assets/blender-save_modelling_file.jpg)
![Model create instance](assets/blender-save_modelling_file.png)

### Publishing models

Now let's publish it. Go **AYON → Publish...**. You will be presented with following window:

![Model publish](assets/blender-model_pre_publish.jpg)
![Model publish](assets/blender-model_pre_publish.png)

Note that content of this window can differs by your pipeline configuration.
For more detail see [Publisher](artist_tools_publisher).

Items in left column are instances you will be publishing. You can disable them
by clicking on square next to them. White filled square indicate they are ready for
publishing, red means something went wrong either during collection phase
or publishing phase. Empty one with gray text is disabled.
by clicking on the toggle next to them.

See that in this case we are publishing from the scene file
`simonetest_character1_modeling_v001.blend` the Blender model named
`character1_modelDefault`.
See that in this case we are publishing the Blender model named
`modelMain` and the workfile `workfileModeling` (its instance is generated
automatically for any workfile).

Right column lists all tasks that are run during collection, validation,
extraction and integration phase. White items are optional and you can disable
them by clicking on them.
On the right side, you can enable or disable optional validators or extractors
for the selected instance.

Lets do dry-run on publishing to see if we pass all validators. Click on flask
icon at the bottom. Validators are run. Ideally you will end up with everything
green in validator section.
Lets do dry-run on publishing to see if we pass all validators. Click on the filter
icon at the bottom next to the "Publish" button. Validators are run.

### Fixing problems

For the sake of demonstration, I intentionally kept the model in Edit Mode, to
trigger the validator designed to check just this.

![Failed Model Validator](assets/blender-model_publish_error.jpg)
![Failed Model Validator](assets/blender-model_publish_error.png)

You can see our model is now marked red in left column and in right we have
red box next to `Mesh is in Object Mode` validator.
The report tab in the publisher window shows us that we have problem with
validator `Validate Object Mode`.

You can click on arrow next to it to see more details:

![Failed Model Validator details](assets/blender-model_error_details.jpg)

From there you can see in **Records** entry that there is problem with the
From there you can see that there is problem with the
object `Suzanne`. Some validators have option to fix problem for you or just
select objects that cause trouble. This is the case with our failed validator.

In main overview you can notice little A in a circle next to validator
name. Right click on it and you can see menu item `select invalid`. This
On top you can see a button `Select Invalid`. This
will select offending object in Blender.

Fix is easy. Without closing Publisher window we just turn back the Object Mode.
Then we need to reset it to make it notice changes we've made. Click on arrow
circle button at the bottom and it will reset the Publisher to initial state. Run
validators again (flask icon) to see if everything is ok.
validators again (filter icon) to see if everything is ok.

It should OK be now. Write some comment if you want and click play icon button
when ready.
It should OK be now. Click the Publish button when ready.

Publish process will now take its course. Depending on data you are publishing
it can take a while. You should end up with everything green and message
**Finished successfully ...** You can now close publisher window.
it can take a while. You should end up in the report tab of the publisher window,
with a success message and information about published data.

![Success Publish](assets/blender-model_publish_success.png)

You can now close publisher window.
To check for yourself that model is published, open
[Asset Loader](artist_tools_loader) - **AYON → Load...**.
There you should see your model, named `modelDefault`.
Expand Down Expand Up @@ -182,9 +158,7 @@ the `Geometry` Collection.
When you've prepared your hierarchy, it's time to create *Rig instance* in AYON.
Select your whole rig hierarchy and go **AYON → Create...**. Select **Rig**.

![Blender - Rig Hierarchy Example](assets/blender-rig_create.jpg)

A new collection named after the selected Asset and Product should have been created.
A new collection named after the selected Product and Variant should have been created.
In our case, it is `character1_rigDefault`. All the selected armature and models
have been linked in this new collection. You should end up with something like
this:
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/docs/assets/blender-model_error_details.jpg
Binary file not shown.
Binary file removed website/docs/assets/blender-model_pre_publish.jpg
Binary file not shown.
Binary file added website/docs/assets/blender-model_pre_publish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/docs/assets/blender-model_publish_error.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed website/docs/assets/blender-save_modelling_file.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4b66ada

Please sign in to comment.