Page 1 of 1

Convert iray

Posted: Tue Feb 26, 2019 12:08 am
by James Linehan
I'm trying to use the vray to Maxwell script on these assets from megascan https://quixel.com/. They import as v-ray materials but the script errors when trying to convert them here's the error

-- MAXScript Rollout Handler Exception:
-- Unable to convert: undefined to type: String
-- MAXScript callstack:
-- thread data: threadID:24520
-- ------------------------------------------------------
-- [stack level: 0]
-- In VrayHDRI2hdr(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 12336; line: 248
-- member of: StructDef:mtlconverter
-- Parameters:
-- MapOrig: VRayHDRI:VRayHDRI
-- g: 1
-- Locals:
-- m: Maxwell_Bitmap:MaxwellBitmap
-- nom: "D:\library\Downloaded\surface\rock_cliffs_sjggaija\sjggaija_4K_Gloss.jpg"
-- g: 1
-- MapOrig: VRayHDRI:VRayHDRI
-- nomproc: undefined
-- Externals:
-- owner: (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- ------------------------------------------------------
-- [stack level: 1]
-- called from convert_map(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 13040; line: 271
-- member of: StructDef:mtlconverter
-- Parameters:
-- smap: VRayHDRI:VRayHDRI
-- Locals:
-- col: undefined
-- smap: VRayHDRI:VRayHDRI
-- btemp: undefined
-- wsize: undefined
-- clmap: VRayHDRI
-- hsize: undefined
-- Externals:
-- mwconv: Global:mwconv : (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- owner: <CodeBlock:anonymous>
-- ------------------------------------------------------
-- [stack level: 2]
-- called from vray2mw(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 27094; line: 545
-- member of: StructDef:mtlconverter
-- Parameters:
-- origMtl: rock_cliffs_sjggaija:VRayMtl
-- Locals:
-- m: rock_cliffs_sjggaija:MaxwellMaterial
-- cls: undefined
-- mtln: 0.0
-- tex: undefined
-- origMtl: rock_cliffs_sjggaija:VRayMtl
-- rfr: (color 51 51 51)
-- Externals:
-- owner: (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- mwvars: Struct member:mwvars : (mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2")
-- mwconvroll: Struct member:mwconvroll : Rollout:mwconvroll
-- mtlconverter: StructDef:mtlconverter
-- ------------------------------------------------------
-- [stack level: 3]
-- called from convertMat(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 40791; line: 934
-- member of: StructDef:mtlconverter
-- Parameters:
-- origMtl: rock_cliffs_sjggaija:VRayMtl
-- Locals:
-- type: VRayMtl
-- origMtl: rock_cliffs_sjggaija:VRayMtl
-- Externals:
-- mwconv: Global:mwconv : (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- owner: (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- convertMat: Struct member:convertMat : convertMat()
-- ------------------------------------------------------
-- [stack level: 4]
-- called from m loop; filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 44744; line: 1036
-- member of: anonymous codeblock
-- Parameters:
-- m: rock_cliffs_sjggaija:VRayMtl
-- Locals:
-- m: rock_cliffs_sjggaija:VRayMtl
-- Externals:
-- mwconv: Global:mwconv : (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- owner: <CodeBlock:anonymous>
-- ------------------------------------------------------
-- [stack level: 5]
-- called from i loop; filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 44744; line: 1036
-- member of: anonymous codeblock
-- Parameters:
-- i: "VRayMtl"
-- Locals:
-- scenemats: #(rock_cliffs_sjggaija:VRayMtl)
-- i: "VRayMtl"
-- num: 1
-- Externals:
-- owner: <CodeBlock:anonymous>
-- ------------------------------------------------------
-- [stack level: 6]
-- called from ConvertScene(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 44753; line: 1037
-- member of: StructDef:mtlconverter
-- Locals:
-- numbar: 1
-- day_array: undefined
-- barmats: #(rock_cliffs_sjggaija:VRayMtl)
-- r: undefined
-- sceneproxys: #()
-- Externals:
-- mwconv: Global:mwconv : (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- owner: (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- mwvars: Struct member:mwvars : (mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2")
-- mwconvroll: Struct member:mwconvroll : Rollout:mwconvroll
-- ------------------------------------------------------
-- [stack level: 7]
-- called from bot_convert.pressed(); filename: C:\Program Files\Autodesk\3ds Max 2018\scripts\maxwell\mwconverter.ms; position: 7987; line: 116
-- member of: Rollout:mwconvroll
-- Locals:
-- Externals:
-- drop_extension: RolloutControl:drop_extension in rollout:mwconvroll : ComboBoxControl:drop_extension
-- owner: (mtlconverter mwvars:(mwvars owner:undefined widthproc:512 procext:".jpg" convertedmats:#() oldcams:#() newcams:#() oldLights:#() newlights:#() validmaptype:#(".jpg", ".png", ".tga", ".tif", ".tiff", ".hdr", ".exr", ".bmp") sourceMtlClasses:#("VRayMtl", "VRayLightMtl", "VRayBlendMtl", "VRay2SidedMtl", "VRayMtlWrapper", "VRayOverrideMtl", "Blend") sourceLightClasses:#("VRayLight", "VRayIES", "VRaySun", "freeSpot", "targetSpot") dirproc:"C:\Users\James\Documents\3dsMax\sceneassets\images\" mw_ibl_on:undefined env_gi_on:undefined env_gi_map:"" env_gi_map_on:undefined env_refl_on:undefined env_refl_map:"" env_refl_map_on:undefined env_refr_on:undefined env_refr_map:"" env_refr_map_on:undefined env_bgrmap:undefined env_sun:false env_dome:false dayname:undefined maxbarvalue:1 currbarvalue:0 msglog:StringStream:"" version:"v1.2") mwconvroll:Rollout:mwconvroll)
-- spin_widthproc: RolloutControl:spin_widthproc in rollout:mwconvroll : SpinnerControl:spin_widthproc
-- dlbl_info: RolloutControl:dlbl_info in rollout:mwconvroll : dotNetControl:dlbl_info:System.Windows.Forms.Label
-- chk_selonly: RolloutControl:chk_selonly in rollout:mwconvroll : CheckBoxControl:chk_selonly
-- pbar: RolloutControl:pbar in rollout:mwconvroll : ProgressBar:pbar
-- mwconvroll: Rollout:mwconvroll
-- lbl_pbar: RolloutControl:lbl_pbar in rollout:mwconvroll : LabelControl:lbl_pbar
-- ------------------------------------------------------
-- [stack level: 8]
-- called from top-level

Re: Convert iray

Posted: Tue Feb 26, 2019 1:26 pm
by Forum Moderator
Thank you for reporting the issue. I'm going to share this with the developer of the script and get back to you.

Best,
Fernando

Re: Convert iray

Posted: Tue Feb 26, 2019 2:32 pm
by Forum Moderator
Hello James,

Could you try with this version of the converter script?

https://drive.google.com/open?id=1yIWBM ... c9NoSXoSKt

You should download it and store it in this folder (replace 3ds Max 2019 with the version you are using):
C:\Program Files\Autodesk\3ds Max 2019\scripts\maxwell

You can rename or move the current script to another folder, as a backup.

If it doesn't solve the problem we might need one of the assets you are trying to convert to check it out. Would it be possible?

I hope this help.
Cheers!
Fernando

Re: Convert iray

Posted: Wed Feb 27, 2019 2:33 am
by James Linehan
thanks that works

Re: Convert iray

Posted: Wed Feb 27, 2019 10:56 am
by Forum Moderator
James Linehan wrote:thanks that works
That's great. Thanks for the feedback!

Cheers!
F.

Re: Convert iray

Posted: Wed Feb 27, 2019 5:35 pm
by James Linehan
It rendering okay but it gives me an error when loading back into 3Ds 2018 max here are the assets. thanks


https://drive.google.com/drive/folders/ ... sp=sharing

Re: Convert iray

Posted: Thu Feb 28, 2019 2:35 pm
by Forum Moderator
Hello James,

I can see how your converted asset file fails here, but if I convert it, then save it as a 3dsmax file and open it again it seems to open fine. I have sent you a link to download the version I have generated here, which opens fine.

It's strange, as the error it shows (Paramblock stuff) suggests that some settings were not correctly saved or is expecting something different as if it was saved with a different version as the one that is trying to open it with. I'm not sure what could be causing that.
If you repeat the same steps, do you get the same result?

Best,
Fernando

Re: Convert iray

Posted: Fri Mar 01, 2019 2:04 am
by James Linehan
I've uploaded another one I'm having problems converting it just comes out Gray. I'm still researching the problem with loading and that are coming up I'm not quite sure yet what's going on.

https://drive.google.com/open?id=1Pg2tw ... eoV4hsPnDf

Re: Convert iray

Posted: Fri Mar 01, 2019 2:26 am
by James Linehan
vary simple test of https://quixel.com/ scans