Posts

Unity3d BlendShapes, too many!

Identifying blendShape IDs in FBX objects that have more than you can count I've been working with Daz3D and Unity3D FBX objects and their blendShapes.  Sometimes, for testing I export EVERYTHING, and it can be 100s of blends. I've written the following C# code that will allow you to add target meshes and skinnedMeshes to the Inspector and will enumerate each mesh's blends and put them in a CSV file.  From there, you can target the integer based representation that is matched up with the string name of the blend shape. You could also loop through all blend shape in object, and use name matching to apply blends as well.  A for each blend, if name contains or name equals blink, do xyz. etc... but here is the code that will dump it out to CSV. This will try and create the directory as well, so be careful to put in a good path.  Also, if an Mesh contains no blends, then  EndOfList - If this is the only entry...  will be written to the file. change the logPath below

SAPI Interface and Unity3d

Enumerating and Changing voices in Unity3d Text To Speech So, you incorporated the text to speech in to Unity and want to change the voice, every time you add a new voice, the index changes?  Same here. I looked around for solutions on the web, but found out that it was a bit tricky.  Well, frustrated with it I wrote the following code will enumerate installed voices on the current system, and allow a text search against the voices.  It runs at start, and is best used attached to a new project, on an object. Comment if you have any questions or ideas on how to make it better.  Enjoy! using UnityEngine; using System.Collections; using SpeechLib; using System.Xml; using System.IO; public class VoiceTrigger : MonoBehaviour { private SpVoice voice ; private bool seenMe = false ; // "CereVoice Katherine - English (East Coast America)" -- example of name in system panel, and used in normal SAPI C# to call it as voice,