URCHN Arkipelago Difference between revisions of "Meshcacher"

Difference between revisions of "Meshcacher"

From URCHN Arkipelago
Line 43: Line 43:
 
# Show cornea: makes her cornea visible otherwise it will not be there in the cache to render
 
# Show cornea: makes her cornea visible otherwise it will not be there in the cache to render
 
==== Cache the Character ====
 
==== Cache the Character ====
# Go to the File->Export->Cache Proxied Linked Groups
+
# Go to the File->Export->Cache Proxied Linked Groups[[File:Exportmenu.jpg|thumbnail|right]]
# Browse and optionally create the directory you wish to cache in. for Tube this should probably be in non_svn/scenes/act_n/ansnn/ depending on where your shot is.
+
# Browse and optionally create the directory you wish to cache in. for Tube this should probably be in non_svn/scenes/act_n/ansnn/ depending on where your shot is.[[File:Cachewindow.jpg|thumbnail|right]]
 
# before caching, check the settings:
 
# before caching, check the settings:
 
## Cache Subdirectory is where the caches will live
 
## Cache Subdirectory is where the caches will live
Line 55: Line 55:
 
# Press the Cache Group button at the top left, and wait
 
# Press the Cache Group button at the top left, and wait
 
==== Tweaking the cache ====
 
==== Tweaking the cache ====
 +
[[File:Cachedresult.jpg|thumbnail|right]]
 
===== Time ramping =====
 
===== Time ramping =====
 
The cached animation meshes will all be children of a single empty, with the first part of the name of the proxy, the unique name of the Cache, and the word CACHE for instance : gilga_Purple_CACHE. This empty has a single animated property 'frame' which will default to allowing the cache to play linearly from frame start to frame end with no changes. You can animate this property to time ramp, slow motion or glitch your original animation speed.
 
The cached animation meshes will all be children of a single empty, with the first part of the name of the proxy, the unique name of the Cache, and the word CACHE for instance : gilga_Purple_CACHE. This empty has a single animated property 'frame' which will default to allowing the cache to play linearly from frame start to frame end with no changes. You can animate this property to time ramp, slow motion or glitch your original animation speed.

Revision as of 13:19, 25 June 2015

Introduction

Meshcacher is for use with Linked groups and proxies, replacing them with pc2 caches and local meshes with the mesh cache modifier. It can also optionally remove (actually just hides objects and remove group duplis) the original linked group/proxy. The reasons for doing this are:

  1. Simplify away rigging details and just use simple caches (can be faster)
  2. Allows local modifications of the meshes (bypassing the limitation of linked groups that does not allow local modifications)
  3. Easy retiming of animation by automatically driving all meshcache modifiers by a single empty
  4. Allow duplication of animated characters or objects with different animations (also bypassing a blender limitation with linked groups)

What it does

  1. This script replaces each visible mesh in the original group with an identical local mesh, squashing most of the modifier stack and adding a meshcache modifier to each mesh.
  2. It caches the original meshes' animation frame by frame and saves into a directory of the users choice
  3. Optional non mesh members of the groups (curves, empties, rigs) can be made local by adding a custom property called "CASHIFY" onto their objects.
  4. "CASHIFY" armatures must also have "CASHIFY" custom property on every bone (in edit mode) that will be copied over; all other bones will not be made local.
  5. Localized armatures will be driven, frame by frame, with the same driver that affects the mesh caches
  6. Any modifiers in localized "CASHIFY"ed objects will attempt to be replaced by their "CASHIFY"ed counterparts.
  7. Hair systems will be preserved.
  8. Materials driven by the proxy rig will retain their driven animations using drivers.

The "CASHIFY" workaround is intended to keep hair systems that use curve guides functioning in the cache, since pc2 only supports vertex positions. care must be taken to localize the curve guides, and all objects that modify them (hooks, parents, armatures, armature bones)

Installation

If you are a general user, download the script and install it normally. Tube Artists can also refer to the How to install Addons page that has some specific SVN/ Sparkleshare instructions on getting tube addons

Usage

Preparing the Asset to be Cache-able

Make sure all mesh motion is from modifiers, not object motion, parenting or constraints

If you had used bone children, object children, drivers, or constraints to move objects in your Asset around based on proxy motion, you must replace these with modifiers, such as armature modifiers or hooks, since the meshcacher will not currently take object motion into account.

Material animation must be driven by the proxy rig

If you want material animation to be properly cached, make sure you drive it from the main (proxiable) rig. This is mostly going to be the case anyway.

Hide any meshes you don't want to render

You can use the Group Layers for this, that way you won't cache more than you need.

Preserving Field guide rigged hair animation with "CASHIFY" property

CASHIFY.jpg

If you have a hair system, for example a ponytail, that is animated using hair guides, you can perserve this animation, so long as those guides are ultimately deformed by armatures (the armatures can be constrained to sims or the proxy rig): What you need to do is add the custom property CASHIFY to the curve guide objects, and to the armature/s, and to any intermediate objects between the armature and the curve guides. Additionally, go into edit mode on the armature/s and add the CASHIFY property to any bone that affects the curves or the hair. When caching, these will be made local, and the animation of the character will be baked frame by frame into the local bones, and driven by the same parent that drives the rest of the cache.

Caching an animated character or asset in a shot

Select the Proxy Armature

For caching to work, the animation must happen from a proxy rig in your scene

Prepare Gilgamesh

Meshcacher gilga.png

If you are caching gilgamesh, you need to go to the rig UI and toggle the following ON:

  1. Show hair : makes her eyebrows and lashes visible
  2. Show cornea: makes her cornea visible otherwise it will not be there in the cache to render

Cache the Character

  1. Go to the File->Export->Cache Proxied Linked Groups
    Exportmenu.jpg
  2. Browse and optionally create the directory you wish to cache in. for Tube this should probably be in non_svn/scenes/act_n/ansnn/ depending on where your shot is.
    Cachewindow.jpg
  3. before caching, check the settings:
    1. Cache Subdirectory is where the caches will live
    2. Unique name: if you cache more than once in a file, make sure you name each one uniquely, otherwise, you'll just override your previous cache
    3. Modifier Settings: Preview or Render: Preview is recommended, since you typically just need to subsurf more for render, and the caches will be lighter.
    4. rate: if you need subframes, so far only 1 has been tested, use at your own risk!
    5. Apply Subsurf: will result in denser meshes/caches, use at your own risk!
    6. Hide Extra Objects: Recommended to hide curve guides/extra rigs that are CASHIFYed
    7. Hide Original: removes dupli group from empties and hides proxy rig.
  4. Press the Cache Group button at the top left, and wait

Tweaking the cache

Cachedresult.jpg
Time ramping

The cached animation meshes will all be children of a single empty, with the first part of the name of the proxy, the unique name of the Cache, and the word CACHE for instance : gilga_Purple_CACHE. This empty has a single animated property 'frame' which will default to allowing the cache to play linearly from frame start to frame end with no changes. You can animate this property to time ramp, slow motion or glitch your original animation speed.

Appearance/ modifiers

Since the animation meshes are local, you can add modifiers to them, and affect them in any way you like. For instance, changing subsurf settings, adding subsurfs for more smoothness, or decimate or remesh for low poly/ pixellated glitches.

Multiple Caches

To make multiple caches:

  1. Animate your proxy normally, then cache it with "Hide Original" turned off
  2. Change, or reanimate the proxy, then cache it again, this time changing the unique name of the cache
  3. you will now have two caches, with differing unique names and animations, and potentially still have the proxy in your scene for further animation/ caching if needed.