Planet Tech Art
Last update: November 26, 2015 02:59 AM
October 28, 2015

Grrrr..... Maya!!!

Some kinds of pain are just occasional: you stub your toe or bump your head, ouch, and then its over. Other kinds of pain aren't as sharp or as sudden... but they're chronic.  That persistent twinge in your lower back may not hurt as much as a twisted ankle - but it's going to be there forever (at least unless you get in to power Yoga, or so my wife claims).
 Maya is old enough to have a few of those chronic pains, and I just ran in to one which -- once we debugged it and figured it out -- I realized has been a constant irritant for at least the last decade and if my creaky old memory does not lie was a distinct pain in the butt as long ago as 2002. In another context I might even have been able to diagnose it but instead we spent a ton of time and energy working around an unexpected behavior which is, in fact, purely standard Maya. It's stupid Maya, but it's standard too.  Maya, alas, is double plus ungood about mixing per-face and per-object material assignments. So, I figured I'd document this here for future sufferers: it might not ease the pain much, but at least you'll know you're not crazy.
 The basic problem is that assigning materials to faces and to objects use slightly different mechanisms. If you check your hypergraph you'll see that per-face assignments connect to their shadingGroup nodes through the compInstObjectGroups[] attribute while object-level assigmemts go through the similar-but-not-identical instObjectGroups attribute (if you're looking for these in the docs, the component cone is inherited from the geometryShape class and the object version comes from dagNode).
 As long as you're working with one object at a time this isn't a problem. However, if you're duplicating or copy-pasting nodes, there's a gotcha:  If you ever try to merge meshes which have a mix of per-face and per-object assignments, Maya will magically "remember" old per-face assigments in the combined mesh.  If you're a masochist, here's the repro:

  1. create a object, give it a couple of different materials on different faces
  2. duplicate it a couple of times
  3. assign a per-object material to the duplicates, overriding the original per-face assignments
  4. combine all the meshes.
  5. Et voîla! The cloned meshes revert to their original assignments

What appears to happen is that those compInstObjectGroups connections are driven by hidden groupID nodes which don't get deleted when the per-face assignments are overridden by the per-object ones in step (3) .  They stick around even though they aren't being used, and when the mesh is combined they step right back into their original roles.

If you're doing this interactively it's an annoyance. If you're got tools that do things like auto-combine meshes to cut down on transform load in your game.... well, it's a source of some surprising bugs and equally surprising bursts of profanity.  But at least it'ss predictable.

The workaround:  Before doing any mesh combination, delete the history and something harmless to this history of the meshes you're about to combine. (I use a triangulate step, since this happens only at export time) . That kills the rogue <code>groupID</code> nodes and keeps the combined mesh looking the way you intended.

Sheesh. What a way to make a living.

by Steve Theodore ( at October 28, 2015 05:43 AM

GearVR dev batch scripts

There’s a small array of .bat files that I’ve found myself accumulating over the last bit while I’ve been developing a GearVR and unity app.

A couple of the more useful scripts that tend to live in my build folder. (The ones that haven’t migrated to being editor scripts within unity that is.

Super simple one, take whatever file you drag onto the bat file in windows explorer and try and push that to the device.


adb install -r %1

Fetch the public IP of the current device that is connected via USB, turn on tcpip mode on the device, and connect to it. (While storing the last IP used in a local DeviceIP.txt file


adb shell ip addr show wlan0 | for /f "tokens=2 delims= " %%A in ('findstr /R /C:"/23"') do echo %%A > temp.txt
for /f "tokens=1 delims=//" %%F in (temp.txt) do echo %%F > DeviceIP.txt
adb tcpip 5555
for /f "tokens=1 delims= " %%p in (DeviceIP.txt) do adb connect %%p:5555

Use the last IP stored in the DeviceIP.txt file, and disconnect from remote ADB use.

for /f "tokens=1 delims= " %%p in (DeviceIP.txt) do adb disconnect %%p:5555

Clear the logcat, handy for minimizing how much log you need to scan through.

adb logcat -c

Capture/fetch the adb log to a file, log_output.txt in the same directory that you run the batch from. this will filter the log output for the standard Oculus and Unity line items only. (As of 10-2015.)

adb logcat -s "Unity","VRSVC","VRApplicationPolicy","DEBUG","OVR","TimeWarp","VrLib","VrApi","UnityPlugin","HmdSensors" > log_output.txt

remove the > log_output.txt portion at the end if you want to just draw the log to the console, which can be handy once in a while, when you want to drink from the firehose. For the extra feisty Firehose, remove the -S “” filters.

Note, if you’re trying to use any of these outside of a .bat file, and directly in the console, convert any DoublePercentages %%A to Singles %A.

by Dave Buchhofer at October 28, 2015 02:05 AM

October 23, 2015

Quick 2016 hint for animators

Something that's been discussed for ages in the day to day workflow of animators is how to stop time changes going into the undo queue in Maya... well it seems that Autodesk listened and in 2016 SP4 you can now do one of the following to change the default behaviour:

optionVar -iv timeChangeUndoable 1;
optionVar -iv timeChangeUndoable 0;


optionVar -remove timeChangeUndoable;

Thanks to Kelly on the Beta group for this little nugget, duly logged so I can find it again in the future ;)


by Mark Jackson ( at October 23, 2015 09:15 AM

Road Chip Trailer

I realized, a bit late, that I have to continue the tradition of posting a trailer of the movie I’m working on. So without further ado:

by Morgan Loomis at October 23, 2015 06:55 AM

October 22, 2015

Blazing fast character rigs with Maya 2016

Senior Rigger Rafael Villar at Moonbot Studios recently shared some insight on rigging optimization for the RiggingDojo email newsletter. Check it out for some amazing rig speed optimization tips! Rigging Optimizations: MY FRAMES!?! Looking for that magical 24+ Introduction Coming off the heals of a freshly submitted project and the next one not due to […]

The post Blazing fast character rigs with Maya 2016 appeared first on Rigging Dojo.

by Rigging Dojo at October 22, 2015 06:35 PM