• Mike

MA Perfecting The Look: AOVs, Render Layers, Animated Characters, & Troubleshooting

Welcome back!


This post might end up being the largest of the lot so far since there is a lot of stuff I want to try and cover in it. Its a real mix of ups and downs with fixing things and being unsuccessful in fixing others 😫 so I should probably get started.

 

Minor Changes


Since last time, I learned that I had not correctly set up the height map for my hollow log so it wasn't actually showing at all during renders. It was a very small change - I needed to set the Scalar Zero Value to something other than 0. The value I used was 0.5 which then made it appear correctly - I basically forgot to tell the shader how much strength the height map needed to have, oops. Its hard to see, but here's a before (left) and after (right) screenshot:

I also learned about something called subsurface scattering, which is where a simulation occurs to mimic light entering an object and scattering beneath its surface. This is only really needed when light isn't being bounced off of a surface, so in my scene I only applied a small amount to my grass objects within their grass materials:

This produced the following result which looks quite nice:

Now, you might have noticed a bit of a disconnect between this image and the previous captures, namely that the log appears to be floating now. At this point in time, I wasn't too concerned about this since I thought it might be a bug in the renderer. The viewport views all displayed the scene as I had intended it to look, but it would seem that something happened somewhere that broke the displacement map settings I had done previously. In any case, I left it with plans to address it later once I had sorted out the rest of the things on my to-do list which would complete my scenery.

 

Learning Motion Paths for a Flying Bee


So, my original intention was to use this butterfly asset I had come across on CGTrader but I kept having issues where it would break the imagePlane settings for my ShotCamera that was exported from Nuke, as well as changing the frame range settings. Whilst I was floundering around trying to make sense of why this was happening, I stumbled upon a really nice bee asset that showed up in the 3D Viewer app. It even had a few different animations, including a hovering one which looked perfect to have playing as it moved around the scene!

The issue was, this model was in a .glb format, which Maya cannot read. I converted it into a fbx format through Blender so that I could reference it in the scene, but then I encountered a new problem...I couldn't change which animation it was playing.


I scoured the web for any information on changing animations in Maya, in Blender, deleting unwanted animations in Blender...and had no success at all. Messing with animation windows and settings in Maya yielded no results, and removing animations in Blender and importing that fbx file still played an animation I didn't want and thought I had deleted.


So, I was stuck with the take off and landing animation and couldn't get the precious hovering one into my project. After discussing this issue with the professor, the only solution left seemed to be to delete the unwanted keyframes until only the brief hovering keyframes are left. As per his suggestion, I went into the animation graph editor to find the animations on the thorax joint to zero out the Y and Z translation keys. This is how the keys looked at first:

After zeroing out the translates, I also deleted all keys before and after the hovering animation so that it didn't appear as if the bee was landing and taking off while in the air. This is how it looked at the end:

With the animating out the way, I got some help with a couple of the textures since I wasn't having any luck with connecting a couple in the right places - namely, the metalness and ambient occlusion textures. Part of this was due to the fact the textures weren't actually named anything useful, so it was guesswork to figure out what went where. I was able to determine what the more obscure textures were thanks to the 3D Viewer app (again, the obscure textures were the metalness and AO ones).

I never did get the AO to work, even after using the info I had found online previously, so in the end I left it out of the node graph. The bee would be small and moving around the scene, so the viewer won't be able to notice these details.

Now, for doing the motion path, I used the information provided by Autodesk for creating and attaching an object to a motion path and added in a locator in front of the bee so that I could control the bee better. The bee then become parented to this locator, which was then attached to my motion path. After checking which axis would be the front of the bee (Z axis in this case), I got the following result:

Nice and easy! The bee is moving at some pretty extreme speeds around the scene, so I found information in the documentation on how to change speeds along a motion path which was very useful. Sadly, it didn't get me a result I wanted, which I think was down to how large the motion path was that I had created. After some more digging to find out how to remove a motion path from an object, I created a new one which was much shorter so that I could control the speed of the bee to get more effective results.


Sadly I didn't get a screen recording of this while it was working, and I wish I had, as you are about to see why in the next section 😭.

 

Setting Up AOVs and Render Layers


With the bee and motion paths all ready, I moved on to the next big beast of AOVs and render layers.


For my AOVs, I included the ones that I felt were the most important to have, which were diffuse and specular direct and indirect, motionvector and subsurface scattering (sss) AOVs. I included the Z to be safe based on the class material which suggested to include it. Then I began to break down what layers I would need to have for when I bring them back together in Nuke, ultimately finishing with 11 layers.

I got some assistance with setting up the render layer for my bee correctly, since I needed it to pass through an object at the end of the process, which required me to create a mask of the log so that it disappears and reappears correctly. This is when I used the duplicate special trick so that I could have a copy of the log but change its material to an aiShadowMatte for masking it out in the render. It would also save me space to stop making my project file larger.


At this point, things were looking good and seemed like it might be about ready to enter the dreaded rendering stage...except for one tinsy little problem. My bee broke.


For whatever reason, after creating the bee render layer, the skinCluster node was destroyed, causing the bee to break. The multicoloured lines represent the skeleton (which animates correctly) whilst the mesh, or the physical body, of the bee is in a default pose and not lining up with the skeleton:

After even more hours spent doing research online, I learned that the way to reconnect these is by using the "Bind Skin" option when in the Rigging workspace. The closest fix I got was using the following settings:

Sadly, the fix wasn't a true fix - whilst it did grant the bee its animations again, it for some reason resulted in the mesh flying off on a different motion path to the skeleton:

At this point, I just wanted to get to rendering and not worry about going through the entire process again for getting the bee to animate correctly, especially since the only thing I knew which had changed was I added it into a render layer. So, I undid this binding and accepted that the bee would end up static posing throughout my motion path. At least it is a small model so it shouldn't be too obvious that it broken...hopefully.

 

Closing Thoughts


Well, I did end up learning quite a lot of things - some of them inadvertently, like troubleshooting the broken bee - some of them more fun, like the motion paths. It definitely felt like a lot of hours were spent researching for things that I would've thought would have more information available online, like with dealing with animations. I'm sure there must be a way of changing what animation is being played, but it felt like I couldn't find a single thing on the topic, which didn't make any sense to me.


Anyway, I'm more or less ready to enter the rendering phase which will no doubt knock my computer out for some hours, so I'm going to let it cool down now and rest before I put that strain on it in the coming days!

0 views0 comments