Granny 3D

Granny 3D SDK Features

Granny is a complete framework for developing everything from simple 3D applications to complete next generation engines. If you start your project with Granny you can shave months off your development cycle. You get battle-tested exporters, an extendable toolbox of preprocessors for meshes, textures and animations, a full suite of normal and texture map generation tools, a complete previewing tool to visualize your meshes and animations before they get to your engine, and a full run-time library of 3D tools ranging from camera controls to transform decomposition routines. Oh, and a skeletal animation system that's shipped over 4,800 games, on nearly every platform available.

Or, drop Granny into your project well down the development cycle to add key features like animation blending and normal map generation, or to upgrade your exporters to take full advantage of art tool features like shader graphs, animation plug-ins, or lighting and camera control.

Granny 2.8 is built in a highly modular and decoupled fashion, allowing you to use as much or as little of its functionality in your application as you choose. All APIs are tiered, such that you can easily shift from using high-level "do everything" APIs to using fine-grained APIs that give you explicit control over everything. You can even step beyond our APIs and manipulate Granny data directly. Granny 2.8 never puts you in a situation where you have to do something our way - we do not force you to use particular vertex formats, we do not impose a proprietary scene graph architecture on your application, and we don't demand that you inherit from a custom object hierarchy. Everything is done your way, and remains under your control. You can use all of Granny 2.8's features quickly and easily without giving up control over your engine's architecture.

Below is the list of shipping bullet-points for Granny 2.8. As with all RAD products, we frequently update Granny, and new features and optimizations are added on a monthly basis, so this list is rapidly expanding and is by no means complete.


Animation Studio

  • Artists can graphically specify allowed character behavior, test blends, control animation speed and looping parameters, all without leaving the graphical tool or involving a coder
  • Runtime API allows retargeting state machines to multiple related characters without modification, just like a normal Granny animation
  • Graph state and parameters are fully exposed, you keep all of Granny's flexibility while working at a higher level
  • Multi-level state and blend editing to keep complicated graphs manageable
  • Fully extensible library for managing character state. Put your own nodes into the system, and interact with them in the editor just like the built-in types. Allows you to bake specialized knowledge of your game into the animation system directly.

Animation playback and blending

  • blend arbitrarily many animations at once
    • new "priority-less" weighting scheme makes even complex multi-animation blends (like 9-animation aiming blends) trivial
    • entirely quaternion blending ensures no undesirable blending artifacts (like gimbal-lock)
    • no work done on zero-weighted animations, so leaving many animations attached to a model incurs no computation overhead
  • optimized playback
    • Granny has platform-specific optimizations for sampling, blending, and deformation matrix construction, including SSE, VMX128, Paired Singles, SPU and Altivec.
    • Granny supports multithreaded sampling for maximum performance on multi-core or multi-processor platforms.
  • integrated animation LOD
    • reduces the cost of detailed skeletons in distance
    • eliminates need for multiple versions of skeletons or animations
    • animation-specific LOD - subtle animations reduce sooner
    • offline or load-time calculation of LOD parameters
    • all animation sampling calls take a desired error value
    • all blending functions work the same - complete orthogonality
    • all transitions are smooth with no "popping"
  • mirrored animation playback
    • saves memory by allowing one animation to serve for both left- and right-handed versions
    • mirrored animations can be blended with non-mirrored animations seamlessly
  • explicit timing control of animations per-model and per-animation
    • play animations backwards or forwards at arbitrary time scales
    • easily advance time for all models in a scene or just those visible
    • adjust times per-model or per-animation, forwards or backwards, for painless synchronization of playback across a network
    • advance some animations in real-time and others in sub- real time for matrix-like special effects
    • query and change model clocks multiple times per frame for easy collision detection searching
  • individually decomposed translation, rotation, and scaling for perfect interpolation
    • allows artists complete freedom to use scaling and shearing in their animations
    • prevents scaling and shearing animation from introducing rotation artifacts and vice versa
    • no work done for channels which are not used (eg, you don't pay for scale and shear if your animations don't use them)
  • complete bone-level control of blending percentages
    • individual control of animation track-side weighting and model bone-side weighting per animation
    • easily feather upper-body motion into lower-body motion
    • automatically interacts properly with ease-curves for easing in and out feathered animations
    • tool plugins and automatic extraction make authoring bone weightings easy
  • ease animations in and out over time with cubic beziers
    • automated calls for default timings and smooth transitions
    • user-controllable curve tangents for explicit ease-curve control
    • optionally release control resources at completion of ease-out curves for completely hands-free control memory management
  • quick root-bone motion prediction
    • keep feet planted by moving characters as they were moved when animated
    • predict collisions without computing entire character state
  • explicit blending stage control
    • directly modify or override local transforms for each bone post-blending but pre-hierarchial composition
    • directly modify or override world transforms for each bone for manual or IK-assisted adjustment of limbs (keeping feet level on uneven terrain, or pulling hands or hand-held items away from walls)
    • save local or world transform states for use at another time or as a animation to blend in later
  • high-level blend directed acyclic graph for complex animations
    • construct complex blending graphs from multiple layers of simpler ones
    • user callbacks for custom effects such as muscle and cloth
    • sampling and rendering code becomes independent of animation complexity
    • easy encapsulation of animation classes such as facial animation, lipsync, hand gestures, foot IK - makes it easy to apply complex functional blocks to multiple skeleton rigs and types without requiring each to have full knowledge of context
    • even easier integration with external modifiers such as collision-detection, physics constraints and ragdoll simulation
  • Use your own meshes
    • animation APIs are completely separate from mesh and texture APIs
    • get composited, hardware T&L-ready 4x4 matrices for use in your own mesh deformation or rigid mesh rendering.
    • download Granny's matrices directly to the 3D hardware for blazing fast shader-based deformation. Hardware deformation examples are available for all console and PC platforms.

File format

  • completely transparent and flexible file format
    • all aspects of file format are exposed at the API level, so you can write your own Granny file readers and writers even without using the Granny API utilities for doing so
    • file format is not hard-coded, so you can add your own extensions or even change it completely and use it for files other than your art assets
  • ready-to-run default file structure
    • all data is (by default) stored in ready-to-run format, so loading is just a single block read and an extremely fast pointer fix-up pass; no clunky RIFF parsing or type conversion
    • file data can be stored in multiple segments within the file to facilitate fast freeing or re-loading of various types of data (such as texture data or vertex data)
  • built-in versioning
    • Granny can convert older Granny data transparently in either the toolchain or in the runtime. We are serious about never making you throw away or reprocess your data except when you want to.
    • As a demonstration of how robust Granny's versioning support is, the "GrannyRocks.gr2" sample file that ships with the Granny viewer was last exported in 2003. We've never had to touch it.
  • your custom data gets the same version treatment as Granny's native data, so you can store critical data in your .gr2 files without worrying about keeping it up to date.
  • built-in "better than ZIP" compression
  • let Granny automatically compress all your files at ratios better than PKZip and other standard compressors
  • automatic endianness conversion
    • Granny handles all byte-swapping, so you can use the exact same files on all your target platforms with no modification to your source code
  • native support for every platform
    • Granny can load and fixup pointers on either 32- or 64-bit platforms, regardless of the pointer size of the platform that created the file. You always get back native C structures from Granny, with all the references, array sizes, and data ready to use directly on your platform.
    • The Granny Exporter and Preprocessor can create files optimized for loading on any target platform, regardless of the platform on which you run your toolchain.

The Granny Optimizer

  • Our customizable pipeline tool that natively supports over 35 common operations, including:
    • setting file compression parameters
    • breaking meshes along bone boundaries for submission to hardware deformers with a limited register set
    • cleaning unwanted data from the file
    • convert mesh indices to smaller formats
    • convert mesh vertex formats to a custom engine type
    • prepare the file for loading on 32/64 bit systems with big- or little-endian byte ordering
    • transform the file into your engine's coordinate system
    • optimize index ordering for hardware post-transform caches
  • works with all platforms
    • supplied as source code for you to modify to your engine needs
  • simple, flexible driver program makes customizing the tool with your own operations a snap
  • command-line design integrates trivially with any build system.

Animation exporting and processing

  • Flexible sampling-based curve export
    • allow your animators to use any bone animation methods including plug-ins and expression or IK-driven bones
    • "frame-less" sampling converts everything to consistent time-frame based information
  • advanced compression
    • per-bone user-controllable curve fitting and compression of animation data
    • choose from cubic, quadratic, linear, or step interpolation for position, rotation, and scale/shear data separately
    • Granny automatically chooses the smallest possible representation for your data. Granny supports everything from full floating point curve representations, down to 7- bit dimension-reduced formats. You get the smallest possible format without exceeding your tolerance targets.
    • sample animations at arbitrary times and timesteps while retaining perfect continuity
    • full support for C0 and C1 discontinuous curves, so objects can bounce, teleport, etc., whilst still maintaining perfectly smooth motion at any time scale
  • extensive post-processing capabilities
    • rotate, translate, or scale entire animations after exporting
    • automatically align animations so they begin at the origin, regardless of where they were originally modeled
    • automatic handedness and coordinate system remapping, so you can easily change right-handed art tool data into left-handed data for your engine, or vice versa, change "up" vectors, etc.
  • integrated track mask support
    • allows in-game per-bone masking of animations
    • create with UI integrated into Max and Maya, or use your own custom scripting tools
  • Morph targets and vertex animation
    • Export an arbitrary number of morph targets for viseme animation or custom mesh-based animations.
    • Export per-vertex curves for the ultimate in control. Positionally update each vertex either in model-relative or bone-relative space.

The Granny Viewer

  • natively supports both PC and Macintosh with full use of hardware 3D acceleration on both
  • full 3D previewing
    • load multiple models from separate files
    • vertex normals, face normals, bounding boxes, bones, bone names, and coordinate frames can all be inspected visually on the fully animating model
    • support for all common aspect ratios and FOVs, so you can see how the model will really look with your engine's perspective
    • auto-detection of mesh size and native orientation, so you will always see your model oriented properly (whether it's y-up or z-up) and at the right distance (load big buildings or tiny characters, and they'll always come up frame properly, even before you adjust the camera)
    • in-scene camera viewpoints are exported, allowing you to check defined viewpoints on the runtime model
  • full animation previewing
    • audition animations from multiple files on separately loaded models
    • play animations with or without root node motion
    • onion skin testing for visualizing animation boundaries
    • slow down or speed up time to see animations more clearly
    • drag time back and forth to inspect specific animation segments
    • preview animations playing backwards
  • visual calibration tools
    • User-selectable min, max, center, and origin grids for easy model alignment
    • Multiple, common-unit grid sizes for visual inspection of measurements (mm, cm, m, km, etc.)
    • Auto-measurement lines with meter read-outs for determining the exact length of the working space
  • texture inspection
    • Inspect textures separately from models
    • Use UV overlays to see how models are mapped
    • Swap calibration textures in and out for on-model visualization of how UVs are assigned
  • complete raw file data inspection
    • see actual raw file data for debugging purposes
    • navigate entire file data tree as hyperlinks
    • view exact vertex, mesh, and animation data
  • Granny Viewer automatically converts old files on-the- fly for easy viewing and browsing

Exporter integration

  • supports all versions of 3ds Max and Maya, and versions of XSI after 5.11
    • MAX support includes all node-level animation, rigid meshes, Bones Pro, Physique, and Skin
    • Maya support includes all node-level animation, rigid meshes, rigid skinning, and smooth skinning
  • all accessible art-tool data is exported, even if it's specific to a particular package
    • exports MAX-only or Maya-only userdata, light settings, camera settings, dummy bones, etc., so you can use it for full-scene exports as well as characters and props
    • exports all MAX-specific and Maya-specific material parameters for use in your custom-written shaders
    • exports animated custom attributes as spline curves that you can sample in the same way as the standard bone animations
  • hierarchical settings interface for precise control over export contents and settings
    • control what models, textures, animations, and materials are included in the export
    • set global preferences like texture compression percentage, maximum weighted bones-per-vertex, and animation curve types or override settings on an item-by-item basis
    • settings saved in scene and in settings files
    • settings automatically persist with scene files and with individual objects, so models copied from one scene to another will actually retain any specific Granny export settings in the new scene
    • commonly used settings can be saved to compact settings files and loaded into new scenes, shared across a network, or e-mailed between artists
    • settings are backwards and forwards compatible so new versions of the exporter can read common settings from older versions and vice versa
    • settings are tool independent, so Granny export settings made in MAX can be used in Maya, etc.
  • native tool scripting support
    • MAXScript and MEL bindings allow hands-free, completely automated batch exporting
    • automatically run your own custom post-processing executables after export
    • write special-purpose scripts for automating common settings, or check and enforce art conventions

Source code

  • natively supports all common compilers and platforms with an ANSI-C standard library
  • no templates, inheritance, or other undersupported C++ features, so there are no hassles even on non-compliant C++ compilers
    • compile under MSVC, GCC, SN, ARMCC, etc.
    • compiles on nearly every platform with floating point support: WinXX, Mac OS X, XBox 360, Wii, 3DS, PS3, PSP, PS Vita, Linux, etc.
  • extremely clean, segmented design makes user-added features easy to implement and maintain
  • no "new"s or "delete"s - all memory management calls go through centralized allocate and free function pointers so memory management can be over-ridden through the API or at the source level
  • no hard-coded file opening or closing - all file calls go through centralized open, read, write, and close function pointers for easy replacement through the API or at the source level

Mesh deformation and control

  • easily manipulate and switch meshes at run-time
    • all mesh/model bindings are user-manipulatable, giving you complete control over rendering order, deformation order, storage of deformation results, GPU-residency, and LOD swapping
    • transparent mesh structures allow you to change vertices, weights, colors, texture coordinates, even polygon ordering and inclusion at run-time
  • fast deformers for a variety of platforms
    • includes optimized blenders for multiple platforms and multiple vertex formats, with an expandable architecture that lets your code instantly and automatically take advantage of new blenders we release
  • support for tangent-space deformation in addition to position and normal deformation
  • let harware T&L do the work where available
    • all mesh data is available to the application for submission to hardware or modification into a hardware-ready format, whether or not Granny explicitly supports the hardware platform you're targeting
  • not limited to Granny animations
    • mesh deformation APIs can be used with any vertex data and transform set, whether they came from Granny's animation APIs or from your own custom animation code

Mesh exporting and processing

  • extensive vertex layout support, including packed formats - pick from floating point, packed 16-bit, packed 8- bit, and a variety of other formats for each individual vertex attribute
    • automatically convert between Granny's standard formats and your own custom vertex formats - save your own custom vertex formats directly in Granny files
    • let Granny do weight clipping and normalization for you
  • full support for multiple 2D or 3D texture coordinates and 3D or 4D colors per vertex
  • user-specifiable bones-per-vertex for weighted blending
  • automatic splitting of vertices based on normal and material boundaries
  • face-to-neighbor, vertex-to-face, and vertex-to-vertex rings
    • makes for easy user implementation of custom mesh post-processing routines
    • includes all information necessary for run-time silouette edge extraction
  • automatic handedness and coordinate system remapping, so you can easily change right-handed art tool data into left-handed data for your engine, or vice versa, change "up" vectors, etc.

Material exporting and processing

  • exports entire material and texture graphs from MAX and Maya
  • let Granny's high-level routines interpret standard shader graphs, or write your own tool-specific custom shader graph parsers for special effects
  • programmatically access all maps, including specular, diffuse, ambient, self-illumination, bump, displacement, refraction, reflection, and many others
  • programmatically access all material parameters like UV cropping and wrapping types, environment mapping types, tool- supplied physics coefficients, mixing percentages, and hundreds of others
  • built-in support for S3/DXT compression
    • store textures in hardware-ready format
    • let Granny's custom DXT texture compressor quickly and automatically detect which DXT texture format most accurately encodes your textures
  • built-in Bink texture compression
    • get 20:1 and better texture compression for cases where disk space or download size is critical
  • built-in conversion support for all raw texture formats for arbitrary bits-per-pixel and bit ordering
    • automatically convert Bink-compressed or DXT-compressed format images into raw data of any format for manipulation or submission to hardware
  • high-quality texture resizing for automatic MIP-map creation or run-time constraining of textures to 256x256 (or any other abitrary size) for older graphics hardware
  • files can contain textures and material in their entirety, or reference them by name to support shared material and texture libraries

Normal mapping and texture tools

  • supports Max and Maya
  • produces single, complete low-res texture maps for your low-res geometry from cinematic-level high-res geometry with an arbitrary number of applied materials
  • generate beautiful normal maps from high-res geometry for use with advanced shaders
    • Generate tangent-space normal maps, object-space normal maps, or displacement maps
    • User-controllable over-sampling
    • Automatic texture filling for better MIP-map generation
  • automatic generation of tangent space basis vectors for exported models
  • fully SSE-optimized deformers for tangent spaces, both for normal-tangent and normal-tangent-binormal formats
  • special texture compression path for normal maps that provides extra accuracy, and avoids YUV conversion

Memory management

  • low memory overhead for Granny bookkeeping
  • all internal Granny allocations are block-based
    • very few allocations total
    • no small allocations
    • no need for advanced memory allocator underneath
  • "allocationless" at run-time
  • memory is allocated and freed only when you request it, so there are never any hidden per-frame allocations or other slowdowns
  • all memory operations can be overridden
    • control how memory is allocated at the low-level
    • in many cases, you can provide memory directly to the appropriate APIs without overriding the low-level allocators at all

Physics Integration

  • Full source shipped for the Granny/Aegia integration library
    • add ragdoll to your game with a few lines of code
    • mix in physical results for automatically generated recoil, impact, or other animation effects
    • create zombie effects by physically driving a blended animation with no extra asset creation
  • small, focused integration layer is easy to customize to whatever effects you have in mind.
  • easily retargeted to other physics APIs such as Havok, ODE, or custom solutions

Inverse kinematics

  • pre-composition IK
    • use IK to aim guns, point fingers, and turns heads, then blend them in with the rest of your animations using the standard Granny animation control APIs
  • post-composition IK
    • analyze post-composition bone positions for validity (collision with your world geometry, etc.), then quickly use IK to fix them up