Showing posts with label Tech Tips. Show all posts
Showing posts with label Tech Tips. Show all posts

Wednesday, 2 October 2013

Selection Highlighting

A very dumb problem that was getting to me yesterday. Highlighting on selected objects didn't show up in the perspective view (though it worked on front / side / top etc.)

I knew that I must have accidentally checked / unchecked a box somewhere but couldn't find it. I'm even sure that I tried the "show" menu in the persp view but I can't have been looking very carefully because it turns out that - when I looked again this morning - there it was!

So, to solve the problem: in whichever view you're having problems with go to the "show" menu and make sure that "selection highlighting" is checked. (In my case I had to uncheck and re-check it to get it to work.)

Hope that helps anyone else who's temporarily lost in maya menus :)

Friday, 23 August 2013

mel scripts: select all anim curves & select all keys

These wee bits of mel have proved incredibly useful recently as I've been doing some shot layout:


This selects all animCurve nodes
select -r `ls -typ animCurve`; 


This selects all keys on all animCurve nodes
selectKey`ls -typ animCurve`;

Maya convert instance to object

My street environment was created with tons of instancing - including groups containing instances which were then instanced in turn. I'm not hugely familiar with instancing but it wound up creating problems in terms of flexibility of editing objects and general bugginess so I decided to convert the instances into objects in their own right.

This, it turns out, wasn't as easy as I might have thought.

I tried various methods including the menu item modify/convert/instance to object. My problem with using this is that you seem to need to do it in the 'correct order' otherwise instances of objects just disappear.

In the end the method I used is pretty labour intensive, but it works reliably without geometry going awol.

1) group all of the objects that you want to apply the instance-to-object conversion to - including all geometry that is (or in my case, might be ;) the originals of instanced geometry

2) using the outliner "expand all" in the group (shift and left click on the + sign next to the group)

3) select all items within the group

4) run this mel script duplicate -un

5) whilst the duplicated objects are still selected group and unparent them

6) delete the original group

7) repeat the above until all instances are objects (this is the labour intensive bit!)

Monday, 1 July 2013

Tech Tips - symmetrical modelling with reflection in maya

OK, I can't decide whether I'm pleased to have found this or gutted that I'd already done so much modelling before I found it.

But I've finally figured out how to keep a model symmetrical when I make adjustments to vertices on one side.

Turns out that the move tool had a reflection setting all along! See the pic below for where to find it.

I'm looking forward to some happy modelling and much less "mirror geometry" from now on!



Tuesday, 16 April 2013

Maya - easily align vertices

1. Select your vertices

2. Select the move tool

3. Open the tool settings (click the SHOW OR HIDE TOOL SETTINGS button above the channel box)

4. Set it to WORLD SPACE and turn off RETAIN COMPONENT SPACING.

5. Hold X to snap to grid, then grab one of the move handles and move it.

Voila.


Thanks faultymoose http://forums.cgsociety.org/archive/index.php/t-425652.html

Maya - snap pivot to edge / vertex / grid

Select your object then hit the insert key. This lets you move the pivot around. Now the trick to get it aligned to an edge is to hold the C key then move you mouse cursor over to the edge you want to snap to. Click the middle mouse button and move the mouse slightly while holding the middle mouse button. The pivot will jump to the edge. While you have the middle mouse button held you can slide the pivot along the edge. You can also do this with the V key for snapping to vertexs and the X key to snap to grid.

Thanks pyromania: 
http://www.polycount.com/forum/showthread.php?t=37371

Wednesday, 27 March 2013

Mental Ray Contour Shader

I need to start rendering again and realised that I'd pretty much forgotton how to render contours so here are some notes to myself for the rest of the shots :)

1) In render settings enable contour rendering. For my specific purposes I've also gone for hide source (I don't want any other textures, lighting etc visible in my contour layer - I'll comp those together later), flood colour is white (it could be anything, I'm going to key it out in the comp), over sample value of 30 (I need it this high to get reasonable quality and the render times are fine), gaussian filter and filter support of 2.


2) Pipe in "contour_contrast_function_levels" to Contrast Shader and "contour_store_function" into Store shader. (See below for where to find these in the hypershader.)


3) The settings I used for the contour_contrast utilitiy are below. To make sure I got the outlines I needed and to prevent broken lines, contours flickering on and off etc etc I went for diff mat which draws a countour line between different materials. This meant that I had to apply multiple materials to a single object, by applying individual shaders to the faces that I wanted to be outlined


4) For contours which get narrower with distance from the camera plug the "contour_shader_depthfade" utility into the shading group for the material


5) Starter settings for the depthfade utility are below. These need to be tweaked on a shot-by-shot basis depending on camera / lens etc.


I used tons of different resources to get this right but here's one that was pretty clear :) http://wiki.bk.tudelft.nl/toi-pedia/Mental_Ray_Contour_Shader_tutorial 

Friday, 3 August 2012

Photon Colour

This is not so much a tech tip as a tech question. I've found that with one point light and one area light in my scene if I set them both to emit photons I can't get them to emit photons of different colours.

They either default back to white, or back to the colour that I set for the first light.

In the attribute editor I'm able to edit the colour and it looks as though it's changed - but the next time I go into the AO for the relevant light the colour has defaulted back to one of the scenarios described above.

Either I'm missing something really obvious or it's a bug in maya so if anyone has any answers please let me know.

Thursday, 2 August 2012

Tech Tips: frame offset with mental ray mv2DToxik pass

I've been having all sorts of problems whereby passes from any render layers which aren't my "main" layer (in this case AO and mattes) didn't line up with the passes from my main layer. They appeared to have a temporal offset of a fraction of a frame.

I've read a few forum threads and this is what I think was happening . . . 

In order to calculate vector information the motion vector pass renders with a 1/2 frame shutter offset (I think it's 1/2 a frame but don't quote me on that - I'm going to read up on the maths behind this when I have more time). All the other passes in that layer are rendered with the same offset (in my case that was beauty, spec, reflection, shadow etc etc). However, any layers without an MV pass associated still render on whole frames (my AO and matte passes). Hence the offset in my comp!

The solution:

Number 1:
In render globals under the Quality Tab turn on Motion Blur (temporarily). Go to the "Motion Offsets" tab. Check "Custom Motion Offsets" ON. From there set the "Motion Back Offset" to 0.00. Finally, just turn off Motion Blur. This disables the 1/2 frame offset on any layers with the mv2d render pass.

Number 2:
Under the Options Tab, expand the "Mental Ray Overrides" tab. Scroll down to the "Performance" Tab. If you check "Force Motion Vector Computation" ON, it forces that offset on all your render layers, even if you don't have that mv2d pass associated with that render layer.

Thanks to the following for helping me figure this one out:

http://forums.cgsociety.org/archive/index.php/t-971568.html
http://aloedesign.com/2008/12/maya-2d-motion-vectors-tutorial/3/

Saturday, 28 July 2012

Ahhhh - don't combine referencing and rendering in maya . . .

So having done lots of lighting tests, played with GI and Final Gather settings days to optimise render times etc etc I've now just spent the best part of two week not rendering a single frame!

My scene has been behaving really strangely. Amongst other things lighting updates weren't rippling through from my referenced files, materials were mysteriously falling off assets and after painstakingly setting up render layers I was then getting locked out of them with error messages about missing nodes.

However, I finally know what was causing the problem. Maya's not very robust when it comes to combining referencing and render layers. After much googling I came across this post - appropriately titled "why your render layers break" which was an absolute saviour

http://www.toadstorm.com/blog/?p=26

Because the problems I was encountering were so various I didn't realise at first that they had a common source. Great to know what the problem is now though.

Fortunately my project is simple enough that I can just import the environments and rigs into my anim scenes, redo the lighting in situ, and use this as my final render scene.

Gah, why is it that I hit my worst technical problem so close to the final deadline? :)

Wednesday, 4 July 2012

Tech Tips: Render Progress Messages

Gah - why does maya offer you options that don't work?!

I spent ages trying to set the Render Verbosity to "Progress Messages" through the mentalrayGlobals tab in the attribute editor, but it just kept reverting to "Warning Messages" every time I hit render.

It turns out that in the menubar you need to go to Render -> Render Current Frame and click the option box next to that. It seems that the settings here override the ones in mentalrayGlobals.

Here's the forum where I found this lifesaver: http://area.autodesk.com/forum/autodesk-maya/lighting---rendering/render-verbosity-wont-stay-on-progress-messages/

Tuesday, 19 June 2012

Tech Tips: maya move pivot mac

Whenever I switch to a mac I seem to forget how to move a pivot in maya so here's a reminder for myself . . .

d OR fn left arrow both do it :)

Tech Tips: Global Illum Photons Greyed Out?

Gah, maya is so buggy . . . but this just saved me :)

http://forums.creativecow.net/thread/61/858115

Thanks Francois :)

Sunday, 10 June 2012

ZBrush - hide lightbox

Every time I've been away from ZBrush for a while I seem to forget how to toggle the lightbox along the bottom on and off . . . . "," does the trick :)

Wednesday, 9 May 2012

Mia_x layered shaders

I've just mastered layered shaders using mia_x materials. Tons of forum posts said it wasn't possible then I found this genius tutorial:

http://www.youtube.com/watch?v=4uRx3ID5oMY

(NB remember to check the 'alpha is luminance' box on the texture that you're using as an alpha - for some reason that's the step I always forget to do)

I'm loath to share this image as there's SO much work still to do to get it to look right, but using layered shaders enabled me to get a wood shader onto the hands and a separate graphite shader onto the 'nails'.

Monday, 7 May 2012

Wood Texture Tutorial

This tutorial has been an invaluable starting point in trying to get a wood texture working for my main character::)
http://www.pixelophy.com/?p=105

Sunday, 29 April 2012

High Quality Rendering

Huzzah, finally found the High Quality Rendering option. I'd used it before to make sure that the textures in my viewport weren't all fuzzy but then forgot where to find it! So here's a reminder to myself for next time.

Saturday, 28 April 2012

Transferring UVs after rigging

I haven't actually had to use this workflow yet - but stumbled across it whilst trying to find an answer to another rigging problem and I have the feeling that it may come in really useful one day so I'm adding it to my technical tips list!

http://gabnation.wordpress.com/2010/02/09/how-to-transfer-uvs-after-rigging/

Sunday, 22 April 2012

Maya UVing workflow

I've spent a lot of time on various forums recently looking at ways to reduce the pain of UVing.

The only thing that everyone seems to agree on is that it's a very dull job :) but I've combined the advice from a couple of blogs and forum threads to come up with a workflow that's working OK for me at the moment and seems reasonably efficient . . . .

  • run an auto-uv to get a bunch of flat uv's
  • select all uv's, split uv edges
  • select the edges where you want the seam to be, then shift-drag over the whole mesh to invert your selection
  • run 'move and sew' to re-attach all your uv's, apart from your seams
  • run unfold with the following settings:
    • Weight Solver towards: 0.45 to 0.7 
    • Optimize to Original:0.25 to 0.5 
    • Pin UV Border: Off 
    • Pin UVs: Off 
    • Unfold Constraints: None 
    • Maximum Iterations: 5000 
    • Stopping Threshold: 0.0010 
    • Rescale: Off 
    • Keep History: Off/on

Check out the following sites for the original sources for these tips:
http://www.tokeru.com/t/bin/view/Maya/MayaModelling
http://arcan3artist.blogspot.co.uk/2008/02/well-maya.html

Monday, 2 April 2012

AfterEffects: Scale Multiple Keys

I liked the relative timing of a number of actions that I'd set up in aftereffects, but I wanted to speed the whole sequence up - here's how:

Expand or contract a group of keyframes in layer bar mode

  1. Select at least three keyframes.
  2. Hold down Alt (Windows) or Option (Mac OS) and drag the first or last selected keyframe to the desired time.