Quick Rundown: I am doing color-swapping, aka palette-swapping, on 2d-items within my project. However, I am also using the skeletal-system (sprite skin). These two ambitions collide, because when I replace the sprite, there is no way to access or set the bone-data for the new sprite, rendering the model useless
Access to the data within sprite-skin (i.e. bones/geometry/weights) and being able to interact with them THROUGH SCRIPT would go a very very very long way for workflow
This could be done in Runtime if you are dynamically creating your Sprite. In Editor, you will need to handle it through the PostProcessing of assets to persist it from your imported Texture (the same as how the Skinning Module in the Sprite Editor does it).
Thank you for the quick response. I had no idea this API existed and it is very useful to have access. This saved me a bunch of worktime. I’ll mess around with it and see what I can do. Thanks again
Hi @ChuanXin is it possible to get deformed vertices from SpriteSkin or Sprite class. Because SpriteSkin class is an internal class and deformedVertices variable is only private so I don’t see any way to get deformed verticles.
@Leo-Yaik I need to make 2D collider for deforming mesh, something like 2D soft body, and I know Uni2D was supporting it back then, but now there is no option to access deformed mesh so I even cant create my own 2d collider from a deformed mesh. And I know it will not be super fast, but still there should be the option.
If possible, can you also find a way to expose the “set” attribute for textures of the Sprite component?
We already have Sprite.texture {get;}, and I understand some complications can occur with texture-size. But if you make it a function and require that the new texture be the same size as the old, it will function the same way as Graphics.CopyTexture()
This will uncomplicate the process of color-swapping with textures and the sprite-texture process as a whole. Also, and really the most important part, it will make it faster (so much faster)
@Leo-Yaik I am sorry I am still asking about it, but for us is a very important feature and the only way to solve our problems is to expose the deformed verticles from spriteskin. Is there a big problem to do it? Thank you
Somehow related to this topic here. I love the “Auto Geometry” feature of the Skinning Editor as the geo it produces seems way better in terms of verts as the default generated geo. But it does get tedious if I would have to to this to every Sprite in the project manually.
So I would like to automate this step by creating an Editor Script that iterates over a given set of textures and applies the “Auto Geometry” to every Sprite. Sadly I could not find access to that functionality in any API.
Is this hidden in the API or did simply not find it… ?
Here’s a screenshot of the feature I’m talking about (With already applied Auto Geo).
Scripted access to the “Auto Geometry” feature would be super helpful on our project too. Any updates on whether this is likely in an upcoming release?
We are planning and working on some prototupe to improve the current Sprite tessellation. The work will probably include unifying the different tessellators we have.
We don’t have a definate timeline for this at the moment, we will share more once we have something more concrete.