Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AYON USD Docs and Add AYON USD Resolver Docs #238

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions website/docs/addon_usd_admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
id: addon_usd_admin
title: USD Admin Docs
sidebar_label: USD
description: AYON USD Addon documentations for admins.
toc_max_heading_level: 5
---

import ReactMarkdown from "react-markdown";
Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_contribution_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_contribution_workflow
title: AYON USD Contribution Workflow
sidebar_label: Contribution Workflow
description: Automatically contribute products into USD assets or shots
toc_max_heading_level: 5
---

Automatically contribute products into USD assets or shots

:::info

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rather say that the Ayon contribution workflow was introduced around this time or its version, not this pr.

Reason:
many commits Created the Contribution workflow.
It might be confusing if you look at this one PR and don't see all the parts that made the contribution workflow.

The **AYON USD Contribution Workflow** was introduced with PR [Implement USD workflow with global asset/shot contributions plug-in](https://github.com/ynput/ayon-core/pull/295)
:::
Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_faq
title: FAQ
sidebar_label: FAQ
description: Frequently Asked Questions or Issues
toc_max_heading_level: 5
---

Frequently Asked Questions or Issues

### I do not see my model on loading the asset

<details><summary>On Load warning message "Unresolved Reference Path" shows</summary>
Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_get_started
title: Getting Started with USD in AYON
sidebar_label: Getting Started
description: A quick start into AYON x USD
toc_max_heading_level: 5
---

A quick start into AYON x USD

## Assets and Shots

Within the USD workflow we usually make a big distinction between **Assets** and **Shots**.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_houdini_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_houdini_workflow
title: Houdini USD Workflow
sidebar_label: Houdini Workflow
description: Getting started with AYON USD integration in SideFX Houdini
toc_max_heading_level: 5
---

Getting started with AYON USD integration in SideFX Houdini

import ReactMarkdown from "react-markdown";
import versions from '@site/docs/assets/json/Ayon_addons_version.json'

Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_maya_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_maya_workflow
title: Maya USD Workflow
sidebar_label: Maya Workflow
description: Getting started with AYON USD integration in Autodesk Maya
toc_max_heading_level: 5
---

Getting started with AYON USD integration in Autodesk Maya

import ReactMarkdown from "react-markdown";
import versions from '@site/docs/assets/json/Ayon_addons_version.json'

Expand Down
4 changes: 2 additions & 2 deletions website/docs/addon_usd_artist_usd_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
id: addon_usd_artist_usd_intro
title: Why and What is USD?
sidebar_label: USD Intro
description: Introduction to USD and reasons to adopt it
toc_max_heading_level: 5
---

Introduction to USD and reasons to adopt it

## Why USD
[USD Explainer Guide](https://www.foundry.com/insights/film-tv/usd-explainer-guide) article provides great insights about why USD is very useful.

Expand Down
102 changes: 102 additions & 0 deletions website/docs/addon_usd_resolver_admin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
id: addon_usd_resolver_admin
title: AYON USD Resolver
sidebar_label: USD Resolver
description: AYON USD Resolver documentation for admins.
toc_max_heading_level: 5
---

import ReactMarkdown from "react-markdown";
import versions from '@site/docs/assets/json/Ayon_addons_version.json'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like you need to configure every application while we bring a few defaults.

Maybe we should say, "Set up the LakeFs settings (currently because of the alpha version, etc.), and if you have a custom software version, add an alias to the "Main" Version."
image

Also, I just want to note that adding a new version is probably never needed, as we already bring all software packages that we have on lakeFs as defaults, so only an alias should be added.


<ReactMarkdown>
{versions.USD_Badge}
</ReactMarkdown>

BigRoy marked this conversation as resolved.
Show resolved Hide resolved
Using the AYON USD Resolver requires some small steps to enable the full
usage of the AYON Entity URI in USD throughout AYON and have the resolver
downloaded and configured.

## Enabling the AYON USD Resolver

1. Install the `ayon-usd` addon, and enable it in your bundle.
2. Configure the LakeFS settings to use the right AYON USD resolver for your applications.

:::tip Want to learn more about what the AYON USD Resolver is?

The AYON USD Resolver artist documentation provides more details on what it is and how it works (from a simplified perspective).

:::

### AYON USD LakeFS Settings

The `ayon-usd` addon is able to download and activate a matching AYON USD
Resolver automatically for an application. These are distributed from compiled binaries that we provide for multiple recent versions of major DCCs, like Houdini and Maya.

This configuration requires access to the server with an access key and a
configuration to the server.

![AYON USD Resolver Admin - LakeFS configuration settings](assets/usd/ayon_usd_resolver_lakefs_config_keys.png)

:::note Access Keys and URIs

These are currently not public, however they are provided upon request.

:::

:::tip Application aliases

You can configure additional application aliases for which the resolver matches
and should be downloaded and activated for.

![AYON USD Resolver Admin - Application Aliases](assets/usd/ayon_usd_resolver_lakefs_config_application_alias.png)

This allows you to manage a single entry for multiple application variants.

:::

## Enabling AYON Entity URIs

To enable publishing and loading of AYON Entity URIs in your project you need to enable:

#### core
```
ayon+settings://core/publish/ExtractUSDAssetContribution/use_ayon_entity_uri
ayon+settings://core/publish/ExtractUSDLayerContribution/use_ayon_entity_uri
```

#### houdini
```
ayon+settings://houdini/load/LOPLoadAssetLoader/use_ayon_entity_uri
ayon+settings://houdini/load/LOPLoadShotLoader/use_ayon_entity_uri
ayon+settings://houdini/load/USDSublayerLoader/use_ayon_entity_uri
ayon+settings://houdini/load/USDReferenceLoader/use_ayon_entity_uri
ayon+settings://houdini/load/SopUsdImportLoader/use_ayon_entity_uri
```

#### maya
```
ayon+settings://maya/load/MayaUsdLoader/use_ayon_entity_uri
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add where you need to add the LakeFs keys?

### AyonUsd 
ayon+settings://ayon_usd/lakefs/access_key_id
ayon+settings://ayon_usd/lakefs/secret_access_key

:::tip Want to enable for only some projects?

The setting URLs shared above link to the Studio Setting, but these same
toggles are available in project settings to enable/disable the usage of
AYON Entity URIs only in a specific project.

:::

## Pinning

The AYON USD Resolver supports **pinning**, mapping an entity URI to a
resulting path without requiring a server connection. This is crucial for
(large) renderfarms to avoid the many resolves and server queries degrading
the server's performance.

**TODO** Explain how the pinning works technically and what env vars will be set to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antirotor This I suppose would be in your hands. These are the admin facing docs.

enable pinning in the resolver.

## API and Technical References

Looking for more technical documentation? The [AYON-USD Resolver repository](https://github.com/ynput/ayon-usd-resolver) contains more details about the resolver itself and provides a link to the [AYON USD Resolver API documentation](https://ynput.github.io/ayon-usd-resolver/index.html).
43 changes: 43 additions & 0 deletions website/docs/addon_usd_resolver_artist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: addon_usd_resolver_artist
title: AYON USD Resolver
sidebar_label: USD Resolver
description: AYON USD Resolver documentations for artists.
toc_max_heading_level: 5
---

import ReactMarkdown from "react-markdown";
import versions from '@site/docs/assets/json/Ayon_addons_version.json'

<ReactMarkdown>
{versions.USD_Badge}
</ReactMarkdown>

## What is the AYON USD Resolver?

BigRoy marked this conversation as resolved.
Show resolved Hide resolved
The AYON USD Resolver allows to load files in USD using an AYON Entity URI like `ayon+entity://demo_Big_Feature/assets/environments/01_pfueghtiaoft?product=layoutMain&version=v004&representation=ma` by resolving it at runtime to the correct filepath on your machine.

## Pinning

The AYON USD Resolver supports **pinning**. Pinning allows to retarget an entity URI or path to a 'pinned' output filepath.

This is heavily used on the farm, because loading a single USD file may itself require resolving many other files resulting in potentially 1000s of resolves, requiring 1000s of AYON server queries - for each worker in your farm. Pinning avoids this completely by predefining the mapping of an AYON Entity URI to a filepath, resulting in no AYON server connection even being required at all.

:::tip Pinning files are heavily recommend for the farm

The amount of resolves a USD resolver may do can be detrimental to the performance of your server. The AYON USD Resolver does have a good local caching system, but if 100s of machines start resolving 1000s of unique URIs simultaneously there's little optimization that can be done because USD will resolve URIs one by one.

:::

:::note What is the `.json` file next to my USD file?

If you see a `.json` file next to a USD file, especially when the USD file is to be rendered on the farm, there's a good chance that it is an AYON USD Resolver pinning file.

This can easily be confirmed by checking whether it contains a big list of files and text like `ayon_resolver_pinning_data` inside of it.

:::

## Caching

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a point to mention that we don't do this for Deduplicaiont (Usd already does this internally) and also that the Cache is not bound to the Resolver class instance (If not explicitly requested via API) but lives as an instance shared cache.

I mention this because I talked about just that on the Usd forums, and it caused a bit of confusion before I explained it.


The AYON USD Resolver has a local caching mechanism to optimize its performance in
daily use. Entity URIs traditionally resolve to static paths, so caching them in your local sessions is the best way to improve performance.
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.
17 changes: 16 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module.exports = {
"addon_usd_artist_contribution_workflow",
"addon_usd_artist_maya_workflow",
"addon_usd_artist_houdini_workflow",
"addon_usd_resolver_artist",
"addon_usd_artist_faq",
],
},
Expand Down Expand Up @@ -176,7 +177,21 @@ module.exports = {
"addon_syncsketch_admin",
"addon_flow_admin",
"addon_aquarium_admin",
"addon_usd_admin",
{
type: "category",
label: "USD",
link: {
type: 'generated-index',
title: 'AYON USD',
description:
"Welcome to AYON USD Docs for Admins!",
keywords: ['usd'],
},
items: [
"addon_usd_admin",
"addon_usd_resolver_admin",
],
},

].sort(sorted),
},
Expand Down
12 changes: 10 additions & 2 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@
"@docusaurus/theme-search-algolia" "2.4.0"
"@docusaurus/types" "2.4.0"

"@docusaurus/[email protected]", "react-loadable@npm:@docusaurus/[email protected]":
"@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
Expand Down Expand Up @@ -4829,7 +4829,7 @@ [email protected]:

docusaurus@^1.14.7:
version "1.14.7"
resolved "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.7.tgz"
resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.14.7.tgz#f51858ab643b29ec52264d6dd85e0d629e5b3a4a"
integrity sha512-UWqar4ZX0lEcpLc5Tg+MwZ2jhF/1n1toCQRSeoxDON/D+E9ToLr+vTRFVMP/Tk84NXSVjZFRlrjWwM2pXzvLsQ==
dependencies:
"@babel/core" "^7.12.3"
Expand Down Expand Up @@ -10660,6 +10660,14 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1:
dependencies:
"@babel/runtime" "^7.10.3"

"react-loadable@npm:@docusaurus/[email protected]":
version "5.5.2"
resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
dependencies:
"@types/react" "*"
prop-types "^15.6.2"

react-markdown@^8.0.7:
version "8.0.7"
resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-8.0.7.tgz"
Expand Down