How to use
- Open or create a scene.
- Select a character
- Go in the plugin tab
- Add the plugin to the character using vamccd.cs
More info
Why are my decals at strange positions ?
The decal system is simply pushing a texture inside VaM's shader. So it's a simple blend in the model UVs. Depending on your clothes, it might be hard to have something interesting... but you can always create your own decal based on the original UVs!
The video above shows a clothing set I'm working on which is highly thought in advance to have UVs working for that type of plugin. Not all clothes will be perfect for it, unless you make your own textures.
Wrap Mode
The wrap mode might be hard to understand at first.
It simply is the way the texture repeats. The most "bizarre" ways are No-repeat and Mirror Once (which could also be called No-repeat mirror).
In both these two modes, the texture will only display once over the whole material of the clothing. To resize it, you need to increase both tile X and tile Y. 1 would be the original size, 5 would be 5 times smaller.
But pictures are better and speaks for themselves.
Let's take an original decal like this :
Now, let's change the wrap to No-repeat and resize it to 2, the result is this :
Now, let's change the wrap to Mirror Once and resize it to 2, the result is this :
What ? the result is the same ? Nope... let's offset a bit!
No-repeat with an offset of -1/-1
And Mirror Once with an offset of -1/-1
These are the two patterns you can obtain by using both these wrappings. Keep in mind that No-repeat and Mirror Once will not repeat. The further you go on the size, the smaller the pattern will be and the bigger your offset will need to be to position it properly.
Also, looking at the pictures, it means that as soon as you use No-repeat or Mirror Once, to center your decal, you need to offset it by -Tile / 2.
If you set Tile X and Y at 3. Then centering it requires and offset of -1.5.
If all this wrecks your brain... simply have fun with the sliders, you will end up finding something you like
Special thanks
Thanks to @meshedvr for the clothing components tips and help.
Super thanks to @Chokaphi who's code (Decal Maker) helped me figure out a memory leak in my initial blit copy code.
And ultra thanks to @Spacedog and @Juno for the debug, ideas and suggestions