Home › Page › Texture Composer

Texture Composer

Texture Composer

Graveck UDev Texture Composer

This tool allows you to modify textures at runtime, which is a great way to customize objects in-game. It can be used to customize item and character textures by mixing and matching different pieces of different textures, allowing for a few textures to create many different combinations!


-Begin using the Texture composer by adding a CompositeProfile MonoBehaviour to an object which will hold the resulting mixed texture for you. It doesn’t need to be the one that the texture will eventually be applied to.

-Set up the profile to have as many CompositeSlots as you need. Each CompositeSlot is a section of a texture that will be used to make the composite texture. Make sure to setup each CompositeSlot’s sourceRect using texture coordinates (meaning 0,0 is in the lower left, not the upper right).

-Once you have the profile set up in the Inspector, you can call SetSlotSource() on that profile from code, passing in the name of the slot and the source you want to use. See the example Controller classes included for details on how to do this.

-After you have set up your Slot or Slots in code, call CompositeTextureUtil.GenerateCompositeTexture() and pass it the profile you have set the slots for. This function will return a texture that you can then attach to the renderer of your GameObject.

In the Example Texture Merge folder is a Test scene in which you are shown the basics of how the runtime margin happens, and in the Example Customization folder is a test scene that shows how the Texture Composer can be used for item customization.
Both of these examples have been set up simply to showcase the usability of the Composer and are not the most efficient setups for in-game uses.
There are many ways to set up the Texture Composer to suit your needs and you are encouraged to experiment and try out new ways in which to employ this technology.

Go here For support and feedback