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

Hydra also loads render shaders which fills up the GPU memory #3831

Open
sanders3d opened this issue Jun 18, 2024 · 0 comments
Open

Hydra also loads render shaders which fills up the GPU memory #3831

sanders3d opened this issue Jun 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sanders3d
Copy link

sanders3d commented Jun 18, 2024

Describe the bug
I've created assets which has two shaders ( material x ). One for preview and one for render. The shaders are identical but for the preview shader I'm using only 1K jpg textures.
If I load in 5-10 of these assets the GPU memory quickly fills up to 10GB.
If I resave these assets and switch out the TX files to JPG textures on the render shader the memory is fine. So it seems that Viewport 2.0/Hydra tries to load the render shader even though we have not yet activated Arnold or even tried to render.

Steps to reproduce
Create an asset following the ASWF guidelines.
asset.usda, payload.usda, shade.usda, geom.usdc

/apple           (xform) ← Component Kind
    /geo         (scope)
        /proxy   (scope) ← Purpose: proxy★
        /render  (scope) ← Purpose: render★
    /mtl         (scope)
/\_\_class\_\_       (class)
    /apple       (class) ← Inherited by /<component>

Create a shader material x ( standard surface ). Use only mtlx nodes. Add base color, roughness, normalmap and displacement.
Duplicate the shader so you have two shaders named: proxy_mtl, render_mtl
Use TX files (4K or 8K) in the render_mtl and 1K JPG in the proxy_mtl
Assign the proxy_mtl to /ASSET/geo/proxy
Assign the render_mtl to /ASSET/geo/render

Do this to a few assets.
load them all in as references into a stage. Watch the GPU memory
close Maya

edit the shade.usda file and replace the ".tx" with ".jpg"
load them all in as references into a stage. Watch the GPU memory

Easiest would be to download Megascan assets and use those as a testing ground. I recommend you download assets with 8K textures.

Expected behavior
Hydra/Viewport 2.0 should not care about the render material as its not assigned to the meshes that has purpose:proxy

Attachments
Megascan Boulders, this uses 10GB of VRAM with tx files in the render material
image
Megascan ID's for the assets are as follows
uisjbbis, ukopdins, ukopeess, ukopeijs, ukopfbks, weimcftga, wenobdn

Specs (if applicable):

  • Rocky Linux 8.9
  • 128GB Ram
  • Intel® Core™ i9-9900K CPU @ 3.60GHz × 16
  • NVIDIA RTX A4000/PCIe/SSE2
  • NVIDIA Driver Version: 550.54.15
  • NVIDIA CUDA Version: 12.4
  • Maya 2025.1
  • maya_usd-0.28
@sanders3d sanders3d added the bug Something isn't working label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants