Getting Started with CINEMA 4D R15, Part 19: Introduction to Procedural Materials

Photo of Patrick Goski

Instructor Patrick Goski

Share this video
  • Duration: 13:19
  • Views: 29819
  • Made with Release: 15
  • Works with Release: 15 and greater

Applying Fresnel, Chanlum, Layer and Noise Shaders and Previewing with Interactive Render Region

In this video you will be introduced to procedural materials using shaders. Procedurals provide a flexible method for creating materials with animatable attributes within CINEMA 4D. In this tutorial, you’ll use the Fresnel shader to alter the reflection based on the angle between the camera and surface, Chanlum to simulate subsurface scattering, and the Noise Shader to create a random surface for the planet. The Layer Shader is used to combine multiple shaders within a single material channel. You will also use the Interactive Render Region to see a rendered preview within the viewport as you work.

show less

Transcript

In this video you're going to create the material for the planet. In this case you want to create a material that has variation in the surface, but also that is generated directly within Cinema 4D so that it can react to the lights in the scene. This means that you need something more than just a flat color, and something more than an image sequence which would also suffer from possible issues with texture projections, and on some objects would require proper UV's. You will also learn about the Interactive Render Region. This is a handy tool for previewing changes to materials you make in your scene allowing you to preview how the material will look in your scene with out having to render to the picture viewer. Now, you already had a glimpse of what procedural texturing is when you used the Fresnel shader as the Fresnel shader reacted to the angle of the camera to the object surface, and provided you with a gradient that could be used to visualize that angle. While it may seem like the key thing here is that this effect not as been achieved through other means it's not the only part of it. The shader itself is calculated new with every frame. It can also be independent from the texture projection, and probably most important is that these shaders are parametric. That is they have attributes that you can adjust for basic control over the shaders results. The Fresnel shader is just one of many shaders that function this way, and it's important to understand how you can start to utilize these shaders as it can save you time from having to prepare textures in Photoshop first, and even help add variation to your textures to give them a more natural appearance. So, to start exploring procedural texturing more The next material you'll create is for the planet, but first, you'll want to set up the interactive render region to make previewing the changes to your material quick and easy. Now, if you happen to see the UV grid in the view port like you do here then make sure the switch back into object mode using the toggles on the left, and disable the axis modification toggle. Click and hold the render the picture viewer on icon. Then at the bottom of the list select the interactive render region. When you do this you will see the preview region represented by a dotted rectangle in the view port appear and the render will start. Now, if you hold your mouse over the edges of the box you'll see that the cursor changes. This means you can click and drag to reposition a preview region and if you hold the mouse over the small squares on the corners,n or at the midpoint of the edges you'll be able to resize the preview region. Finally once you have a size that you like there's a small triangle on the right side of the preview region. Clicking and dragging this triangle allows you to control the quality of the render preview. If you drag this triangle to the top of the preview region then it will use the exact settings you have set in the render settings. As you lower the indicator it reduces the settings. This is handy when you need to get an overall sense for the scene rather than seeing the exact details. It also means you get a faster render. Now, once the render region has been set up you can start working on the material. Start by creating a new material in the material manager, and then open it in the material editor. Rename this material to "planet_surface". Once you've done this you'll want to apply the material to the planet object. When you first apply the new material you won't notice much of a change in the interactive render region, but as soon as you start adjusting the other channels you'll start to see the changes applied. Now, starting in the color channel set the color of the planet to be it dark blue green color. Next, you're going to use a shader in the luminance channel to help simulate light scattering through the planet. Now, this may not sound very accurate, but in the end it's all about what looks good not what is physically correct. So, click the luminance channel and enable it. The material preview will turn white. This is because the luminance channel will make the pixels bright regardless of the lighting in the scene, and by default the color is set to white. Just like when creating the glow on the chrome, once you add a shader to this channel it will change the look of this drastically. Start by clicking on the texture menu. Now, the list of shaders may seem daunting at first, but there are few you'll always go back to and these are listed out in the open for you, but there also shaders in sub menus. Under the effect sub menu you can find a Shader called ChanLum. The name is a little bit of an enigma, but the result is what matters. When you add this shader to your material nothing happens, and this can often be the case with procedural shaders. As sometimes they're very reliant on other things in your scene. Now, if you click on the shader name to edit its attributes you can start to fine tune the look of the affect. In short, the ChanLum shader tries to mimic the look of light passing through a solid object. This means that its results are heavily linked to the lights that hit it, and it's part of the reason why you don't really see any effect from a yet. There are two main issues here... The shader only works with lights that are casting shadows, and there are a lot of lights in the scene. Now, because you want to have control over which lights can affect the shader The shader itself has an include/exclude list much like the project tab of the light object. So, for this shader you all only want to have the backlight for the planet, and the light from the rocket blasting off affect the shader. This means that you need to set the include/exclude list of the shader to include. So that it only includes objects in the list in its calculation. This means you want to start a pick session for the list, and then click the "planet_backlight" and the "rocket_launch_glow" Finally, once both lights have been set in the list you'll want to end the pick session by tapping escape, or by clicking the pick session icon again. Next, you want to make sure that both lights cast shadows. So, click on the light objects, and then make sure to select one of the shadow types from the shadow drop down. In this case, Raytraced Shadows will be used. Once you've done this, you'll notice that the channel and Shader is now being affected by just those lights, and you can now see a visible effect in the render preview. Next, you'll want to start adjusting the other attributes that affects the look and quality of the results. Start by adjusting the sample radius... As you do this you'll notice the areas that are brighter start to fade out over a longer distance. By setting the sample radius to around 360 you can create a haze over almost the entire planet. Now, you will notice a noise in the render. Usually when you notice noise in the render it is because there are not enough samples. In this case, you first want to set the interactive render region so that it is rendering at the highest possible quality. Then, you can start raising the number of samples the Shader use. This will help to smooth out the results, but it should also be noted that it can lead to higher render times. Now, once you have this all setup the effect looks better but it's still just a plain white color, and not really selling the look of a solid planet with an atmosphere. So, in this case you want to start mixing shaders together. Now, if you click on the texture menu again you can then select the Layer shader this adds the Layer shader to the luminance channel, but doesn't actually change the look of the material in the render. Now, if you click on the shader name in the texture link field you'll be presented with the Layer shader interface as well as a shade are already in the list. This is because when you added the Layer shader whatever was already in the texture field was added as a source for the Layer shader. It's also why the render didn't change when you first added the Layer shader. Now, what makes this shader so special? The layer shader lets you blend different shaders together much like you can blend layers together in Photoshop. So in Photoshop, you can create an adjustment layer on top of an existing layer to get a new affect, and the same holds true here. To start, you want to add a new shader to the list. If you click the buttons at the top of the layer shader you get access to different shaders available to you, and there also a few special effects. So, click the shader button and then choose Fresnel. Once the Fresnel shader has been added you can click the shader on icon to edit the attributes of the shader. Now, if you wanted to get back to the layer shader you might think that you need to click back on the luminance channel, but this takes you all the way back to the start which means you need to click back on the layer shader, and then back on the Fresnel shader if you wanted to get back to those attributes. Instead, you can just use the arrows at the top of the material manager. This allows you to step back through the attributes. So, by clicking back it takes you to the Layer shader rather than all the way back to the luminance channel attributes. Now, since adding the Fresnel Shader you can see that it is overwritten the effects of the ChanLum shader. So, what you can do now is set the blend mode for the Fresnel shader. Click the drop down to the right of the shader name you can now select the blend mode of your choice from this list. In this case, by selecting multiply you can limit the effects of the ChanLum shader based on the intensity of the Fresnel shader. While this does start to look better it doesn't actually solve the issue of color. If you click the shader menu you'll see that there is a shader called "Colorizer". This allows you to map a gradient to an image based on the values of that image. When you add this to the layer shader it doesn't do anything at first, and this is because the Colorizer needs to have a shader as its source. So, click the back button, and then click the Colorizer name and hit delete to remove the shader from the Layer shader. This time click the effects button under this menu you can find an affect called "Colorize". When you add this you're presented with a gradient in the Layer shader interface. You can now click & drag the shader to change its location in the heirarchy/ Since the effect only gets applied to shaders below it by placing the Colorizer effect between the Fresnel and ChanLum shaders you can set it to affect only the results of the ChanLum shader. Once you have that set you can start adjusting the gradient. This will allow you to add color to the effects of the ChanLum shader. To do this you'll want to start adjusting the gradient. This will allow you to add color to the luminance. Start by double clicking the knot on the left side, and set this to a blue green color and then click OK. Next, double click on the right knot and set it to a light blue color and click OK. Finally, you may want to add some Noise over top of all of this to simulate clouds. Noise is a great function to use in creating materials as it allows you a quick and easy way to create variation in your textures, and by using the Layer shader you can even blend it with images. So click the shader button and then select the Noise shader. Again, this overrides everything else. Select the Fresnel shader you'll want to set the noise to multiply. Now, click on the noise icon this gives you access to the attributes for controlling the noise. Don't worry too much about all the attributes you see here right now, but do take some time later on to explore them on your own. For now select Wavy Turbulence from the noise drop down, and then set the scale to be around 300%. Once you do this, you should get something that looks similar to clouds on the surface of your planet. Finally, you'll want to adjust the specular highlight on the surface of the planet. So, click the specular channel and then go down to the width, height, and fall off settings. Set the width to be around 50% and the height to be around 70, Now, this might seem like some extreme highlight, but by setting the fall off to a negative value you can start to create some interesting effects. Once you've done that you can save incremental and move on to the next video.
このビデオでは、地球のマテリアルを作成します。 この場合、サーフェスが凸凹の マテリアルを作成する必要があります。 Cinema 4D内で直接作成し、シーン内のライトに影響を受けます。 単なる色以上のものが必要で、 しかも連番画像ではない方法です。 テクスチャ投影に関する潜在的な問題に悩まされることなく、 オブジェクトに適切なUVは不要です。 また、インタラクティブレンダーについても学びます。 これは、シーン内で作成したマテリアルの変更を プレビュできる便利なツールです シーンでマテリアルがどのように見えるかをプレビュすることができます。 画像表示にレンダリングする必要もありません。 すでにフレネルシェーダの時に、プロシージャルテクスチャについて 少し触りました。 フレネルシェーダがオブジェクトのサーフェイスに対する カメラの角度に反応するもので、 その角度を視覚化するためにグラデーションが使用されました。 重要なことのように見えるかもしれませんが 効果を実現しただけでなく、唯一のものでもありません。 シェーダ自体はすべてのフレームで新しく計算されます。 また、テクスチャ投影から独立して、 そして最も重要なことは、 これらのシェーダがパラメトリックであることです。 つまり、シェーダの結果に対して、 基本的な操作で調整できるパラメータがあります。 フレネルシェーダは、多くのこうした機能を持つシェーダの1つに過ぎず、 こうしたシェーダをどのように使いこなすかが重要です Photoshopでテクスチャを最初に準備する必要がないため、 時間を節約でき テクスチャにバリエーションを追加して より自然な見た目にすることもできます。 だから、プロシージャルテクスチャの探求を始めましょう。 作成する次のマテリアルは、地球のためのものです。 でもまず、 インタラクティブレンダーを設定する必要があります マテリアルへの変更をすばやく簡単にプレビュできます。 もし、このようにビューポートにUVグリッドが見えているようなら 左のトグルスイッチを使用してオブジェクトモードに戻してください。 軸の変更トグルも無効にします。 画像表示アイコンをレンダリングしたままにしておきます。 次に、リストの一番下のインタラクティブレンダーを選択します。 (R19は下から2番目) これを行うと、プレビュ範囲が表示されます ビューポートで点線の四角形で表され、レンダリングが開始されます。 ボックスの端にマウスを置くと、カーソルが変化します。 プレビュ範囲のエッジをドラッグすると位置を変更できます コーナーかエッジの中間点にある小さな四角を ドラッグするとプレビュ範囲のサイズを変更できます。 気に入ったサイズにしましょう。 プレビュ範囲の右側には小さな三角形があります。 この三角形をドラッグすると、 レンダープレビュの品質をコントロールできます。 この三角形を一番上までドラッグすると レンダリング設定と同じ設定でレンダリングされます。 インジケーターを下げると、設定が低くなります。 これは正確なディテールではなく シーン全体の雰囲気を知りたいときに便利です また、レンダリングも高速です。 レンダリング範囲が設定したら、マテリアルの作業を始めます。 まず、マテリアルマネージャで新規マテリアルを作成し、 マテリアル編集で開きます。 マテリアルの名前を "planet_surface"に変更します。 できたらマテリアルを地球オブジェクトに適用します。 新しいマテリアルを最初に適用するときは、 インタラクティブレンダーの変更はほとんど気付きませんが、 他のチャンネルの調整を始めるとすぐに、 変更が適用されていることがわかります。 カラーチャンネルから始めますが、 地球の色を濃い青緑色に設定してください。 次に、発光チャンネルにはシェーダを使って 地球を照らす光の散乱をシミュレートを再現します。 あまり正確ではないと思われるかもしれませんが、 最終的には、物理​​的な正しさよりも、 見た目の良さがすべてになります。 だから、発光チャンネルをクリックして有効にします。 マテリアルのプレビュが白くなりました。 これは発光チャネルが、ピクセルを発光させるためです。 シーンの照明に関係なく、デフォルトでは色は白に設定されます。 クロムで光沢を出した時のように このチャンネルにシェーダーを追加すると、 見た目が大幅に変更されます。 テクスチャメニューをクリックします。 テクスチャのリストに最初は驚くかもしれませんが、 すぐになれると思います。 リストはいつでも開くことができます。 サブメニューにはシェーダもあります。 特殊効果のサブメニューの下にはChanLumというシェーダがあります。 名前は謎めいていますが、その結果が重要です。 このシェーダをマテリアルに追加しても何も起こりませんが、 これはプロシージャルシェーダによくあることです。 こうしてシーンの他のものに依存するものがあります。 シェーダ名をクリックしてその属性を編集できます。 効果の効き目を調整を始めましょう。 ChanLumシェーダは、ソリッド(閉じた)オブジェクトを通過する 光の外観を模倣します。 つまり、結果は光が当たった時に、大きく影響しています。 これが結果をすぐに確認出来なかった理由の一つです。 ここで、大きな問題が2つあります... このシェーダは影を落とすライトにのみ機能し、 またシーンにはたくさんのライトがあります。 どのライトがこのシェーダに影響を与えるかを制御したいので シェーダにはライトオブジェクトのプロジェクトタブと同じ 含む/除外のリストがあります。 このシェーダには、地球のバックライトだけを対象にして、 ロケットのノズルからの光はシェーダに影響を与えないようにします。 つまり、シェーダの含む/除外リストを[含む]に設定する必要があります。 これでリスト内のオブジェクトだけがその計算に含まれるようになります。 リストの選択ピッカーモードにして、 「planet_backlight」と「rocket_launch_glow」をクリックします。 最後に、両方のライトがリストに設定されると ピックモードを終了するには、escキーを押しか、 ピックアップアイコンを再度クリックしてください。 次に、両方のライトが影を落とす設定になっているか確認します。 ライトオブジェクトをクリックし、 影のドロップダウンからシャドウタイプの1つを選択してください。 今回の場合、レイトレースを使います。 それが完了したら チャンネルとシェーダが、それぞれのライトの影響を 受けていることがわかります。 レンダープレビュで効果が見えるようになりました。 次に、効果の見た目と品質を調整するために 他の属性の調整を始めます。 まずはサンプル半径から調整を始めます。 こうすると、より明るい部分が離れるに従い、 フェードアウトしていることに気付くでしょう。 サンプル半径を約360に設定すると、 地球全体のほぼ全体にかすみを作成できます。 レンダリングのノイズが気になると思います。 一般的にレンダリングでノイズが発生する原因は、 十分なサンプル数がないためです。 この場合、 最初にインタラクティブレンダーの設定を、 可能な限り高い品質にしてレンダリングする必要があります。 それからシェーダのサンプルの数を増やします。 これで結果が滑らかになりますが、 レンダリング時間が長くなる可能性があります。 すべての設定が出来たら、効果の状態がよくなったと思います。 地球はまだ白いだけで、 単色の地球に大気があるようには見えません。 したがって、シェーダの混合を行う必要があります。 テクスチャメニューを再度クリックして、レイヤシェーダを選択します。 発光チャンネルにレイヤシェーダが追加されましたが、 レンダリングしてもマテリアルの外観は変化していません。 テクスチャリンク欄のシェーダ名をクリックすると レイヤシェーダのインターフェイスが表示されます すでにシェーダがリストに入っています。 これは、レイヤシェーダを追加したときに テクスチャフィールドにあったシェーダが レイヤシェーダのソースとして追加されました。 最初にレイヤシェーダを追加したときに レンダリングが変更されなかった理由も同じです。 さて、このシェーダはどうして特別なのでしょうか? レイヤシェーダを使用すると、 異なるシェーダを組み合わせることができます Photoshopで複数のレイヤーを組み合わせるのと同じです。 Photoshopでは、 既存のレイヤーの上に調整レイヤーを作成して、 新しい効果を追加したりできますが、 こちらでも同じことができます。 まず、新しいシェーダをリストに追加します。 レイヤシェーダの上部にあるボタンをクリックすると 利用可能な様々なシェーダにアクセスできます。 中にはいくつか特殊効果もあります。 シェーダボタンをクリックし、フレネルを選択します。 フレネルシェーダが追加されると シェーダアイコンをクリックすると、シェーダの属性を編集できます。 さて、レイヤーシェーダに戻りたい場合は 発光チャンネルをクリックしようとするかもしれませんが、 そうすると完全に最初の状態のところに戻ります。 つまり、またレイヤシェーダをクリックして戻る必要があります。 それからフレネルシェーダに戻り、 ようやく属性が編集できるようになります。 この手順の代わりに、マテリアルマネージャの上部にある 矢印を使用することができます。 これを使えば、属性を元に戻すことができます。 つまり、戻るをクリックすると、レイヤシェーダに移動します 発光チャンネルの属性まで戻る必要がありません。 さて、フレネルシェーダを使いました。 ChanLumシェーダの効果が上書きされていることがわかります。 だから、今度はフレネルシェーダの合成モードを変更します。 シェーダ名の右にあるドロップダウンをクリックします。 合成モードをこのリストから選択できます。 今回の場合、乗算を選択すると、 ChanLumシェーダの効果を制限できます これはフレネルシェーダの強度に基づいています。 結果はだいぶ良くなりましたが、 実際には色の問題はまだ解決していません。 シェーダメニューをクリックすると、 「カラー変換」というシェーダがあります。 これは、その画像の明るさの値に基づいて その画像にグラデーションをマッピングできます。 これをレイヤシェーダに追加すると、最初は何も起きませんが、 これは、カラー変換がソースを必要とするシェーダだからです。 したがって、戻るボタンをクリックし、 カラー変換の名前をクリックし、 Deleteキーを押してレイヤシェーダからシェーダを削除します。 今回はこのメニューの下にあるレイヤ効果ボタンをクリックすると、 「カラー変換」というエフェクトが見つかります。 これを追加すると、レイヤシェーダのインターフェイスに グラデーションが表示されます。 シェーダをクリック&ドラッグすると、 階層の場所を変更することができます。 レイヤ効果はその下のシェーダにのみ適用されるため カラー変換の効果はフレネルシェーダと ChanLumシェーダの間に配置します。 するとChanLumシェーダの結果にのみ影響を与えるように設定できます。 設定したら、グラデーションの調整を始めます。 これで、ChanLumシェーダのエフェクトに 色を追加できるようになりました。 色を追加するには、グラデーションの調整を開始する必要があります。 これにより、明るさ応じて色を追加できます。 まず、左側のノットをダブルクリックして、 これを青緑色に設定し、[OK]をクリックします。 次に、右側のノットをダブルクリックして ライトブルーに設定し、[OK]をクリックします。 最後に、このすべての上にノイズを追加して、 雲をシミュレートするようにします。 ノイズはマテリアルの作成において便利な機能です。 テクスチャのバリエーションを素早く簡単に作成できるので、 レイヤシェーダと組み合わせることで、 画像とブレンドすることもできます。 シェーダボタンをクリックし、ノイズシェーダを選択します。 また、すべてが上書きされました。 フレネルシェーダを選択して、ノイズに乗算されるように設定します。 ここで、ノイズアイコンをクリックすると、 ノイズを制御する属性にアクセスできます。 ここにある属性の多さに驚かないでください。 ただ、後で時間を掛けて設定を触ってみてください。 ここでは、ノイズのドロップダウンから Wavy Turbulenceを選択し、 スケールを約300%に設定します。 こうすると、 あなたは地球の表面に雲に似たものを追加されるはずです。 最後に、地球の表面にあるスペキュラハイライトを調整しましょう。 スペキュラ(R16以降は反射)チャンネルをクリックしてから、 幅、高さ、減衰の設定に移動します。 幅を約50%、高さを約70に設定し、 少し極端なハイライトのように見えるかもしれませんが 減衰にマイナスの値を設定すると、面白い効果に仕上がります。 それができたら、履歴保存して次の動画に移ります。
Neste vídeo você vai aprender a criar os materiais para o planeta. Neste caso você quer criar um material que tenha uma variação na superfície, mas que também seja gerado diretamente dentro do Cinema 4D, permitindo que o material interaja com as luzes da cena. Isso significa que você precisa ter mais do que uma cor lisa, e algo que seja mais do que uma sequência de imagens, que também sofreria dos possíveis problemas com as projeções de textura, além de que em alguns objetos, exigiria UV's adequadas. Você também vai aprender sobre a Interactive Render Region (região de renderização interativa) or IRR. Esta ferramenta é muito útil na pré-visualização das mudanças que você faz nos materiais em sua cena, permitindo que você veja como um material vai parecer em sua cena, sem ter que fazer a renderização ao Picture Viewer. Você já teve um vislumbre do que é uma textura procedural quando utilizamos o Shader Fresnel. O Shader Fresnel reagiu ao ângulo da câmera em relação a superfície do objeto, proporcionando a você um gradiente que pode ser usado para visualizar este ângulo. Apesar do fato chave aqui parece ser que este efeito não poderia ter sido feito de outra maneira, isso não é a única parte importante. O próprio Shader é recalculado em cada novo quadro. Ele também pode ser independente da projeção da textura e provavelmente o mais importante é que estes Shaders são paramétricos. Isso quer dizer que eles possuem atributos que você pode ajustar para um controle básico sobre os resultados do Shader. O Shader Fresnel é apenas um dos muitos Shaders que funcionam assim e é importante que você entenda como você pode utilizar estes Shaders, já que eles podem lhe auxiliar a salvar tempo no preparo de texturas no Photoshop e até ajudar a adicionar uma variação as suas texturas, dando a elas uma aparência mais natural. Então, para começarmos a explorar mais a texturização procedural, o próximo material que vamos criar é o do planeta. Mas antes, você vai querer configurar o IRR para poder pré-visualizar as mudanças do seu material de forma rápida e fácil. Agora, se você estiver vendo um grid UV no viewport, como você vê agora, certifique-se de voltar ao modo Object utilizando um dos botões a esquerda e desabilite o Axis Modification. Clique e segure sobre o ícone Render to Picture Viewer. Então, no final da lista, selecione Interactive Render Region. Assim que você fizer isso, uma região de pré-visualização vai aparecer, representada por um retângulo pontilhado no viewport e a renderização vai começar. Se você deslocar o mouse sobre as bordas da caixa, você verá que o cursor muda. Isso significa que você pode clicar e arrastar para reposicionar a região de pré-visualização e se você segurar o mouse sobre um dos pequenos quadrados nos cantos ou no ponto central das bordas, você poderá redimensionar a região de pré-visualização. Por último, assim que você tiver um tamanho que lhe agrade, existe um pequeno triângulo do lado direito da região de pré-visualização. Ao clicar e arrastar este triângulo permite que você controle a qualidade da renderização de pré-visualização. Se você arrastar este triângulo para cima na região de pré-visualização, então a imagem será renderizada utilizando as mesmas configurações do Render Settings. Se você arrastar para baixo, irá reduzir as configurações. Isso é útil quando você precisa ter uma ideia geral da cena ao invés de visualizar os detalhes. Também significa que você terá um render mais rápido. Assim que a região de renderização estiver configurada, você pode começar a trabalhar no material. Comece criando um novo material no Material Manager e então abra o Material Editor. Altere o nome deste material para "planet_surface". Feito isso, você deve aplicar o material para o objeto planeta. Quando você aplica o material pela primeira vez, você não vai notar muita alteração na IRR mas no momento que você começar a ajustar os outros canais, você vai ver as alterações aplicadas. Vamos começar com o canal Color, configurando a cor do planeta para um azul esverdeado escuro. Agora vamos usar um Shader no canal de Luminance para ajudar a simular a dispersão de luz através do planeta. Apesar disso não soar muito preciso, no final o que importa é se parece bom e não se é de fato fisicamente correto. Clique no canal Luminance e o ative. A pré-visualização de material vai se tornar branca. Isso ocorre porque o canal Luminance vai fazer os pixels ficarem bem claros, não importando a iluminação na cena, e por padrão, a cor é configurada para branco. Exatamente como criamos o brilho para o Chrome, assim que você adiciona um Shader a este canal, ele vai alterar o visual drasticamente. Comece clicando no menu Texture. Agora, a lista de Shaders pode ser intimidante a primeira vista, mas existem alguns que você vai sempre acabar voltando e estes estão listados aqui, mas temos também Shaders em sub-menus. Abaixo do sub-menu Effect, você pode encontrar o Shader ChanLum. O nome pode parecer um enigma, mas o resultado é o que importa. Quando você adiciona este Shader ao seu material, nada acontece e isso às vezes pode ser o caso com Shaders procedurais, já que geralmente eles dependem muito de outras coisas em sua cena. Agora, se você clicar no nome do Shader para editar os seus atributos, você pode começar a ajustar o visual do efeito. Resumindo, o Shader ChanLum tenta imitar o visual da luz passando através de um objeto sólido. Isso signfica que os resultados são fortemente conectados as luzes que o acertam e é parte da razão porque você não está vendo nenhum efeito ainda. Temos dois problemas principais aqui ... O Shader apenas funciona com luzes que lançam sombras e nós temos muitas luzes na cena. Como você quer ter controle sobre quais luzes podem afetar o Shader, o próprio shader tem uma lista de inclusão/exclusão, muito parecida com a aba Project de um objeto de luz. Então para este Shader, o que você quer é ter apenas a luz de destaque do planeta e a luz de brilho da ignição do foguete afetando o Shader. Isso significa que você precisa configurar a lista Include/Exclude do Shader para Include, assim ela vai apenas incluir objetos que estão na lsita para fazer o cálculo. Isso significa que você quer começar uma sessão para selecionar objetos para a lista, e então clicar no "planet_backlight" e no "rocket_launch_glow". Por último, assim que ambas as luzes estejam inseridas na lista, você quer finalizar a sessão de seleção ao apertar na tecla Esc ou ao clicar novamente no ícone em forma de flecha. Agora vamos nos certificar que ambas as luzes lançam sombras. Clique nos objetos de luz e então certifique-se de selecionar um dos tipos de sombra no menu suspenso Shadow. Neste caso, vamos escolher Raytraced Shadows. Feito isso, você pode notar que o canal e o Shader estão sendo afetados apenas por estas luzes e você pode ver um efeito visível na janela de pré-visualização. Vamos começar a ajustar os outros atributos que afetam o visual e a qualidade do resultado. Comece ajustando o Sample Radius ... Conforme você faz isso, perceba que as áreas que estão mais claras começam a dissipar através de uma distância maior. Ao configurar o Sample Radius para algo em torno de 360, você pode criar um tipo de neblina sobre quase o planeta inteiro. Você pode notar também um certo ruído na renderização. Geralmente quando você percebe um ruído na renderização, isso significa que não existem muitas Samples/Amostras. Neste caso, você primeiro deve configurar a IRR para que ela esteja renderizando na melhor qualidade possível. Depois, você pode começar a aumentar o número de Samples que o Shader utiliza. Isso vai ajudar a suavizar os resultados, mas devemos notar que isso pode ocasionar renderizações muito mais longas. Assim que você tenha toda essa configuração feita, o efeito parece melhor, mas ele ainda é uma simples cor branca e não está convencendo no visual de um planeta sólido com uma atmosfera. Neste caso, você deve começar a combinar Shaders. Se você clicar no menu Texture novamente, você pode selecionar o Shader Layer/Camada. Isso irá adicionar o Shader Layer ao canal Luminance, mas ele não altera o visual do material na renderização. Mas se você clicar no nome do Shader no campo de conexão Texture, você será apresentado com a interface do Shader Layer, assim como um Shader já presente na lista. Isso ocorre porque quando você adicionou o Shader Layer, qualquer coisa que já estivesse no campo Textura foi adicionado como uma fonte para o Shader Layer. É por isso que a renderização não mudou muito quando você adicionou o Shader Layer. Mas o que faz este Shader tão especial? O Shader Layer permite que você combine diferentes Shaders juntos, muito parecido com a combinação de Layers que você faz no Photoshop. Então no Photoshop, você pode criar um Layer Adjustment no topo de um Layer já existente para adicionar um novo efeito e o mesmo se mantém verdadeiro aqui. Para começar, vamos adicionar um novo Shader a lista. Se você clicar nos botões no topo do Shader Layer, você terá acesso aos diferentes tipos de Shaders disponíveis, como também alguns efeitos especiais. Então, clique no botão Shader e depois escolha Fresnel. Assim que o Fresnel for adicionado, você pode clicar no ícone do Shader para editar os atributos daquele Shader. Mas se você quisesse voltar ao Shader Layer, você poderia pensar que teria que clicar novamente no canal Luminance, mas isso faz você voltar até o começo, o que significa que você precisa clicar de novo no Shader Layer, e então de novo no Shader Fresnel se você quisesse voltar a estes atributos. Ao invés, você pode apenas utilizar as flechas no topo do Material Manager. Elas permitem que você volte uma etapa para trás pelos atributos. Então, ao clicar na flecha para trás, ela te leva de volta ao Shader Layer ao invés de voltar tudo até os atributos do canal Luminance. Agora, desde que adicionamos o Shader Fresnel, você pode ver que ele sobrescreveu os efeitos do Shader ChanLum. O que você pode fazer aqui é configurar o modo de combinação do Shader Fresnel. Clique no menu suspenso a direita do nome do Shader e então selecione o modo de combinação de sua escolha a partir da lista. Neste caso, ao selecionar Multiply, você pode limitar os efeitos do Shader ChanLum, baseados na intensidade do Shader Fresnel. Apesar disso começar a ter um visual melhor, ainda não resolve nosso problema com a cor. Se você clicar no menu Shader, você vai ver que existe um Shader de nome Colorizer. Ele permite a você mapear um gradiante a uma imagem, baseado nos valores daquela imagem. Quando você adiciona isso ao Shader Layer, ele não faz nada a princípio e isso ocorre porque o Colorizer precisa ter um Shader como a sua fonte. Então clique no botão para voltar, depois clique no nome Colorizer e aperte Delete para remover o Shader de dentro do Shader Layer. Desta vez, clique no botão Effects e abaixo desde menu você pode encontrar um efeito chamado Colorize. Quando você o adiciona, você verá um gradiante na interface do Shader Layer. Agora você pode clicar e arrastar o Shader para alterar sua localização na hierarquia. Já que o efeito é apenas aplicado nos Shaders abaixo dele, ao posicionar o efeito Colorizer entre os Shaders Fresnel e ChanLum, você pode configurar ele para afetar apenas os resultados do Shader ChanLum. Assim que você tenha feito isso, você pode começar a ajustar o gradiente. Isso vai permitir que você adicione cor aos efeitos do Shader ChanLum. Para fazer isso, vamos começar ajustando o gradiente. Isso permite que você adicione cor ao Luminance. Comece clicando duplamente no controle do lado esquerdo e configure ele para uma cor azul esverdeada e depois clique em OK. Agora, clique duplamente no controle do lado direito e configure ele para uma cor azul clara, depois clique em OK. E por último, você pode querer adicionar um Noise/Ruído no topo para simular o efeito de nuvens. Ruído é uma ótima função para se usar quando se cria materiais, já que ele permite uma maneira rápida e fácil de criar variação em suas texturas, e ao usar o Shader Layer, você pode ainda combinar com imagens. Então clique no botão Shader e então selecione o Shader Noise. Novamente, ele vai sobrescrever tudo. Igual fizemos com o Shader Fresnel, configure o Noise para Multiply. Agora, clique no ícone do Noise para ter acesso aos atributos que controlam o ruído. Não se preocupe muito com todos os atributos que você vê agora, mas gaste um tempo depois para explorar eles individualmente. Por enquanto, selecione Wavy Turbulence do menu suspenso Noise, e então configure a Global Scale para algo em torno de 300%. Feito isso, você deve ter algo que é bem similar a nuvens na superfície do seu planeta. Finalmente, vamos ajustar o brilho Specular na superfície do planeta. Clique no canal Specular e procure pelas configurações de Width, Height e Fall Off. Configure o Width para 50% e o Height para 70%. Agora, isso pode parecer como um brilho extremo, mas ao configurar o Fall Off para um valor negativo, como -20%, você pode começar a criar alguns efeitos bem interessantes. Assim que você faça isso, salve incrementalmente e comece o próximo vídeo.
Resume Auto-Scroll?