Friday, March 13, 2020

Recreating Lava Rock Video & Continuing Texture

[Second Year] Specialist Animation Studies

 




Fri 13th Mar 20:

Due to technical issues, the file for the lava rock texture was unavailable, therefore a new recreation of the concept had to be remodelled in the Arnold Renderer and recorded. This was due to the unfortunate information found on Wednesday 11th in the morning when the video was unavailable on the University computers as the file was not on the USB.

A discovery was made upon exit of the University (on the 5th March) that the USB didn't retain the saved file for an unknown external reason.

The 'Behind the scenes' video - had to be re-created  due to the loss of the file, to produce a MP4 file which is presented below. It has been uploaded and is now accessible to view.

I needed lava rock for a hell environment that I was creating, so I used a tutorial from askNK to learn this skill and to vary the textures on it.



During the re-creation of the video, I placed a sphere and plane poly into a new Maya scene for production of the lava rock texture. In order to overview the scene, I turned off the view-port grid to give a clear perspective of the shape to be textured.

Furthermore, I selected the plane to create a display layer, turning on reference mode to then lock the shape into position. This would make the layer non-selective so no unnecessary changes could be made in error. (See 0:00:00 - 0:02:45) ****

After positioning the assets, I'm going to press T on my keyboard to bring the subdivision up on the screen and add 10 more subdivisions to the sphere (that already has 20 subdivisions). Then I'll open up the hypershader and docked it into the window. I had to remove some of the hypershader's windows that weren't necessary and easier to see, the only windows left were the material project windows. (See 0:02:45 - 0:04:22)

First I click Tab to find the Arnold AIStandard Surface texture which has many different controls like:

(Click Link to skip technical)

Base


Weight

The default weight of the base colour used on Maya is 0.800

Colour

With the white light source, the base-colour adjusts directly to set how bright the surface is by having the intensity at 100%.

It selects the percentage for the individual components of the RGB spectrum, when light doesn't disperse under the surface. Normally metal has a very dark or black base colour but  metal's that rust want a base colour.  A foundation-colour is mostly needed.


Diffuse file texture -> Base Color


Diffuse Roughness

The foundation component accompany s an Oren-Nayar reflection model with surface roughness. A value of 0.0 is similar to a Lambert reflection. Higher values will conclude in a rougher surface look more usable for materials like concrete, plaster or sand.


Metalness

 Metalness 1.0 - the surface acts like a metal, using complete specular or mirror like reflection and complex fresnel.


Specular


    Weight

    The specular-weight. Impacts the brightness of the specular highlight.


    Colour

      The colour of the mirror like reflection will be harmonised with! Use this colour to 'tint' the specular highlighter. You should only use coloured specular for certain metals, whereas non-metallic surfaces usually have a monochromatic specular colour. Non-metallic surfaces normally do not have a coloured mirror specular surface.


      Roughness

        Controls the glossiness of the specular reflections. The lower the value, the sharper the reflection. In the limit, a value of 0 will give you a perfectly sharp mirror reflection, while 1.0 will create reflections that are close to a diffuse reflection. You should connect a map here to get variation in the specular highlight.


        The brightness of the specular highlight is automatically linked to its size due to the standard surface shader energy-conserving nature. In the example below, all of the materials are reflecting the same amount of light but, the rougher surface is spreading it out in multiple directions. However, with minimal roughness, the surface is reflecting a more concentrated amount of light.



        Transmission


        Colour

        When using a fully saturated colour like (1, 0, 0), that is interpreted in a way when all red light is allowed to pass through, but no green or blue light is transmission colour values nearing 0 make the interior of the mesh very dense to block all light, and then set the depth multiplier to a small value like 0.001 might not make much of a difference because the depth is large anyway.



        Subsurface


        Weight

        The 'blend' between diffuse and subsurface scattering when set to 1.0, there is only SSS, and when set to 0 it is only Lambert so in most cases it needs to be 1.0 (full SSS).


        Coat


        Weight

        The coat layer simulates a dielectric -think plastic, glass, resin/enamel, many liquids- which absorbs light and so tints all of the transmitted light (save may be some very minor polarisation effects), while metals, on the other hand, tend to filter the colour of whatever it is they are reflecting, even at grazing angles. Therefore, if what you want to render a bare metal, the coat_weight should be 0.



        Sheen


          Colour

            **The colour of the fibres. Tints the colour of the sheen contribution.


            Roughness

              This modulates how much the microfibers diverge from the surface normal direction.



              Emission


                Colour

                  ***The colour create the effect of the light being emitted. ***


                  This is my Lava Rock, and I used emission to make it (AS SEEN BELOW)




                  I used the surface texture to make the sphere a white colour to start off with. I rendered the sphere in the Arnold renderer but it made the image black.


                  The image turned black because I forgot to add an AISkydomeLight to the scene because when using an Arnold renderer the default light won't work and will need an Arnold light to light the scene.

                  After adding the skydome, I needed to add a display layer to the skydome to make it a reference layer so it would be unselectable. Having that light in the scene when I rendered it, Arnold will make the sphere a reflective white colour because of the Arnold surface texture. I had to reposition the sphere to make it a better view to see the development of the texture.


                  After rendering, in the Render View, I realised I could render the scene quicker in the Arnold Render View. When I rendered the scene in the Arnold Render View, it made the scene brighter.


                  The next step I need to do is add an AIMixShader which will allow me to blend two shaders together. So I connected the Out Colour (of the grey part of the aiMixShader node) to the Surface Shader (of the blue part of the aiStandardSurface node). I centred the nodes by pressing F in the hypershader project window.

                  To show how the AIMixShader works, I will add one ColourCondition Shader and duplicate to get another. I will connect colour condition 1, Out Colour to shader 1 (of the grey aiMixShader node) and connect the other condition Out Colour to shader 2. (See 0:11:02 to...)

                  So I will click one of the condition then change the colour to red in the Attribute Editor, then I will do the same in the other condition but change it to green. 

                  After changing the colours in the conditions I realised my version of Maya had different types of Colour Condition than the tutorial I was learning from. My conditions had a Colour A and a Colour B for both of them so I was struggling how to turn one condition a single colour and the other the same when I was changing the amount of mixer it only mixed from green & black, not the red & green which I wanted. 

                  So I changed one condition's Colour A & B to green and the other condition's Colour A & B to red to fix the problem. After fixing the problem, I selected the aiMixShader node and press the Arnold Render View to see what will happen and if that fixed it. 

                  When I changed the mix weight of the mixer, it blends the two colours (Red & Green) together to create another colour. So when the mix weight is 50% it creates a yellow colour, 0% is red, 100%  is green, 25% is orange, and 75% is yellowy-green. (... 0:16:30)

                  Now we understand what a mixer does I will delete the two conditions and add another AIStandardSurface so I could mix them both together. Then I connected both of the AIStandardSurface Out Colours to the shaders on the mixer. 

                  On one AIStandardSurface I made the weight to be 1.000 and change the colour to black then did the same changes to the other AIStandardSurface but changed the colour to red. So the mixer will mix the black & red together to blend the colours and then put the mixer on 50% to create the flat red colour.


                  But if the texture doesn't update I needed to close the Arnold Render View and restarted so that the flat red texture would turn into a reflective red colour.


                  After making the sphere a reflective red colour, I had to change the mix weight to an amount of 0.839 which change the colour to a reddish black mix.


                  Now I need a node that controls the aiMixShader's Mix Weight. So, I had to add a Noise node to create a black and white marble texture.


                  In the noise attributes, I kept noise type (this property shows the different kinds of noises which does abilities things to noise) as the default billow. Then I connected the noise's (grey node) Out Alpha to the aiMixShader's mix node, which made the texture red with black smudges.


                  *Quick explanation on any node there is a red and green dots. Whenever a red dot is shown it needs to deal with colour information, so if a node in Maya that says out colour it will need to go to the red dots on the other nodes. But any of the nodes that show a green dot surely need black & white information, so each node dot has separate RGB colours connect to them but as one they form a colour.

                  After, I had to add a DisplacementShader node which gives the texture a rough rocky surface. So when the Displacement node was added it gave me a grey & blue node (that was connected). But I didn't need the blue node so I deleted it.

                  So I needed to connect the grey node from the green (out alpha) the right of the Displacement section of the Displacement node. But the grey node didn't have the green dot after I deleted the blue node so before deleted the node I should have connected it to the Displacement shader section of the Mixer's blue node. 

                  So as the dot disappeared, so I thought I had to connect the green dot on the left to the Displacement section of the blue node but that wasn't correct. So I had to right-click on the white dot of the Displacement node to create an Out Alpha for the Displacement. That let me connect the Out Alpha to the Displacement section of the blue node.

                  Then I had to connect the Noise's Out Alpha dot to the In Alpha dot of the Displacement section of the Displacement Shader.  So after connecting the node, I checked the Arnold Render View and for some reason, something went wrong. But I ignored it as it didn't show anything about it in the tutorial I was watching.


                  So I needed to change a few attributes in the Displacement node, so I need to see if the scale is set to 1.00. Then I needed to go into the sphere's setting and check if the Displacement Attributes' height was set to 1.00. I needed to go into the sphere's Subdivision setting to change the Iteration but when the Subdivision type was set to none it wouldn't let me change the Iterations. So I had to change the type to Catdark which would give me the ability to change the Iterations to 4.




                  *If Iterations if increased this will tell Maya to subdivide the polygon faces, letting this improve the Displacement quality when it starts rendering. So if I tell Maya to increase the Iterations by 4, it will pick one of the polygon faces on the sphere and divide it by 4. 

                  So if you have a polygon face the subdivision goes in and divides the polygon face into 4.


                  So if you subdivide the polygon face by 2, what happens is that Maya goes in and subdivides like the 4 faces by 4 again making the face into 16 faces.


                  This is where the mesh becomes dense, so you go from a single face to it being subdivided 4 then by 4 again. So this is how subdivision works.




                  But when I put Displacement on my texture, it acted differently to the texture askNK was creating. So I had to figure out what the problem was with mine and compare it with askNK's version. But when I was figuring out the problem when messing with the noise node, I accidentally pressed the space & right mouse key and let go on the solo button. This created a red box around the node making the sphere a black colour which this wasn't supposed to happen.


                  So had to fix another problem that I accidentally created. But doing this it didn't affect the render, just made it a little darker. 


                  So I thought if I click Solo again that might fix it but it definitely didn't. So I also thought if I reapply the AIStandardSurface (Red Material) to the sphere again that might fix it but that only made the sphere red. But that also changed the render to a red bumpy rock which I didn't want to happen.



                  So I thought why not try applying the other AIStandardSurface (Black Material) to the sphere which turned it black again and fixed the rendered image.


                  I kept going through putting the red bumpy rock to the black & red bumpy rock. I was so puzzled with both the Solo and the Displacement problems. I tried to undo everything to where the first Displacement problem happened but it wouldn't fix the Solo problem. So I right-clicked on the Noise node and pressed Remove Material Soloing which fixed the Solo problem. 

                  Now I needed to figure out how to fix the Displacement problem with my texture. For this problem somewhere in the pipeline of making this texture something went wrong. So with the Displacement problem, I was my fault as I rendered the texture before I needed to. But when I saw the tutorial it told me that I had to change the Displacement node's scale to 0.200.  


                  This made the sphere-cube back to being just a sphere fixing the Displacement problem. So I just lost a bit of time fixing something that didn't need to be fixed as the tutorial would have already told me how to fix it.

                  So crisis averted, but notice that the rock is clipping off some of the roundness of the sphere.


                  So this is one solution to fix the clipping of the texture, is to move the camera so that the roundness of the texture come back it's only clipping the texture in the display and only does this at certain camera angles. It is just a bug caused by Arnold Renderer, it's the coding problem of the program made by the people at Solid Angle & Autodesk. So moving the camera will fix this problem.











                  So after recreating the Stage 5 Behind the Scene video I continued on with Stage 6 adding glow and making the rock light up using Emission. (Video Below)


                  So after sorting Displacement and Clipping, I had to go into the red AIStandardSurface to change the name of it to emission as this is what I'm going to change node's properties to give the texture an emission glow colour.

                  Rather than having a red colour for this AIStandardSurface, I'm going to change the colour to white and turn down the weight to 0.000. Then I will go into the emission drop-down menu in the material to change the colour to red and the weight to 1.000 which will give the rock a red glow which will emit from the centre.



                  The emission emitting from the rock is great in all but it doesn't give that firey lava feel so how can we get that lava look to go over and above. So to get this look, I will need to add a Ramp node to the texture to give the emission (glow) an orange-yellowy appearance. 

                  After setting up the Ramp node, I had a look at its attributes to change the black colour to red and I changed the white colour to yellow. Which made a linear gradient going from red, blends into orange then turns into yellow.


                  But I don't want the bright yellow so I need to make it a dark orange to get that lava rock glow. So I want the rock to look hotter at the bottom of the rock so I made the red a darker colour.


                  Then I need to push the red colour closer to the orange to get more of the red colour at the bottom of the rock.


                  So after faffing with the gradient to get the right look, I change the Interpolation to smooth to move the blending of the red colour up the gradient. So after, I connected the grey node's out colour dot (of the Ramp) to the Emission colour node of the black AIStandardSurface and didn't do anything to the rock in the render. This is because it was not supposed to be connected to the black AIStandardSurface but the red material to make any effect on the render. So I had to disconnect it and reconnect the Ramp to the Emissions material.



                  After correcting this mistake, I was wondering how the other Ramp types would look on the rock so I change it to the Circular Ramp to see the difference from V-Ramp (the default).


                  But I didn't like the look of it so I went back to V-Ramp. After confirming the Ramp type as V-Ramp, I had to increase the Emission weight (in the Red AIStandardSurface) to 10,000 which gave the Lava rock a stronger slow.



                  But the emission was too bright for my Lava rock so I turned down the Emission weight to 8,000 which give Lava Rock a subtle glow and makes it better.



                  Then to get the Lava Rock to stand out, I made the skydome invisible making it turn off so that the glow will still show the rock in the dark and makes the rock look like a professional piece of portfolio work.



                  So if I want to change the colour of the gradient to get a different colour for another rock I can just change the ramp gradient colours. (See blog post)






                  References

                  askNK. (2019, 16 Apr). LAVA SHADING FOR NOOB & ADVANCED TEXTURING ARTISTS USING ARNOLD IN MAYA. [Video file]. Retrieved from https://youtu.be/QEKmtMJBl4c [Accessed 13th March 2020]

                  Solid Angle S.L. (2009 - 2018). Arnold: Standard Surface. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Standard+Surface [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). Base. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Base [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). Coat. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Coat [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). Displacement. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Displacement [Accessed 14th June 2020]

                  Solid Angle S.L. (2009 - 2018). Emission. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Emission [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). mix_shader. Retrieved from https://docs.arnoldrenderer.com/display/A5NodeRef/mix_shader [Accessed 14th June 2020]

                  Solid Angle S.L. (2009 - 2018). noise. Retrieved from https://docs.arnoldrenderer.com/display/A5NodeRef/noise [Accessed 14th June 2020]

                  Solid Angle S.L. (2009 - 2018). ramp_rgb. Retrieved from https://docs.arnoldrenderer.com/display/A5NodeRef/ramp_rgb [Accessed 14th June 2020]

                  Solid Angle S.L. (2009 - 2018). Sheen. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Sheen [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). Specular. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Specular [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). Subsurface. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Subsurface [Accessed 29th May 2020]

                  Solid Angle S.L. (2009 - 2018). The Attribute Editor. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/The+Attribute+Editor [Accessed 14th June 2020]

                  Solid Angle S.L. (2009 - 2018). Transmission. Retrieved from https://docs.arnoldrenderer.com/display/A5AFMUG/Transmission [Accessed 29th May 2020]