martes, 25 de septiembre de 2012

Fixing in other programs what you can´t do directly on Maya

So well... hand in was a couple of days ago and I managed to complete the mandatory minute I committed to. Song is about 4 and something seconds so still a long way to go to complete, which I am positive will come faster now that I am more used to the process. I will keep updating even when is not part of my grades anymore.
Since I got the final countdown fever, I had to prioritize my minutes in order to complete the task so I left some processes undocumented so I don't interrupt the workflow. Now I've got time to get back to them, so here we go:


Solving the render black outline in Maya using Photoshop


Once you render out your targa sequence, you will notice there is a black outline around your visible area:



To get rid of it in Photoshop, I made a selection out of the alpha channel, reduced the size 1 px, created a new layer from the new selection, erased the previous layer and merged.


Tadá!

Then I proceeded to create an action so this process gets automated which I named "border":



 This got me a nice targa sequence without the black border.


Creating shadows in AfterEffects.

So I tried to create render passes using mentalRay materials, and failed miserably. After asking around and doing research, following processes step by step unsuccessfully, I decided to pass on the renderpasses and using curves function in AE instead. For the shadows was also convenient since we had some good green screen cat footage that require also some shadows, and that would be hard to mimic in Maya, so I manually created them directly in AE using solids and masks.


Here we have our lovely shadowless kitten.


and here we have  the manual shadow work in progress.



Here we can see I am a massive idiot for not realizing the green screen fabric had some creases that hide the cat paws at certain point...


... and that's the story why we've got a random pipe popping out in that specific spot in the final shot :D



miércoles, 19 de septiembre de 2012

Interlude

Last day of project completion, and lots of stuff to document yet...
Meanwhile, I'll leave you some images of Lukka supervising the process:




... and photobombing my footage:



sábado, 15 de septiembre de 2012

Journey through the making off of a 2 seconds scene.

I spent the last days working on my scenes and not properly documenting the workflow since deadline is approaching and that just slows down the process, but pretty much all of them follow the same process described in previous entries. This one is slightly different though, since it involves some new stuff worth mentioning, so let's start:

Hair system in Maya: how to keep static hair unaffected by gravity. 

Hair system comes with the superpower of moving and following gravity as we can see below:



At our left: perfectly well positioned hair curves just where we want them to be. 
At our right, same curves falling due gravity. We don't want that. 

To fix the gravity issue and stop it to keep affecting our eyebrows and eyelashes, we follow this process:


Select all the affected curves. 


Go to your attribute editor and make sure to decrease gravity to zero. 


Then, go to the last frame in your animation timeline, and then hit "set rest position > from start"

And that should do: you have your eyelashes static and motionless :)
(If that doesn't do, try flattening the curves at "stiffness scale")




How to avoid model feature deformation.

Now, it's time to aim for the perfect shot. Sometimes,while importing models from zBrush to Maya, you notice they come slightly deformed and their proportions look quite squeezed. This is actually an optical issue brought to you by your camera and the parameters on it, not exactly an issue with the model itself, and is actually a phenomena proper of optics in general. This video explains it further: 


So, for this shot I created a new camera: 


If you open the Camera Attribute Editor (view -> Camera Attribute Editor, in the viewer menu), you will find a property called "Focal Lenght". By default, is set at 35 mm. If you weren't lazy enough to skip the video, you will remember 35 mm lenses tend to deform features of close shots, so... to keep her features soft and flattering, I need to increase the Focal Lenght number:


As we can see, she looks more proportionate now. 


How to set the animation to match the music.

This is by far one of my favourite things to do: match movement with sound. Is quite logic and straightforward, reason why it quite amazes me people is not doing this more often. 
Your best friend here is Elementary School maths, and process is quite easy:

  1. You open your track in a software that allows you to scroll towards a timeline while hearing the sound in real time. I am using Premiere here,  Flash and Audacity can do as well.
  2. You keep your ear and eyes sharp and hunt for the exact second where the beat that triggers certain action on your animation shows. You can do it either by just listening, or you can aid yourself with the visual "electrocardiogram-ish" guide of the track itself, usually marks visually how sound is compound, depends on the song, though... and what you are intending to do. 
  3. Once you spot your beat, take note as of the exact second and frame it happens. After effects comes with a format of hours : minutes : seconds : frames... so I take note of the exact time  my chosen beats appear in a notepad:


4.  Then comes frame counting! On this example I've got my clip starting at 13:23, and my first beat appearing at 14:12. As I mentioned before, this is a format of "seconds : frames", which means my clip starts at second 13th frame 23th, and my first event at second 14th frame 12th.  Since my footage is 24 fps based, this means every 24 frames compounds a second. So, second 13 frame 23 is just one frame away to become second 14th, while my second event starts at 14:12... this means my event will be triggered at frame 13th. so I set my first keyframe there:


Same, for 14:12 to 14:24, that is the time set for my second event is 12 frames distance, so 13 frames plus 12 frames, gives us 25... which means second keyframe at frame 25. 

Then comes render test:



Then comes matching the test with the sound to check if everything is in order. 


Fortunately it was :)  so now we proceed to proper render and then edition. 









martes, 11 de septiembre de 2012

How to fix the "Warning: waitCursor stack empty" error @ Advanced Skeleton

In previous chapters we talked about how I kept on improving my previous model, which Advanced Skeleton was using as reference, and how said changes messed up the weights, rendering the walking cycle I had made completely useless.


Above: uselessness

After spending ages trying to fix it unsuccessfully, I decided to re-do the rigging from scratch... also because the referenced file is not rendering the hair I created and I am fed up wondering Maya mysterious ways, so I took a file that renders the hair perfectly and started rigging again.  Then... while on that, I faced this brand new error:


... followed by our friendly  "Warning: waitCursor stack empty"

This, after hitting the "Adv" button to generate the other half of the rig. I noticed the other expected half wasn't created, but the handlers were... then I remembered I did some changes previous to readjusting the joints:  my model was facing the opposite direction than the  generated biped, and since I've got way too much elements on it, I opted for rotating the biped instead of the mesh, by 180 degrees. Happens the "Adv" button that generates the rig is quite rigid, and it was actually creating the other half, just above my previous rotated half so I could not notice it. So basically if you move/rotate the skeleton at the Root to fit your model, you will get these errors. Also, if your main joints and bones (the ones of the spine) are not exactly zeroed at the x axis, you can get duplicated bones that will be hard to handle later, so... to get rid of these errors, make sure your skeleton is zeroed at rotation and translation values at the Root, then hit "Adv". This should generate your rig without problems. Once generated, just click your main controller (the large circle at the floor) and reposition it to match your mesh. 

lunes, 10 de septiembre de 2012

Hair system & visuals

So I decided to give it a go and add some hair to my main character, following this tutorial from YouTube:


Is pretty straightforward, even when Maya does it's typical thing and creates unnecessary stuff that the guy has to figure out how to get rid off (which is good because odds are that will happen to you aswell, like happened to Nell). So, following this tutorial and give some own touches to my curves, and after playing around with parameters for around two hours and a half, I ended up with this:



It is not perfect, but if I try to make it perfect, Maya displays an error that says something around the lines of "hair empty not found / ignored" so well... is not that bad, and will be a couple of seconds on screen so I will bet on the "no one will notice" horse  :) . 
I also spent some time creating an interface for the robot girl point of view:


Still midway, some parts I intend to animate, let's see how that goes. 

jueves, 6 de septiembre de 2012

A frustrating journey towards the completion of a fairly easy scene worth 4 seconds of footage.

... on which I am still stuck on :D

Since I am intending to add some hair to my main character, but got no idea as of how to do that yet, I will leave these scenes for later and complete all the others that are easier, then, depending on time budget, I will decide if I go on with the hair thing or not. Because of that, and and also because I improved the original model a little bit, fixing some geometry errors that came with zBrush reimporting, and this was enough for Advanced Skeleton to go nuts and completely screw my already created walking cycle. 


Kill me now


I tried to readjust weights unsuccessfully for a couple of hours, and I am still unsure as of what will be faster: fixing or doing it again from scratch, so meanwhile I figure out I jumped to the next "easy" scene. Oh, my naiveity...

This scene is not complicated: we have the robot walking and the kitten following through. We only see the robot feet so I decided to redo the walking cycle just for the legs. 





Using the side view for keying the main controller of the rig, 
so every step stays where it should be instead of reverse-positive
 moonwalking. I set each step every 22 frames, since that´s the 
song beat tempo on that specific part and I want for the
 movement to match it. 


 During the process, I spotted some minimal, yet noticeable mistakes, like corrupted mesh...


Fixable by readjusting manually the vertex.

... and badly adjusted texture...


This one is corrected by moving the vertexes in the UV map.



To be able to place the model in the right angle, I had to go back and think on how the scene is composed. Basically I will have three pieces of footage: the green screen cat, the background, and the rendered 3D model, taken in that specific order. First, I went to Nuke and composited the cat over the background to make sure they match in angle:


This is not properly edited yet, just matched to check the perspective is ok.

Once I have my video, I create a new camera and place it as an image plane, so I can move the model in a way it matches perspective and the proportion with the cat. Once done, I proceed to create the reflection for the glass by creating a simple box and adding a mia_material_x_passes with full reflection.



We can notice how screwed is our rig from the eyeballs 
and eyebrows floating in the middle of nowhere, 
but doesn't matter since we are only rendering the feet... for now. 
We will have to fight our fears soon enough :c

Now, is time to think about the shadows. The HDRI used for Image Base Lighting is giving us a nice soft shadow here, however, doesn't exactly matches the one of the cat.



So what I do is to create a spotlight, and keep playing with the preferences until I achieve the result I want. 


Too sharp & dark and still not the right angle. 
Shape looks weird.
  

I moved the spotlight so it casts a larger shadow.
Right angle, still too sharp... but there is a catch:
we can see the hand, which means I'd have to also 
animate the arms.


Keep trying to get rid of the hand to see 
if I can save myself some animation.


There we go... still too sharp, though.



I tried a different approach, choosing  Depth Map shadows 
over Raytrace. Quite noisy...


Keep playing with parameters. Too subtle.


Bingo!


 Then we got a problem. Render passes do not work. Shadow pass comes as your regular Beauty, same for Diffuse-without-Shadows. Ambient Occlusion looks like an alpha map:


I kept on googling the issue but found nothing that solved it, so I just wrote Lee with some cries for help. (EDIT: Ambient Occlussion pass works just fine now. Happens I didn't checked the "Ambient Occlussion" box in the menu. Doh!  Other passes are still a problem, though. ) Meanwhile he gets back to me, I gave it a go to render the reflection. 


Nice reflection, but  massive flare. Try to get rid of it. 



Trying by selecting the object and set the "receive shadows" box 
unchecked. Gets rid of some black spots, but flare still there. 


Since I assume the flare comes from the spotlight I created
to cast the shadow explained before, I exchanged  bright values 
between the spotlight and the Final Gather, lowering the brightness
of the first while increasing the second. Still not there. 


There! Was all to do with the material. 
Decreased the glossiness and the refraction.

Cool, time for some testing:


Dang! 

Two problems arise here: first, dancing shadows. Second, there is no alpha. Also, movement feels off, as if she was a... ahem... robot. I am still figuring out whether I like this or not, maybe doesn't matter since we will have her legs passingby in front and we won't notice, let's see.
The alpha thing, after spending hours of checking and unchecking parameters here and there - render stats, Image based Light sphere, Camera settings, render passes options... - happened to be the image plane. I moved it using the offset option so it doesn't show in the camera anymore and that fixed the problem. 

Now, time to figure out what's wrong with the dancing shadows.

To be continued...

::: UPDATE :::

While I bumped into a couple of methods as of how to get rid of the flickering shadows, they seemed too complicated and time is running out, so I will go back to learn that later and render with just the HDRI lighting for now (this one, says the internet, doesn't cause these sort of artifacts... and is actually right since I just did the render and looks pretty smooth). 


miércoles, 5 de septiembre de 2012

Render tests

One of the main lessons learnt during this course has been never, ever underestimate rendering and, as you would do with buying a car or choosing a partner, TEST before jumping into the big deal. Actually, be more paranoid regarding Mental Ray and test all the time, in every scene, since you don't want to spend ages in rendering just to realize, days of cripple-rendering computer after, that the result came all wrong, so render your scene in the smallest resolution you can first.
I took the easiest of all the shots to do some testing, playing with Mental Ray settings and so on, which took me ages but finally could figure out a nice set of parameters that left me satisfied. 

There is not much going on, just a shot of the back of our main character while some light & shadows are cast in there. So here: 


Idea is to give the impression that the day is starting. This scene looks like a train passed by or rather, by the vertical direction, fell off from the roof to the abyss. Is not what was intended so has to be changed. I did that by shortening the moving distance of the spotlight. 


Slightly better, but still too fast. Gives the impression of a speed camera shot and this would clash with the rest of the scene's tempo.  


Since I felt the previous scene was quite flat and boring, I added some camera rotation.
This time the tempo and movement is perfect... just a small thing: we want for the scene being about the robot "waking up", which we will state by turning on the... "on"... button. Yeah. It would stand out more if we place it completely in the shadow, so here we go:


Ta Da!  
(some Final Gathering adjustments so it looks less dark & voilá!)

martes, 4 de septiembre de 2012

HDRI & first half footage ready

So I went yesterday with Ben and David to City Hall, the most futuristic - looking place in London that Google could suggest. They (Ben & David) were really helpful on HDRI tech support and carrying the stuff around, which  is highly, highly appreciated! (I am small and weak and with no physical condition to be wandering around London packed like a small little mule without collapsing, you'd have to shoot me dead eventually). So I suggest you to give them some extra marks on their respective projects, you know,  for the niceness factor :)

Here are the results:



Basically, what happened was taking 6 photos of the same ball using bracketting (however you spell it) at different exposures, then blending them together in Photoshop using the "File > Automate > Merge to HDR" approach. Since my main computer is busy rendering and this one is not that powerful, each image took quite a while to be composed. Then I used a filter to unwrap it, under Filter > Distort > Polar coordinates, choosing "polar to rectangular". This was under my own knowledge of Photoshop corners & mere logic, and not a proper proven method, which by the way is yet to be tested so it might be wrong. If that turns out to be the case, I will come back later and state it. 

Video footage is still in original HD resolution, and the computer with the kickass video editing software has spent 8 hours rendering a 4 seconds scene in Maya and is still on that, so I can't touch it, even less open After Effects to create a smaller, internet-friendly video for you to watch, so you will have to use your imagination and / or trust my word :)  More on render soon.