<?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: Random Material  (Color) of a plane every frame. in 3ds Max Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10920954#M13804</link>
    <description>&lt;P&gt;Hey I did that but I had to change "diffuse" to basecolor and than it worked like a charm! Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 14:11:24 GMT</pubDate>
    <dc:creator>PalmerStudios</dc:creator>
    <dc:date>2022-02-01T14:11:24Z</dc:date>
    <item>
      <title>Random Material  (Color) of a plane every frame.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10918822#M13800</link>
      <description>&lt;P&gt;How can I setup a plane to have a random color or material every frame or specified frame amount?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 16:12:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10918822#M13800</guid>
      <dc:creator>PalmerStudios</dc:creator>
      <dc:date>2022-01-31T16:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Random Material  (Color) of a plane every frame.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919279#M13801</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8479448"&gt;@PalmerStudios&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's assume that you have already assigned a standard material to your plane and that it is currently selected.&amp;nbsp; If so, then running the following lines of maxscript will assign a random color to the diffuse slot of the material every frame from frame 0 to frame 35 setting animation keys at every frame:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;with animate on &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;for i=0 to 35 do&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;at time i&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$.material.diffuse = random (color 0 0 0) (color 255 255 255) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to change it to a assign a random color every 5th frame then add "by 5"&amp;nbsp; to the second line as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;for i=0 to 35 by 5 do&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously, it can be adapted to other materials as well.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 19:18:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919279#M13801</guid>
      <dc:creator>10DSpace</dc:creator>
      <dc:date>2022-01-31T19:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Random Material  (Color) of a plane every frame.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919809#M13802</link>
      <description>&lt;P&gt;When I apply it I get this error:&amp;nbsp;-- Syntax error: at ), expected &amp;lt;factor&amp;gt; -- In line: )&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 00:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919809#M13802</guid>
      <dc:creator>PalmerStudios</dc:creator>
      <dc:date>2022-02-01T00:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Random Material  (Color) of a plane every frame.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919839#M13803</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8479448"&gt;@PalmerStudios&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How are you running the script?&amp;nbsp; &amp;nbsp;If you copy and paste the code into a new blank script in the&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;Max Script Editor&lt;/STRONG&gt;&lt;/U&gt; (not the Max Script Listener which is why you get that error message) then run it via Ctrl + E&amp;nbsp; (Evaluate All) it will run properly.&amp;nbsp; The Max Listener doesn't handle multiple lines of code all at once which is why you are getting that message.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 01:16:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10919839#M13803</guid>
      <dc:creator>10DSpace</dc:creator>
      <dc:date>2022-02-01T01:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Random Material  (Color) of a plane every frame.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10920954#M13804</link>
      <description>&lt;P&gt;Hey I did that but I had to change "diffuse" to basecolor and than it worked like a charm! Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 14:11:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-forum/random-material-color-of-a-plane-every-frame/m-p/10920954#M13804</guid>
      <dc:creator>PalmerStudios</dc:creator>
      <dc:date>2022-02-01T14:11:24Z</dc:date>
    </item>
  </channel>
</rss>

