dinsdag 11 januari 2011

Exam Over!

Allrighty,

Just finished my Maya Exam.

Our mission was simple: Make a Birdhouse!
We had to model, uv map, texture, set up rendering, the whole shebang in about 2,5 hours.

So this is what I ended up with:

A rather simple setup, a cilinder, randomized the shape a bit to give it a more natural look, googled a bark texture, edited it so it became vertical tile-able, slapped in on both in the color channel and the bumpmap channel. 
I first started a solid birdhouse model, but it felt to unnatural and straight. So I modeled and textured a wooden worn little plank, and duplicated it around and build a rudimentary birdhouse out of it. Googled another wooden texture, made it tillable in all directions, slapped in on in color and bump. The Nails materials are completely procedural. Cloned the big one and scaled it down, and kept duplicating to nail the planks together. Added physical Sky, and I was done with the exam. I added in some straw in the extra time I had left, and further tweaked by final gathering settings.

It was also the time to turn in our Module project. I could've spent another couple of weeks on it to get it the way I wanted. The foilage in the background seems kind of quick and dirty, because, wel it is. 
The Grass could've used more work, and the texturing on the house has some mistakes if you know where to look. 
Anyways, enough of me yapping, here's the result:


woensdag 5 januari 2011

Maya's Physical Sun and Sky, Issues

Welcome back, third post already!

This post will talk about nog only using Maya's Physical Sun and Sky Generator, but also understanding it, and knowing what it does. If later you run into rendering issues as I did, it will be a lot easier to tweak the system, and know what changes are causing what chain reactions. If you find this helpfull, feel free to leave me a comment :D

First of all, The super easy part: Creating the Physical Sun And Sky.

Simply open up your Render Settings Dialog, and go to the "Indirect Lighting" Tab. Here you'll find a big "Create" Button next to "Physical Sun and Sky". Press it. Don't be Shy, press it.
That's it ... you got it. That really is all it takes to create the entire setup. We're done!

now for the next step, in order to allow the setup to really do its thing, we will have to enable either Global Illumination or Final Gathering, or both if that's the way you roll.

For my setup here, I enabled Final Gathering, and because I don't like waiting, lowered accuracy(so less rays get calculated) and upped the point interpolation, so the graininess of having lower accuracy is smoothed out. This speeds up my render times noticeably. 

Next, I'd like to take a minute to explain what exactly the Create button did. 


First of all, if you take a look in your outliner window, you see that a SunDirection Directional light is added. This will be our main controller for the entire setup. Mainly the direction you point this light in will affect stuff throughout the entire network, like colors, intensity, etc ... all in order to simulate the time of day the sun would be at that height. 

But where is all this stuff? Have no fear, it is all in your scene, and all tweak-able. Going back to your render settings to where you created the sky, you can click the button to show the outputs:

If you click this, it will take your Attribute Editor to the mia_physicalsky1 node. Let me just open this up in the HyperShade. (It's under the Utilities Tab)
You can see the PhysicalSky has 2 inputs. First of all, he'll get his exposure settings from the mia_exposure_simple node. Also the sunDirection (Our Directional Light) passes on its data to the Physical sky Sun settings. 
We can also see that these Sun settings coming from our Directional light, are put through to our Physical Sun Node. This node will make sure there is a disk of lava in the sky right where it is supposed to be, according to your Directional Light.

This info is then given to the SunShape, where the lightshader and photon emmiter are set up.

That's the basic setup of it all. These are all the nodes you'll need to tinker about with all the settings, if you need to at all. The default settings already give you a pretty decent render, and most of the time you won't need to change a thing, besides the direction of your directional light. 

However (there always seems to be a 'however' ....) I was noticing something different in my renders compared to when I build sunshine setup. Everything looked a bit washed out, pale, and in overall, not much color saturation was coming out of my textures. It wasn't a material issue, because rendering in another scene with the same materials did give me proper results. 



You can see everything is looking rather pale and uninteresting. In the end, I figured out why:
Gamma Correction.

Turns out, Mental ray assumes your texture files are Gamma neutral, but as most computer images are, they are at a gamma setting of 2.2, which is the standard for computer screens. As mental ray makes the wrong assumption, he will try to correct the gamma neutral images, and multiply the gamma by 2.2, so the output will have proper gamma. But they aren't. What happens now is that a texture image with gamma 2.2 gets an extra gamma correction on top of 2.2. So in order to fix this, we'll have to tell mental ray not to correct gamma, as there is nothing to correct.

Head back over to the mia_exposure_simple node, and open your attribute editor.
Here you can see the Gamma is set to 2.2. Correct this to 1, or whatever is needed to properly correct your texture files, and the colors will start to feel like colors again:


This of course means a darker image, but much more saturated colors in the final image. From here on out, I can continue tweaking my final gathering settings, lighting settings and materials until I get my desired lighting effect.

I hope this was helpful, and might save some people some time looking for the cause of their annoyances.

See you next time!