Author Topic: Error creating Redshift Material  (Read 191 times)

Hi Guys

I am trying to create a Redshift Material in 3ds max 2019 using the latest integration plugin and I am getting this script error. I saw a post from a while back saying this would be fixed but still dosent seem to work.




Welcome to MAXScript.

State Sets Error: Anchor couldn't be created!
State Sets Error: Anchor couldn't be created!

-- Error occurred in anonymous codeblock; filename: c:\programdata\autodesk\applicationplugins\substancein3dsmax2019\scripts\SubstanceToRedshift.ms; position: 6071; line: 200
-- MAXScript FileIn Exception:
-- Type error: Call needs function or class, got: undefined
-- MAXScript callstack:
--   thread data: threadID:18820
--   ------------------------------------------------------
--   [stack level: 0]
--   In substanceNode loop; filename: c:\programdata\autodesk\applicationplugins\substancein3dsmax2019\scripts\SubstanceToRedshift.ms; position: 3925; line: 138
--      Parameters:
--         substanceNode: Map #1:Substance2
--      Locals:
--         Redshift_Material: undefined
--         index: undefined
--         outputNames: #("diffuse", "baseColor", "normal", "specular", "glossiness", "roughness", "metallic", "height", "ambientOcclusion")
--         mat: undefined
--         elementNode: <MixinInterface:Node>
--         redshiftNameChanged: false
--         Redshift_Bump_Map: undefined
--         materialCreationLocation: undefined
--         substanceNode: Map #1:Substance2
--         slateView: <IObject:IFP_NodeViewImp>
--         redshiftRendererVersion: #(3, 0, 19)
--         bumpMapNode: undefined
--      Externals:
--         standardHookup: Global:standardHookup : standardHookup()
--         owner: undefined
--   ------------------------------------------------------
--   [stack level: 1]
--   called from main(); filename: c:\programdata\autodesk\applicationplugins\substancein3dsmax2019\scripts\SubstanceToRedshift.ms; position: 6072; line: 200
--      Locals:
--         redshiftName: "redshift_renderer"
--         currentRenderer: "redshift_renderer:redshift_renderer"
--         substanceNodes: #(Map #1:Substance2)
--      Externals:
--         owner: undefined
--         redshiftNotSelected: Global:redshiftNotSelected : redshiftNotSelected()
--         nodeNotSelected: Global:nodeNotSelected : nodeNotSelected()
--         acquireSelectedSubstanceNodes: Global:acquireSelectedSubstanceNodes : acquireSelectedSubstanceNodes()
--   ------------------------------------------------------
--   [stack level: 2]
--   called from anonymous codeblock; filename: c:\programdata\autodesk\applicationplugins\substancein3dsmax2019\scripts\SubstanceToRedshift.ms; position: 6164; line: 205
--      Locals:
--      Externals:
--         main: Global:main : main()
--   ------------------------------------------------------
--   [stack level: 3]
--   called from top-level

It might be there's some issue in how we're handling trying to work with both the newer and older versions of redshift.

I'll take a look for the next patch release, which will be very soon, once we finish the new release system for the plugin. Fixing this can get added pretty easily to 2.3.3. Likely we'll stop attempting to work with the old version of redshift and just switch entirely to their newer nodes. It has now been a while since redshift changed.
Last Edit: May 25, 2020, 12:07:53 am
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

Thanks, I found a post about changing the script so that it works with the new names in redshift. But then there is another issue once the material is created redshift says its unsupported. It dosent work in IPR mode but if you do a full render it works but with lots of warnings and errors.


13:41:29 [ERROR]    The map 'Map #3' (Substance2Output / #{39670366,5b80451d}) is not supported by Redshift.

13:41:29 [ERROR]    The map 'Metallic' (Map Output Selector / #{896ef2fc,44bd743f}) is not supported by Redshift.

13:41:29 [ERROR]    The map 'Roughness' (Map Output Selector / #{896ef2fc,44bd743f}) is not supported by Redshift.

13:41:29 [ERROR]    The map 'BaseColor' (Map Output Selector / #{896ef2fc,44bd743f}) is not supported by Redshift.

We have to do some hacks to make it render with redshift, which unfortunately doesn't work in IPR.

We're looking at adding native renderer support, but I think Arnold will be the first as it has a public sdk we know we can work with.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

Yeah thats what the redshift guys said as well. So basically the integration only works with Vray? You need to put a disclaimer about that, everytime theres a new version of the plugin I spend and at least a few hours running around trying to make it work.

It works for rendering, just not in the IPR.

We're talking to the Redshift folks to see what we can do to make it work better.

Whether it works with the renderer is really on that side, they control what entities in the scene they will process. So we will need to work to make it so that Redshift has a way to handle sbsars.

For example, Arnold exposes this, so we can write separate Arnold plugins to make it understand that, but there pretty much would be no alteration to the actual plugin, it is a different type of work.

I'll have an update on this later after we talk to them more on what can be done. It may be something we do in the near future.
Last Edit: May 27, 2020, 08:08:24 pm
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries