Thursday, March 23, 2006

Indexing into MFnMesh::getBinormals?

Category: API


MFnMesh::getBinormals dumps a mesh's binormals into a MFloatVectorArray, but its length is different from getNormals'. How do you index into this array? You can't. There's one binormal for each vertex-face pair. So if a vertex is shared by 4 faces, then it will have 4 binormals. getBinormals will go through all the vertices in the mesh in order, and output all their binormals in this long one-dimensional array. Therefore there is no way to index into this array without knowing the mesh's topology beforehand.

Use getFaceVertexBinormals instead.

Then what's the purpose for this function? It can be handy to be use it to dump all the binormal data to a file for exporting.

The samething goes for getTangents.

Thursday, March 16, 2006

Cannot convert edge selection to vertices after doing edge loop

Category: UI



Sometimes when selecting with edge loop, using the marking menu to convert the selection to vertices won’t work. Make sure that the selection tool is selected when trying to do "to vertices" on the marking menu.

Compositing layers with motion blurs alpha channels leave black halos.

Category: Rendering

Usually, the halo from motion blur is caused by compositing without pre-multiplied alpha. This means that the RGB value of the transparent pixels are affected by the background colour of that file. Here's a nice workaround in Photoshop, It should be able to be adopt the method to After Effects if linear-dodge is a layer filter option.
link

Tangent Space Calculation

Category: API


It’s possible to get mismatches ( seams ) due to doing normal averaging based on a tolerance of 30 degrees. Maya only share the normals if they are exactly the same.

Aliasing on the edge of foreground objects when using depth of field

Category: Rendering

This is caused by the sudden ending of depth of field's blur post filter in the middle of the object. It's a limitation of the Maya software renderer.There are several workarounds:

  • Try to set the focus plane a little before the focus object, and tweak the focus settings.

  • Use Mental Ray, which would give you much nicer results.

  • Render the scene with dof and the focus object separately, and composite them afterwards.

  • Fake dof in post by using a depth map.

Wednesday, March 08, 2006

MPxHwShaderNode::compute(writable) is not

Category: API

It seems that since Maya 6.5, the writable flag in

MPxHwShaderNode::geometry


is not supposed to be true, ever. No geometry from Maya should be writable anymore, this is when used in the hardware renderer, and in the regular viewport.

Tuesday, March 07, 2006

Rendering filename bug in 7.0.1?

Category: rendering

It seems that when directly renaming files using the new filenaming syntax in 7.0.1, Maya will automatically append a "_tmp" string to the end of the filename when "%c" is used.

For example, if the filename is "/u/user/renders/file_%c_%4n.%e", then the filename would turn out to be "/u/user/renders/file_camera_0001_tmp.ext". If the camera flag is not used, such as "/u/user/renders/files_%4n.%e", then the file would go under the the folder "$Project_Dir/images/u/user/renders/files_0001.ext". Sucks eh.

The workaround for now is only to correct the "_tmp" by renaming everything using a shell/batch script. ( Or don't use %c at all and have everything saved under $Project_dir/images ).

I don't recall seeing this problem in 7.0. Could this be something that's introduced by the 7.0.1 patch?

Wednesday, March 01, 2006

Don't use MFnMesh::object()

Category: api

It seems that MFnMesh::object() will not properly return the MObject to the node in the function set. So don't pass the function set object around functions, and pass the MObject instead. On more than one occasion I've found myself wanting to get the MObject to use on an iterator, but with no way to get to it.