Tag Archives: UDK

Maya to FBX Batch Export

UPDATE(30/7/13) If you’ve found this post and you’re thinking of using this code please try this instead. It’s my much more reliable and feature-rich exporter. The one below works fine, but it’s really just a check to see if batch exporting is possible. Once I’d established that I made the thing that’s on the other end of the link above.

A simple FBX batch export script, useful for exporting multiple animations from a single file. You can download the .py file here. It should be noted however that this script isn’t tested anywhere near as much as it should be, so back up your work before running it.

# James Kyle 12/3/13, http://www.jameskyle.net
# Maya to UDK batch exporter script
# Contains code borrowed from Mark Jackson's blog, which can be found here: http://markj3d.blogspot.co.uk/2010/09/exporting-simple-skeleton-and-mesh-data.html

# Warning!
# This is probably a bit buggy and isn't tested. Save your work before you use it!
# I take no responsibility for any data lost as a result of this script. Use at your own risk! 🙂

# Instructions:
# Edit the Tuple data below with your own filenames, start frames and end frames.
# Select the mesh/meshes and the root joint of the joint hierarchy you want to export.
# Run script!

# Important importing...
import maya.cmds as cmds
import maya.mel as mm

# Lists of animation names, start frames and end frames.
# Add/remove as required.
exportNames = ("BE_idle", "BE_fistBump", "BE_pickup")
exportStartFrame = (1, 32, 300)
exportEndFrame = (23, 70, 333)

# This code selects the joints and meshes only. This isn't my code!
# Original author credit at the top of the script.
meshes=[]
joints=cmds.ls(sl=True)

#find all joints
joints.extend(cmds.listRelatives(type='joint',allDescendents=True))

#find your Skinned Geo
for skin in cmds.listConnections(joints,type='skinCluster'):
    if skin:
        shape=cmds.skinCluster(skin,query=True,geometry=True)
        meshTransform=cmds.listRelatives(shape,parent=True)[0]
        if meshTransform not in meshes:
            meshes.append(meshTransform)
# Borrowed code ends here.

for x in range(len(exportNames)):
    print exportNames[x]
    # Select the mesh and joints to export
    cmds.select(joints,meshes)

    # FBX Exporter options. Set as required.
    # You can find a reference guide here: http://download.autodesk.com/us/fbx/20112/Maya/_index.html
    # Just add/change what you need.

    # Geometry
    mm.eval("FBXExportSmoothingGroups -v true")
    mm.eval("FBXExportHardEdges -v false")
    mm.eval("FBXExportTangents -v false")
    mm.eval("FBXExportSmoothMesh -v true")
    mm.eval("FBXExportInstances -v false")
    mm.eval("FBXExportReferencedContainersContent -v false")
    # Animation
    mm.eval("FBXExportBakeComplexAnimation -v true")
    mm.eval("FBXExportBakeComplexStart -v "+str(exportStartFrame[x]))
    mm.eval("FBXExportBakeComplexEnd -v "+str(exportEndFrame[x]))
    mm.eval("FBXExportBakeComplexStep -v 1")
    # mm.eval("FBXExportBakeResampleAll -v true")
    mm.eval("FBXExportUseSceneName -v false")
    mm.eval("FBXExportQuaternion -v euler")
    mm.eval("FBXExportShapes -v true")
    mm.eval("FBXExportSkins -v true")
    # Constraints
    mm.eval("FBXExportConstraints -v false")
    # Cameras
    mm.eval("FBXExportCameras -v false")
    # Lights
    mm.eval("FBXExportLights -v false")
    # Embed Media
    mm.eval("FBXExportEmbeddedTextures -v false")
    # Connections
    mm.eval("FBXExportInputConnections -v false")
    # Axis Conversion
    mm.eval("FBXExportUpAxis y")

    # Export!
    mm.eval("FBXExport -f "+exportNames[x]+".fbx -s")
Share

[UDK] Castle Fearghus

This is a play-through of a game made as part of the Mrof Games Development course at the University of Abertay, Dundee. The game is created using UDK, with art assets created using Autodesk Maya, 3DS Max and Photoshop.

The game is set in a fictional Scottish castle overrun by vampires. Fearghus must storm the castle and defeat the vampires, eventually reaching the vampire lord. Defeat him to complee the level. The game controls similarly to games like Power Stone and Kung-Fu Chaos, with 1 or 2 player platforming and fighting action.

Team Tertiary are…
Producer: Kunal Patwe
Designer: Isabella Wang
Programmers: Donald Hicks, Tony Hilton, Hunter Zhang
Concept art, environment and UI): Bruce Yan, Neal Liu
Character concept, modelling and texturing: Yuting Jiang
Character rig and animation, character particle effects: James Kyle
Audio: Cam Goold

The game was shown at Dare Protoplay 2012 at Cairn Hall in Dundee as part of the Dare to be Digital competition show and associated events. Here’s a video of how it looked there. It’s not quite as polished and played a little worse than the final submitted version but was still received well by the public.

Share

[UDK] Tochi Tochi

As part of my MProf Games Development I was working on a UDK game in semester 2 called “Tochi Tochi.” I assume that’s the main character’s name but I’e since forgotten why it’s called that. Here’s a video playthrough.

The controls for the game are a little tricky as it’s just a prototype, but it functions and all the game mechanics work as intended. The aim is to get the main character to the level goal while avoiding sunlight. As direct light kills the character it’s a good idea to avoid the beam of the critter enemy roaming the level. The player can possess the critter to move across brightly lit areas. It is essentially a stealth platformer.

I worked on the main character model, textures, rigging and animation. The textures and normal map were taken and improved upon by one of the teams other artists, Bryn Morrison-Elliot. I feel like it turned out okay but I wasn’t very involved in how the character looked once it got into UDK. In the next semester project I made sure to be far more involved in that aspect of the game.

Share

Maya to UDK Export

I’m going to have to export some animations from Maya to UDK eventually, and from what I’ve been shown of the process by Kristian there has to be an easier way. There just has to be! It works, but it’s fairly clunky and there’s a serious likelihood of accidents.

Looking it up there doesn’t seem to be a one-size-fits-all UDK mesh and animation exporter. There’s a few for meshes, such as jdUDK tools (looks great,) but the main job seems to be in making a FBX Export preset that selects only the necessary data to make an FBX that UDK will take without error.

There are a few resources on this. The first stop is the UDK support site, which details the bare bones of getting assets out of a few different 3D packages and then how to get them into UDK.  The best source of info came from tech-artists.org, which had a forum thread on exporting without constraints, something you need to remove from the scene before exporting on default FBX export settings.

What I’ll need to do is follow this blog article to make a nice preset I can distribute to the rest of the team for animation exporting. It doesn’t sound that difficult but FBX is such a massive beast to work with it’s difficult to get all the settings just right if you’re new to working with it.

Share