Library for tools for use in Unity3D that allows Unity3D developers to work with Spyro-like data in Unity3D.
There are many ways to grab and use these tools.
- You could download the source and build this solution.
- You could download the source and drop it into the Editor folder in Unity3D
- You can download a Unity Pacakge from the release tab containing the source: here
- You can download a Unity Package from the release tab containing a compiled assembly here
- Vertex Coloring
- Vertex Color Shaders
- Animation Shaders
- Portal Shader
- Secondary Object Placement
WARNING: Make sure you disable mesh compression, vertex welding and mesh optimization for all .M assets. It's possible to lose some vertex data this way. If you encounter coloring problems open an issue on this repository. Also use GAMMA COLOR SPACE otherwise your scenes will look wrong. Google how to change this to Unity3D.
GladerSpyroTools contains a Unity3D editor extension for adding vertex colors to meshes from Spyro.
- Import map OBJs.
- Open UVW Flipper window under GladerSpyroTools.
- Take UVW texture coordinate OBJ (known as .M or .S for Skybox) OBJ and create uvswapped version.
- Add textured map into scene (known as .T)
- Open Texture and VertexColor Combiner
- Assign Textured scene object
- Assign vertex color OBJ (known as .M or .S for Skybox)
- Assigned uvswapped vertex color OBJ (known as .M_uvswapped or .S_uvswapped)
- Hit Combine Data!
Vertex Color Blending: This feature allows for vertex colors to softly blended with data from nearby meshes for each vertex. This will increase the amount of time it takes to generate the vertex colored meshes. However, it's highly recommended you use this feature to generate proper vertex colors.
Save Meshes: This feature allows will create new Mesh assets and assign them to the scene's MeshFilters. It will create copies from the original mesh asset and save them in a folder next to the vertex colored gameobject. This MUST be used to persist vertex coloring.
As of right now two shaders are provided. One for maps and one for skyboxes.
Map: The map one provides vertex coloring, lightmap support or vertex light (unity3d) support in Forward rendering path or pixel/vertex lights in Deferred. It technically supports reflection probes everything the standard specular lighting model supports. However I recommend just using lightmaps to bake the ambient in and gain some nice touches from baked shadows. Vertex colors are multiplicative with the sampled texture color and are added as ambient light in the lighting function. There are material properties for flat ambient term and the strength of the vertex coloring as lighting.
Skybox: The skybox is very simple. Just uses vertex color as Albedo color with no lighting support. Provides properties for coloring and for intensity of the brightness.
AGPL Glader/HelloKitty@Github