Tuesday, 15 May 2012

My Oh Maya: bonus tools

So I realise that these last posts have been very boring and quite technical. I havn't been able to show you any more cool stuff from Night of Fire (even though I really want to!) because it's so close to the Glammies and I don't want to spoil anything. I will continue to post the technical stuff for NoF and also a bunch of tutorials and blogs that have helped me with the making of the film.

This latest Blog I have found is called My Oh Maya by Steven Roselle and it covers some really cool stuff that is very helpful. This is probably the most useful Blog I have come across! http://area.autodesk.com/blogs/stevenr

What caught my eye on My Oh Maya was the contious updates on the Bonus Tool features in Maya which is a collection of a bunch of free scripts and plug-ins that will speed up your workflow (Some of these are very basic and you would think Maya wouldn't need the use of a 3rd party plug-in to sort it out right?)


Link to the bonus tools post in My Oh Maya:
bloghttp://area.autodesk.com/blogs/stevenr/bonustools

Link to a random tutorial that also goes over a feature in bonus tools:
http://area.autodesk.com/blogs/stevenr/maya_2012_namespace_and_prefix_tips_and_tricks

Link to download the bonus tools:
http://area.autodesk.com/bonus_tools

Maya 2013 and Beyond: Animation Workflows for Games

Here is a link to what looks like a very interesting Webcast that will be shown tomorrow. It will show Steven Roselle going through some of Maya 2013 new workflow features in the context of animation for games. Even though I'm not an animator ... this should still be very interesting :)

http://area.autodesk.com/blogs/stevenr/maya_2013_and_beyond_animation_workflows_for_games

Friday, 11 May 2012

Useful Scripts For Maya

Wouldn't it be great if they made a 3D application where they don't have to rely on other people to sort out it's problems?

To make this project as efficient as possible I have downloaded a bunch of really useful scripts for Maya that I think every artist using Maya should have saved to there shelf.

1. File Texture Manager - Great for organising your texture files in Maya. You can set the path of all files or just selected files. You can even change the texture size and format inside of Maya for a more organized scene.

http://www.creativecrash.com/maya/downloads/scripts-plugins/rendering/misc/c/filetexturemanager

2. Deo's Reload Textures - Having to constantly reload every texture file that you change in Maya is frustrating and time consuming. You could just set the path inside of File Texture Manager but if this is saved to the shelf it's just a one click job :)

http://www.creativecrash.com/maya/downloads/scripts-plugins/texturing/c/deo-s-reload-textures

3. spPaint3D - A very easy way of duplicating or instancing objects and painting them on a target surface. You can do this inside of Maya but it is very buggy and generally pretty rubbish to use. This script gives you a lot of control but is also kept very simple.

http://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/misc/c/sppaint3d

4. Rivet - A simple script to create a rivet that will constrain itself to a target surface. You can then parent an object to this to have it follow it.

http://www.creativecrash.com/maya/downloads/scripts-plugins/animation/c/rivet-button--2

5. Rename Tool - This is possibly my favourite tool. It's pretty obvious what it does. I have to have a clean scene with everyone named correctly. Get it!

http://www.creativecrash.com/maya/downloads/scripts-plugins/c/rename-tool

Shading glitch in Maya.

 Ok so you're all probably bored of me going on about this but this lovely little bug/glitch has been my biggest set back so I had to find out what this is all about!!

Final result: Still don't really know what it is. Brilliant.

The good news is I have narrowed it down to a couple of reasons. I'm pretty sure this happens when a group of objects is selected and applied a shader in a specific layer when some of those objects are missing from the layer.

This strange little glitch also seemed to happen when selecting a group of objects from one layer and creating a new layer with the selected objects. This obviously doesn't sound right and might just be a bug with my Maya.

If anyone else out there has had this problem please comment and let me know what happened :)


Deleted shaders.

and again ....

 and again ...










Monday, 7 May 2012

Maya Hates Me! Ed Whetstone

Today I have found the king of blogs. Dedicated to Maya, this blog goes over some of the ways in which Maya wants to screw you over!!! Even if you don't find anything useful on there it's nice to just know there are other people out there getting the same (or maybe worse) problems you are getting inside of Maya.

http://mayahatesme.wordpress.com/

Apart from being the author of this blog Ed Whetstone is also a very good VFX artist who I came across in a Digital Tutors tutorial. Check out his website and you will see some pretty cool stuff as well as his own script that has a bunch of useful tools for Maya.

http://www.whetstonevfx.com/index.php

Binary Space Partition - What is it?

Carrying on from my last post I thought it would be a good idea to explain exactly what BSP is. Here is an extract from a blog that is dedicated to decreasing rendering time. The link is here http://renderfaster4maya.wordpress.com/ It has some really useful information that will help a lot of people when rendering complex scenes. The blog also goes through how to tweak the settings to get the best result .... probably should have read this before doing my tests!


What is BSP?
Mental ray uses BSP, or Binary Space Partition, to speed up its raytracing processes. Optimizing BSP settings can improve render speeds.
What is BSP Size and Depth?
Mental ray, to run efficiently, needs to know where each polygon is within your scene. BSP organizes your scene into sections. Each section stores a limited number of polygons. This limit is the BSP size.
If a section exceeds the limit with too many polygons, the section splits into two. This way, there will be a smaller number of polygons in each section. The BSP depth limits the number of splits.

More Ways To Speed Up Renders

Carrying on from the last post I have found a couple mroe ways to speed up the renders:

1: Looking through the texture files I have found there are a lot of textures that are a huge size and totally unecessary for the scene. I went through and changed each size of the textures and I also had to change any textures that were .JPG or .TGA to .PNG.

2: I also found that if my file textures are too large and I need them to be that size then I can change them to a .MAP file. This file format is memory-mappable, which means that Mental Ray can cut it up and use only bits and pieces in RAM as they’re needed. Also, it can flush those parts as soon as they’re done being used. There are a few fiddly ways to do this but thanks to the FileTextureManager script this can be done fairly easy.

3: Instancing my geometry. IIn the scene there are around 100 tents that are very high poly. My mistake was duplicating them without instancing them. This can be done with the Duplicate Special feature. I really don't want to reposition 100 tents again but I guess it will be necessary!

4: Most importantly .... Delete History and Optomize Scene File .... of course.

Mental Ray Memory

So when rendering the scene from my computer I am getting aMental Ray problem where it claims it's running out of memory .... yes of course you are, please ignore the 16GB of RAM I have on my computer and please go ahead and crash Mental Ray :)

Anyway I have done my research and this is the steps I have taken to try and solve the issue.

1: Close all other programme. I admit ... I might have had Photoshop and a few other propgrammes open when rendering. Rookie mistake. Apparently Firefox is a memory killer so I will definitely be keeping that off, tho I can't see that making too much of a difference eith 16GB RAM.

2: Unless I am trying to do quick test renders (which I do a lot) I will batch render. This should speed things up slightly.

3: Check my Acceleration Method and Memory Limit.

Here are my results after rendering a 640x480 AO pass and tweaking the settings

BSP2 - 4096 = crashed
BSP2 + 8912 = 1.19
BSP2 + Auto Limit (10859) = 1.21

Large BSP + 4096 = 1.01
Large BSP + 8912 = 1.01
Large BSP + Auto Limit (10859) = 1.00

So the last result seemed to give me the best performance. I'll now test out the BSP depth to see if I can decrease the time even more.

When rendering, Mental Ray subdivides or triangulates the scene in a perticular way that will try to keep thinking running faster. By going into the Diagnostics setting we can render out a visual representation of whats going on behind the scenes and then tweak the BSP settings. In this case I have done 3 renders of the BSP Depth.
 BSP Depth = 40 (default)
 


  BSP Depth =30



  BSP Depth = 50


 As you can see from the first render the front row of tents are almost completely red which is showing me that will take a very long time to render. Now I know there is something I need to change on the tents to speed up rendering.

The second image shows a BSP depth of 30 which has covered the image in red and orange which is the oppposite way I want to go. (Changing these settings does not actually change the look of the image, it is purely for how Mental Ray computes the renders)

I increased the Depth in the third image which now gives me more greens and yellows which would suggest it would speed up the rendering. However for some reason this isn't true. The second image increased the render time by a lot and the third increased it by some but not as much. I played around with the settings and did plenty of renders and found if I changed the Depth to 37 then I could shave off 5 seconds from my original render.This doesn't seem like a lot but when I change the render setting to 1080 and render off 3000 frames this will make a big difference.

Not only has that made a difference but it has also told me whats taking long to render in the scene so now I can go back and see what can be changed with the tents.


                                               RESULT!







Sunday, 6 May 2012

Render Layers - Part 2

 Ambient Occlusion, Z Depth, Object ID

Creating an ambient occlusion pass should be a fairly simple thing to do. That is until you involve transparency maps. I first created a new layer and applied a mib_occlusion shader to all the objects. I then found out that it didn't occlude the transparency maps I had for the leaves on the ground. Obviously leaves arnt an important thing in the scene but it was very frustrating for me to accept the fact that Maya will nto do this. I had to find a way! Turns out there is a way :D I had to create a perticular shading network that was very frustrating to set up as there is very little tutorials on the web so I spent my time just doing trial and error to get it finally working. A screenshot of the shading network is below.


Here is the proof that it does work!



Object ID was a pretty easy pass to do and it doesn't take long to render at all. I just created a bunch of different SurfaceShaders with different colours and applied it to different objects, making sure none of them overlap so it's easy to select whatever you wanted.


After a bit of research I found there are multiple ways of creating a Zdepth pass but the easiest way is to apply a LuminanceDepth preset to the render layer, break the connections it had on the shader and input my own numbers of a small min distance and a max distance of around 14,000. This was calculated using the Distance Tool.




We have also been asked by our VFX guy to render out a Normal pass and World Point Position pass so he can take it into Nuke if any major lighting changes need to be made. I will post my progress on this at a later date.















Render Layers - Part 1




So I have been in charge of the rendering which at first was a real pain in the ass because this is all pretty new to me but know I am getting the hang of things it's not too bad. The biggest set back I have had is ... yes, you guessed it .... Maya. I will breifly explain the process and the reasons behind the rendering decisions I have made. I will try to explain as much of this as I can through text and avoid showing some of the renders (can't spoil the film now can I?) These render layers are just for the environment. More will be added when it comes to rendering the characters.


I started by breakingdown the layers into what I already knew was needed. Diffuse, Reflections, Shadow, AO, Zdepth. I then thought that by splitting up the tents from the ground I could get more control when it comes to compositing. It meant that I could correct both the colour and the shadows of the tents seperately to the ground. I also had to split up the trees from the render as they will also need to be tweaked in After Effects. I got rid of the specular pass because I didnt think it was necessary until it came to rendering the characters. I also got rid of the Zdepth because I was having troubles getting that but I will go on to that later. Finally I knew the ObjectID pass would be needed for selecting and masking in post-production. Here is a screenshot of my render layers so far.




Splitting up the diffuse pass (or beauty pass I should probably be calling it) and the shadow pass was slightly frustrating at first because I hadn't got to grips with the render layers yet. To do it I basically selected everything in the scene except for the mountains, props and trees and created a new layer and called that ground_diffuse. I duplicated this and renamed it Ground_shadows. To remove the shadows being casted onto the objects in the diffuse pass I selected all the objects, headed over to the attribute spreadsheet, then render, then selected recieve/cast shows and set that to Off.


In the Shadows pass then I had to select all of the objects and assign a UseBackground shader to everything. I reduced the reflectivity to 0 and the reflection limit to 0.

Of course ... for most people this is probably a simple thing to do. For me ... Maya had other plans. I managed to hit a pretty big set back here. I came across this problem where Maya would simply remove all shading information on some of the props in the scene when ever it liked. It seemed as if it was only doing it when I applied the UseBackground shader to the props. This is very stressful when you have spread out hundreds of leaves with 5 different textures on them and it deletes there shading networks. I was forced to applying different textures to each individual leaf ... only for Maya to remove them once again. Anyway to cut a long story short I ended up deleting the history on the props which despite removing the shading again it seemed to have removed the weird bug I had going on.



If there is one thing you should learn from this .... it's to regularly DELETE HISTORY!!!









Industry Visit - Jon Rennie

So this week we were fortunate to have Jon Rennie talk to us about the industry and about his latest production, Ha Ha Hairies. Jon Rennie was previously the Head of Visual Effects at Dinamo Production and is now the owner and director of Red Wire Media.

We got to hear from Jon what goes on behind the scenes at a VFX company like Red Wire. He told us how he created all the work Red Wire did for Ha Ha Hairies which relied heavily on the Shave and a Haircut and 3Delight software. I have done many tests using Maya Hair and Maya Fur but have never been fully satisfied with the results so I did wonder "how they hell do they do this in industry??" Obviously the use of external programmes are used more and more these days due to them being a lot more reliable and sometimes cheaper on render time. I heard Shave and a Haircut was a very easy plug-in to use and it works great with 3Delight which Jon believes is a much smoother, faster rendering plug-in comapared to Mental Ray which I am currently using. The reason I can't use Shave and a Haircut and 3Delight for my current project is because I will be rendering from the 32 node renderfarm in the University which won't support the external plug-ins. I will, however, give both of these a go over the summer and hopefully get some good results which could prep me for my MA.

Jon also spoke to us about employment in VFX companies and said that unless you aim to work in a big VFX  company then you don't want to be spending your time building the flashiest truck or a night in shining armour (or a 90 second cinematic on soldiers and barbarians =]) instead you shoud make sure you are at a good standard with the technical aspects such as lighting. Admitedly lighting isn't my strong point mainly because I simply havn't done enough of it. I have started getting into it on Night of Fire (mainly through MentalRay rendering settings and not physically setting up the lighting) but along with the other stuff, I will focus on lighting over the summer and get that nailed so I can put it into practice for my MA next year. Time to get reading ..... http://www.amazon.co.uk/Advanced-Maya-Texturing-Lighting-ebook/dp/B004S82OE0/ref=sr_1_1?ie=UTF8&qid=1336341950&sr=8-1

Finally Jon sat down with myself, Matt and Sam to discuss the Night of Fire project and give us some advice to help us along. Hopefully we can impress him at the Glammies this year!

Links ...

http://www.jonrennie.co.uk/
http://www.joealter.com/ (Shave and a Haircut)
http://www.3delight.com/en/index.php