{"id":19588,"date":"2018-01-26T18:35:55","date_gmt":"2018-01-26T23:35:55","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=19588"},"modified":"2018-01-26T18:37:46","modified_gmt":"2018-01-26T23:37:46","slug":"cg-programming-for-non-programmers-lesson-23","status":"publish","type":"post","link":"https:\/\/blog.kenperlin.com\/?p=19588","title":{"rendered":"CG programming for non-programmers, lesson 23"},"content":{"rendered":"<p>For lesson 23 we learn how to mix colors.  Actually, we can use it to mix pretty much anything.  We are just using color as an example.<\/p>\n<p>The <code>mix(a,b,t)<\/code> function uses its third argument <code>t<\/code> to create a mixture of <code>a<\/code> and <code>b<\/code>.  When <code>t<\/code> is <code>0.0<\/code> the result is <code>a<\/code>.  When <code>t<\/code> is 1.0 the result is <code>b<\/code>.  When <code>t<\/code> is anything in between we get a mixture of <code>a<\/code> and <code>b<\/code>.<\/p>\n<p>Here we are using it to create a mysterious fog cover over our moon at night.  The shape of the fog cover is created by a <code>noise<\/code> texture, and the value of that <code>noise<\/code> texture is controlled by <code>x<\/code>, <code>y<\/code>, <code>z<\/code> and <code>uTime<\/code>.  The use of <code>uTime<\/code> in defining the <code>noise<\/code> texture is what makes the fog animate.<\/p>\n<p>You can see this lesson by <a href=http:\/\/mrl.nyu.edu\/~perlin\/cg\/lesson23>CLICKING HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For lesson 23 we learn how to mix colors. Actually, we can use it to mix pretty much anything. We are just using color as an example. The mix(a,b,t) function uses its third argument t to create a mixture of a and b. When t is 0.0 the result is a. When t is 1.0 &hellip; <a href=\"https:\/\/blog.kenperlin.com\/?p=19588\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CG programming for non-programmers, lesson 23&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19588"}],"collection":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19588"}],"version-history":[{"count":3,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19588\/revisions"}],"predecessor-version":[{"id":19591,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19588\/revisions\/19591"}],"wp:attachment":[{"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}