MA Perfecting The Look: Going Into Maya
So uh, as I predicted...yep its been a couple of weeks. The transition from Nuke to Maya was not entirely kind, as you shall soon see, but at least its progressing. So I'll take that over being stuck!
I also may have forgotten to take screenshots as I went...oops. So I'm having to do these kinda after-the-fact, but I'll still write out the process as normal and hope I don't forget something.
Creating the HDR for Maya
Before I could jump into Maya, I needed to create an HDR image in Photoshop that would act as my source of light inside Maya. Its a bit like having a skybox in games.
Luckily, images were also provided for me to work with that took photos of the location at different exposure levels. The slight downside here is that I didn't save a PSD file for this and only have exr files...which means no layers to show what I did in PS. Which kinda blows.
So as an incredibly short summary, the process basically involved combining these multiple images of differing exposures into one image followed by painting the areas of the sky I wished to increase the brightness of and adjusting the values through the exposure and levels settings for that mask. The file then needed to be written out as an exr and, after 3 different edits, I ended up with this:
The reason the brightness of the sky in particular is important is because it will have an impact on the lighting in the Maya scene when I create a skydome to act as the light source. By checking what brightness values I was getting for my sky pixels inside of Nuke, I can try to (hopefully) get better lighting quality. So, the higher the pixel values from the PS adjustments, the brighter the sky, which means a better skydome to work with in Maya.
Maya Time Everybody
Right, so the first thing to do was bring in the FBX of my Nuke scene. Bringing that in brought in all the other bits - the ground, point cloud, etc. - and all that really needed doing at the start was some setting up of the scene. My imported camera needed to be told to use my image sequence for my footage so that I can see the film. This is done under the imagePlane tab by providing the first frame of the sequence and enabling the "Use Image Sequence" option.
Now I have background footage, hooray! Next, I increased the size of my point clouds and then...hid them away. Apparently they aren't really needed, so I guess I worried about them for nothing, but hey ho!
Now its time to add the skydome! With it in the scene, I can tell it to read from a file to generate the dome and provide lighting by using the HDR file I created earlier:
Things were going well...until they didn't.
It turns out that something went wrong with the ground plane and was no longer aligned correctly like in Nuke. I tried adjusting it inside of Maya, but because I used the skew feature in Nuke to align the plane with the corner wall, it wouldn't work. Ultimately, I just created a new ground plane inside of Maya and got it to match the angle at which the wall was pointing (the second image below):
Now I can start bringing in assets!
The first thing I imported was a cherry blossom tree and a base to go with it so that it didn't look like it was just existing on top of bricks, that wouldn't make sense. I needed to make sure the scale was consistent with the real-world, so I searched up what the typical height of this tree is and created a pair of locators to help me measure the height until I got it just right (about 968cm).
To make sure that the textures being used would be using PBR, I had to replace the automatically generated ones with aiStandardSurface materials that come with Arnold. I named all the materials to make sure that I connected the corrected textures into the correct connections, which gave me the look you see above. This, however, does not look like the tree I saw on the website I downloaded it from, which meant I had missed something. I left it for the time being and focused on setting up my scene further by adding some grass, with plans to address the texture confusion later on.
At this point, I could see one glaring issue, which was that my assets were being rendered on top of things in the footage where it wouldn't make sense. The sense of depth was missing and I knew I needed to somehow make it look like these assets were behind the stairs.
Thanks to the teaching material, I learned that I can create primitive geometry and apply an aiShadowMatte material to it which would cause the Arnold Renderer to recognise that it shouldn't give these assets a material to display when rendering. Instead, they would act like a silhouette so I could make it appear that the stairs are in fact closer to the camera than the vegetation. It doesn't look like much is happening in the scene views, but this is how I started building up the stairs geometry:
Oh, I should mention - I was using the Reference tool to import the assets as opposed to adding them another way! Creating references is apparently quite a good way of reducing the file size of the Maya scene, alongside using Duplicate Special to create Instances of a reoccurring object. In my case, this would be the grass patches!
I realised at this point that the current ground plane wasn't going to cut it, since I needed it to match the shape of the brick flooring in the footage. I probably could've done the masking solution, but instead ended up creating a new plane and editing its vertices and edges. I finished in the end with 3 different planes which were all adjusted differently and just had to hide the planes I no longer planned to use (the top 2 images below).
Afterwards, I got a grassy texture to use for the ground plane to replace the brick flooring with something more natural that would make the grass and tree seem like they could have grown there. Things were going well with the assignment of materials until I didn't know where to connect my displacement map. I opened up the Hypershader and, after doing some digging and coming across this solution, I was able to fix my height map into the correct connection and get some more dynamic terrain! It turned out to be pretty similar to ShaderGraph in Unity which helped make the learning process a bit smoother.
I continued to create grass so that the environment didn't feel too empty whilst trying to not go overboard with how many assets were in the scene. I tried to place and scale them strategically to create the illusion that there is lots of grass when in fact, there wasn't that many objects. Some tweaking to the stairs silhouette group and an additional cube for the left wall were done until I finished with this:
Things were starting to come together for the object placement, but I felt that something was needed for the area above the hollow log. It looks a little odd for the grass to suddenly stop and turn into bricks, plus the potted plant is much blurrier than the grass that is nearby, so it looks off.
I found a nice gate asset online but I couldn't reference it as-is like I had done for everything else. The reason was because it had additional geometry that I didn't need, and referencing an asset locks its attributes so it cannot be edited. I brought the gate into the scene manually and deleted the unneeded parts before exporting it as a new asset and referencing this instead:
In the Arnold renderer, the effect was starting to come together:
So for the most part, things were going alright. The most troublesome encounter thus far has been making sense of the hypershade and the aiStandardSurface material connections for plugging in textures. For the most part, I can make an educated guess as to where certain textures should be connected to, but generally I found myself going through online documentation and forums to be certain.
One example is the ground plane. The reason I ended up with 3 is because I wasn't sure how I could control the tiling of my texture to make it less obvious that it was a repeated texture. I came across this video by Game Dev Academy who showed me how to use planar projection mapping to project a texture onto a surface and then control the tiling of it that way, which was very neat!
There was also this video by Josh Antonio which helped me understand how to get my height maps to work and be visible in the renderer by increasing the number of subdivisions within the mesh. It also showed me that the scale value was how I could control the strength of the displacement to get a less smooth surface.
The last confusing thing to plug in for my plane was the ambient occlusion maps, which I had no clue where they needed to go. I found a couple of solutions online, such as one user on the Autodesk forums who suggests connecting them into the aiStandardSurface.advanced.Indirect Diffuse and Indirect Specular connections, and another on Reddit who suggested to use an aiComposit node and changing the blend mode to multiply. In the end, the former suggestion seemed to work best, which is the one I went with (seen in the above hypershade graph).
I also encountered some confusion with setting up the materials for my tree, since it came with a few variations of the bark texture but I could only get one of them to show. After talking to the professor about it, we came to the realisation that the intent was that different parts of the tree should have different textures so that it doesn't look the same. This is when I got reminded about being able to select UV shells, which I could then apply a specific material to them to make the thinner branches use the smaller textures, the bigger branches for the bigger textures, and the trunk to use the largest textures. In the following graphs, material 01 is for the thinnest branches, 02 is for the larger branches, and 03 is for the trunk of the tree.
I was also concerned about how the leaves / petals would look in the final render because they appeared to be black for half of them inside the viewport. There were 3 textures for the flowers which eventually led me to think that one of them is supposed to be used as the back surface for the leaf geometry, but I was unable to correctly merge and display them in the end. Fortunately, the renderer doesn't actually show the black backs of petals that are in the scene, so I didn't have to worry too much and could stick with the simple node graph:
Pretty decent progress has been made! Now that I've done a fair few setups for materials, a lot of the common ones (like diffuses and height maps) are becoming more ingrained in my mind as to where they need to be connected to and how they need to be set up. Assets like the hollow log and gate are becoming pretty straightforward to setup, with the occasional curveballs here and there for unique textures, so I have been developing my understanding of the hypershade tool quite nicely. And with materials and textures in general, since I now know how to do the masking silhouette...thing to create depth in my scene!
The tree setup should be in a good spot for when I look to create particles inside of Nuke. A nice tutorial by the Foundry explains it nicely and quickly, although it is from 2013, so I might need to search up some stuff if things are out of date. I'll also be looking to bring in the butterfly asset soon to animate it flying through the log and around the scene using something called a motion path, which will hopefully be done by the time the next post is due!