-
Notifications
You must be signed in to change notification settings - Fork 9
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
Load VDB to Redshift: Create and assign a RedshiftStandardVolume material on load #220
base: develop
Are you sure you want to change the base?
Load VDB to Redshift: Create and assign a RedshiftStandardVolume material on load #220
Conversation
…rendered in Redshift.
…n correctly retrieve gridNames directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have used tray publisher to ingest some VDB cache file from internet (Embergen)
and Im getting this error once using Ayon>Load VDB (Redshift)
I guess its because it has just density
grid inside not color
Traceback (most recent call last):
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.13\ayon_core\tools\loader\models\actions.py", line 740, in _load_representations_by_loader
load_with_repre_context(
File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.0.13\ayon_core\pipeline\load\utils.py", line 325, in load_with_repre_context
return loader.load(repre_context, name, namespace, options)
File "c:\Work\REPO\ayon-maya\client\ayon_maya\plugins\load\load_vdb_to_redshift.py", line 94, in load
self._create_default_redshift_volume_shader(volume_node)
File "c:\Work\REPO\ayon-maya\client\ayon_maya\plugins\load\load_vdb_to_redshift.py", line 175, in _create_default_redshift_volume_shader
cmds.connectAttr(f"{material}.outColor",
RuntimeError: The source attribute 'unknown1.outColor' cannot be found.```
once assigned the shader manually and inspect the asset (data is ok)

@LiborBatek what version of Redshift are you using. I'm assuming |
RS 3.5.17 |
Changelog Description
Create and assign a RedshiftStandardVolume material on loading VDB to Redshift.
This also fixes an issue where on load Redshift would sometimes report a warning that the file does not exist (because Maya still had to initialize the
useFrameExtension
behavior). This PR now directly forces maya to evaluate that and avoids the warning like:Additional review information
The option can be disabled on the Load action via the option box on the action itself.
This avoids the issue that when loading the VDB that by default it would NOT display in the render - usually Redshift would log that it had no shader and hence be skipped. Now, a shader is created and assigned and the field channel to use is guessed from the available grid names: use density if available, otherwise use first grid name which may save time as to debug "why doesn't it render?" and typing a valid channel name manually by the artist.
It does introduce potential follow up issue:
The creation will also be logged:
Testing notes: