<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor) in Arnold General Rendering Forum</title>
    <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040570#M2437</link>
    <description>&lt;P&gt;Just curious as to why you would want to do this?&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2019 11:21:22 GMT</pubDate>
    <dc:creator>lee_griggs</dc:creator>
    <dc:date>2019-05-23T11:21:22Z</dc:date>
    <item>
      <title>Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040568#M2435</link>
      <description>&lt;P&gt;Is there any way (Mel/Python...) to convert a AiStandardSurface material to a Lambert/Phong/Blinn and still mantain material color properties? &lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 10:02:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040568#M2435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-23T10:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040569#M2436</link>
      <description>&lt;P&gt;I've used this script:&lt;/P&gt;&lt;PRE&gt;//change all phong Materials to aiStandard Material
// If you need to change another Material, simple  change `ls -type "phong"`
{
    string $newMaterialType = "aiStandard";
    string $nm = `createNode $newMaterialType`;
    string $ms[] = `ls -type "blinn"`;
    string $pa[] = `listAttr -visible -settable -scalar $ms`;
    string $nma[] = `listAttr -visible -settable -scalar $nm`;
    string $ca[] = stringArrayRemove($nma, $pa);
        $ca = stringArrayRemove($ca, $pa);
    delete $nm;
    string $a; string $m; float $v; string $cl[];
    for ($m in $ms)
    {
        $nm = `createNode $newMaterialType`;
        $cl = `listConnections -destination true -plugs true -source false -type shadingEngine $m`;
        connectAttr -f ($nm + ".outColor") ($cl);
        for ($a in $ca)
        {
            $v = `getAttr ($m + "." + $a)`;
            catchQuiet(`setAttr ($nm + "." + $a) $v`);
        }
        delete $m;
    }
}&lt;/PRE&gt;&lt;P&gt;to convert a blinn to arnold, and it does work, so i tried the other way:&lt;/P&gt;&lt;PRE&gt;//change all phong Materials to aiStandard Material
// If you need to change another Material, simple  change `ls -type "phong"`
{
    string $newMaterialType = "blinn";
    string $nm = `createNode $newMaterialType`;
    string $ms[] = `ls -type "aiStandard"`;
    string $pa[] = `listAttr -visible -settable -scalar $ms`;
    string $nma[] = `listAttr -visible -settable -scalar $nm`;
    string $ca[] = stringArrayRemove($nma, $pa);
        $ca = stringArrayRemove($ca, $pa);
    delete $nm;
    string $a; string $m; float $v; string $cl[];
    for ($m in $ms)
    {
        $nm = `createNode $newMaterialType`;
        $cl = `listConnections -destination true -plugs true -source false -type shadingEngine $m`;
        connectAttr -f ($nm + ".outColor") ($cl);
        for ($a in $ca)
        {
            $v = `getAttr ($m + "." + $a)`;
            catchQuiet(`setAttr ($nm + "." + $a) $v`);
        }
        delete $m;
    }
}&lt;/PRE&gt;&lt;P&gt;I've also tried "aiStandardSurface" instead of "aiStandard"&lt;/P&gt;&lt;P&gt;But this doesnt work...&lt;/P&gt;&lt;P&gt;i get this error:&lt;/P&gt;&lt;P&gt;// Error: line 18: The destination attribute '' cannot be found. // &lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 10:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040569#M2436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-23T10:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040570#M2437</link>
      <description>&lt;P&gt;Just curious as to why you would want to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 11:21:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040570#M2437</guid>
      <dc:creator>lee_griggs</dc:creator>
      <dc:date>2019-05-23T11:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040571#M2438</link>
      <description>&lt;P&gt;Because i have a lot of objects with arnold materials (The project im working on was supposed to be a short) but now they also want a very simple unity project to show the models(Most of them can be flat colors without textures, they just need to see the model itself) and if i export an fbx with arnold materials, it does export the materials but when i do import them in unnity, the flat color is grey, instead of the ones the aiStandardSurface has&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 11:24:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040571#M2438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-23T11:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040572#M2439</link>
      <description>&lt;P&gt;Just in case anyone was wondering how.&lt;/P&gt;&lt;P&gt;This is how a friend (Github: @PRZurro) managed to convert just the BaseColor of a aiStandardSurfaceLegacy Shader to the Color of Legacy Shader&lt;/P&gt;&lt;PRE&gt;string $newMaterialType = "blinn";
string $newMaterial = `createNode $newMaterialType`;
string $oldMaterials[] = `ls -type "aiStandardSurface"`;
string $oldMaterialsAttr[] = `listAttr -visible -settable -scalar $oldMaterials`;
string $newMaterialAttr[] = `listAttr -visible -settable -scalar $newMaterial`;
string $ca[] = stringArrayRemove($newMaterialAttr, $oldMaterialsAttr);


$ca = stringArrayRemove($ca, $oldMaterialsAttr);


delete $newMaterial;
string $a; string $b; string $m; float $v; string $cl[];
for ($m in $oldMaterials)
{
    $newMaterial = `createNode $newMaterialType`;


    $cl = `listConnections -destination true -plugs true -source false -type shadingEngine $m`;
    connectAttr -f ($newMaterial + ".outColor") ($cl);
    for ($a in $ca)
    {
        $v = `getAttr ($m + "." + $a)`;
        catchQuiet(`setAttr ($newMaterial + "." + $a) $v`);
    }
    
    float $colorR = `getAttr($m + ".baseColorR")` ;
    catchQuiet(`setAttr ($newMaterial + ".colorR") $colorR`);


    float $colorG = `getAttr($m + ".baseColorG")` ;
    catchQuiet(`setAttr ($newMaterial + ".colorG") $colorG`);


    float $colorB = `getAttr($m + ".baseColorB")` ;
    catchQuiet(`setAttr ($newMaterial + ".colorB") $colorB`);


    delete $m;
}
&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 May 2019 09:49:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/11040572#M2439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T09:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AiStandardSurface to Lambert/Phong/Blinn (BaseColor)</title>
      <link>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/12777288#M2440</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;Here i what I do to convert an "Arnold scene" to a "Standard Maya shaders scene":&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;save the scene as SceneNameFBX&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;open the Hypershader and graph the shader&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;create a blinn material and name it&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;plug your maps into the blinn&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;convert any "strange" Arnold shader to texture (aiRamp, aiColorCorrect, remapColor etc...) in Hypershader Menu Edit &amp;gt; Convert to File Texture&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;change the render to Maya Software&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;export as FBX and copy the textures ino this same folder&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;repeat the above procedure for DAE(Collada) &amp;amp; OBJ formats&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Be happy!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;LAO&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 09:01:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/arnold-general-rendering-forum/convert-aistandardsurface-to-lambert-phong-blinn-basecolor/m-p/12777288#M2440</guid>
      <dc:creator>laomusic_arts</dc:creator>
      <dc:date>2024-05-16T09:01:58Z</dc:date>
    </item>
  </channel>
</rss>

