I was wondering, is there a way to animate a sprite using Sprite Deformer Animation and then have that sprite work with either Unity’s Particle system or Particle Playground? Both use either Sprites/Materials or Meshes for particles, but as far as I can tell, there is no way to pass the dynamic mesh that is created by the Sprite Deformer tool to the Particle System. Any ideas? This would be a nice and useful feature to have if it can be figured.
It uses special shaders for 2d sprites, that use Materials with a Diffuse Texture, Normal Depth, Specular Gloss, Ambient Occlusion and Emissive Colour…
So the question is, can I apply the changes on the Sprite also on it’s Materials?
And is the source code included in this package?
Hi.
You can use custom material with custom shader. But you should to know that you will need to create materials for each texture(atlas or single sprite) in your case.
Normals of vertexes is set Vector3.forward by default. You may only replace this value in source code.
Full source code is included. Code not very good but not very bad :).
Main class http://pastebin.com/jXSjNvU8 as an example.
I’ve tried out your tool for a bit now and I think it will work well with my game! I have one question, however:
With your tool it’s possible to paint single points in different colors. Can I do this also through script?
I tried the following:
foreach (SpritePoint point in spriteDeformer.points)
{
point.color = Color.red;
}
spriteDeformer.dirty_color = true;
But it didn’t work. I managed to make the whole sprite change color using your example script “EXAMPLE_modify_material”, but is it also possible to change every vertex individually?
Hi
Your code must works. Please show me the full script.
You can see EXAMPLE_createSpriteDeformer. There one point is painting. http://pastebin.com/sjKSpG8h
When I use the spriteDeformer in my game, it takes a lots of extra drawcall. There’s almost one extra drawcall for every spriteDeformer.
I use almost because sometime spriteDeformer’s drawcall can be optimized, its depends on the sort layers.
I use lot’s of Sprite2D and 16 spriteDeformers, it takes 29 drawcalls, when I disable all spriteDeformers, it only takes 4 drawcalls, seem like spriteDeformers can’t be batched well.
Hi
It uses Unity patching system. If you use one atlas for two or more sprites they shoud be patched, without dependence of sort layers.
Do you see there?
While editing the topology in throws out random out of bounds exceptions half of the time.
When you add more points than it can handle (apparently), it will totally mess up the mesh.
The bottom left point is practically impossible to reach when creating a fresh topology, very annoying.
I have buy your plug but i have a standard shader on my sprite. I put the modified script (Vector3.forward) but my sprite is dark. Can you make a tutorial for have the good result ? thx
I’ve been using Free trial version and so far it’s great. One thing I’ve noticed is that each SpriteDeformerAnimation.Update() generates small GC per frame. Could it be fixed?
Hi Medveya,I’m interested in buying the sprite deforming tool to use with unity 5.5.I integrated the demo version and works great, but I keep getting this exception:
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[UnityEngine.Texture,Medvedya.SpriteDeformerTools.BaseOfMaterials+TextureBaseElement].get_Item (UnityEngine.Texture key) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
Medvedya.SpriteDeformerTools.BaseOfMaterials.IDestory (UnityEngine.Material refMaterial, UnityEngine.Texture texture) (at Assets/SpriteDeformerTool/code/BaseOfMaterials.cs:56)
Medvedya.SpriteDeformerTools.SpriteDeformerWithBaseOfMaterial.OnDestroy () (at Assets/SpriteDeformerTool/code/SpriteDeformerWithBaseOfMaterial.cs:123)
Medvedya.SpriteDeformerTools.SpriteDeformerStatic.OnDestroy () (at Assets/SpriteDeformerTool/code/SpriteDeformerStatic.cs:16)
And I can’t debug it since it’s in the dll. I wanted to make sure that if I buy the full version this won’t happen. Also, how’s support for Windows Phone? Thanks!