Vray Reflection Exclusion List in Maya

Just discovered that you can actually do reflection-linking in Vray (something like light-linking).

For example, you do not want object B to be visible in the reflections of object A, but you would still like object B to be visible in the reflections of other objects. (it seems really specific but yes, there are times when I find myself having to do that)

So I noticed that for Vray 3, there’s a new ‘Exclude List‘ section under the vrayobjectproperties attributes, but couldn’t find any documentation on how exactly to use it. This is the only article I can find on its usage. It’s in chinese but there are lots of pictures to help :)

http://yiyu-lost.lofter.com/post/93ccd_6e17161

To do something like in the example above:

(1) Add a vrayobjectproperties node to object A
(2) In attributes editor, scroll down to the end and check the ‘Use Reflection Exclude List‘. Notice that the Reflection Exclude is now connected and a new ‘vrayRelectionExcludeList‘ node appears in the outliner
(3) MMB drag and drop object B onto the ‘vrayRelectionExcludeList’

Yep it is simple as that. You could do the same for refractions as well (I haven’t try that yet though).

.

Transfer UVs cleanly to a skinned model in Maya

Finally found a solution to a problem that has plagued me for ages. When transferring UVs from an updated model onto an existing skinned model (using Mesh > Transfer attributes), a transferAttibutes node is created in the Inputs, and it can’t be deleted using Delete > Non-deformer History. The only way to remove it is to delete all the history, but that means my skinCluster node will be deleted as well. If the transferAttributes node remains in the Inputs, I wouldn’t be able to delete the source model where the UVs was transferred from.

I think there are some maya scripts out there that can solve this issue, but here’s a good tutorial from Zeth Willie that explains why that issue happens and how to solve it.

https://vimeo.com/21577038

In summary, when you smooth bind your mesh, an xxxOrig node is created, which tells Maya what is the original shape of your mesh, so that it knows what is the shape to return to. To transfer UVs cleanly, we have to transfer it to the hidden  xxxOrig mesh instead.

(1) Look for the xxxOrig shape node in the attributes editor or show shapes in Outliner (it will be under your skinned mesh)
(2) Uncheck ‘intermediate object‘ under the Object Display section (it will show up in your viewport & UV texture editor)
(3) Select source model, shift select xxxOrig shape node, transfer attributes
(4) Delete history on the xxxOrig shape node and check ‘intermediate object‘ again

And you now have the new UVs on your skinned mesh without the transferAttributes history node. The source model can then be deleted.

.

Creating Maya blendshapes using only a part of the geometry

Part 2 of my blendshape tips posts – This is from a very useful tutorial from   on the proper workflow to create blendshapes using only a portion of the geometry. For example, when your character is made up of just 1 piece of geomety, you might want to separate the head from the body and just create blendshapes for the head only.

https://vimeo.com/50658157

Check out the tutorial for a good explanation on the workflow and the reason you have to do it that way.

To summarize the steps:

* Before you start, it would be good to duplicate the geometry and keep one as backup

1) Select the edge loop where you want to separate the geometry, go to Edit Mesh > Detach Components. Then Separate the geometry.

2) Select the head geometry and duplicate (This will be your blendshape target). You can duplicate multiple copies from it, but just remember to keep 1 copy untouched so that you can always duplicate more from it when needed.

3) Select the head, then the body (*NOTE: the order is very important here*) and Combine the geometry. Merges the vertices (where it was separated perviously) and also soften the edge so that it looks the same as before. Then delete history.

4) Select your blendshapes, select the combined geometry, create blendshapes with ‘Check topology‘ off, and deformation order at ‘Front of Chain‘.

And you are done :)

*Remember to check that your blendshapes are working correctly first before you go on to sculpting them. This method is a bit more tricky and things can go wrong easily if you miss a step or two.

.

Baking topology/geometry changes to Maya blendshapes targets

Here’s an extremely useful tutorial from Steven Roselle on how to go about baking topology or geometry changes to all your blendshape targets. This is useful when you already have all your blendshapes created and set up, but realised you need to make some changes to the base model.

https://www.youtube.com/watch?v=BFPAIU8hwQ4

In summary, topology changes refers to when you need to add edge loops or delete edges etc. After you have made the changes to the base model, select the base model, go to Edit Deformers > Blendshape > Bake Topology to Targets.

Geometry changes refers to when you need to pull and push vertices to shape the geometry differently. After you have made the changes to the base model, select a vertice, perform a transform component action (hold shift, right-click, and you will see transform component in the drop-down menu). You don’t have to move the vertice. This is just to create a ‘Poly Move Vertex‘ node in the inputs, which tricks the software into thinking that there are topology changes. Right click on model, go to All Inputs, and re-order the inputs to this order:

Inputs

Once you are done, again go to Edit Deformers > Blendshape > Bake Topology to Targets.

If you need to make both topology and geometry changes, you can perform all the changes together, and just follow the second method (for geo changes). You might end up with a lot more nodes in the inputs, but just make sure ‘Blend Shape’ is at the bottom, with ‘Tweak’ above it, and ‘Poly Move Vertex’ is at the top.

.

Maya to Unity – Scale Compensation issue

I have been trying my hands a little in unity, mainly to check if my FBX animation exported from maya reads properly in unity. Once in a while I will have what looks like an issue of double transformations in the scaling of my geometry mesh, particularly for areas skinned to joints that have IK spline applied (for e.g. when using stretchy spline IK for the spine, the body stretches or compresses twice or more as compared to that in maya).

A check in unity’s console reveals a FBX import warning that “Scale Compensation is not supported by Unity”, and that “might result in scale imported incorrectly”, with a list of the affected joints. The solution is to “try disabling Scale Compensation in your file”.

To do that in Maya, select the affected joint(s), go to the attributes editor, uncheck ‘Segment Scale Compensate’. That actually recreates in Maya the double scaling problem I had in unity, and to solve that I had to modify my stretchy spline IK expression.

So instead of the usual expression like this:

float $spineScale = curveInfo1.arcLength/10.607;

jnt_spine0.scaleX = jnt_spine1.scaleX = jnt_spine2.scaleX = jnt_spine3.scaleX = jnt_spine4.scaleX = jnt_spine5.scaleX = jnt_spine6.scaleX = $spineScale;

I just need this:

float $spineScale = curveInfo1.arcLength/10.607;

jnt_spine0.scaleX = $spineScale;

This is because ‘Segment Scale Compensate’ (checked by default) tells the joints down a chain to ignore the scale changes of their parent joint(s). When it is unchecked, scaling the top joint in the chain applies the same scaling change to each joint down the chain, even though you don’t see the change in the scale value in the channel box. This is how unity reads the scaling of the joints, which is why my geometry ended up scaling a whole lot more when using the first expression (The scale changes compounded down the chain of joints).

I hope I’m making sense here haha.

.