The online racing simulator
Mod makers and skinners - Auto skin function
Hello mod makers and skinners.

I find the process of making a skin in LFS quite laborious. It may involve use of the "copy screen shot" function in mapping mode, and pasting these screen shots of individual mappings to the pixel-perfect location for each cutout, in an external program. It is too hard to be accurate and too easy to make mistakes.

So I've tried to make a "create skin texture" button that does it all with one click.

The result is attached, using an XRT as example - and also a wireframe export which was requested and uses most of the same code.

But there is a slight problem with a skin created this way - see the in-game screenshot - there is a seam along the edge between two mappings, because it is perfectly aligned that way in the auto-created skin texture. The edge of those triangles at the border is aligned with the edge between the triangles on the skin and the background colour. So you end up seeing some combination of those two colours.

Instead of sitting here wondering what to do about that, I thought I would ask your opinion at this point, maybe you know some tricks for this, or maybe I'm barking up the wrong tree generally. or maybe it's nearly right but just needs some different colours. I'll leave that with you for now as I've got some other things to get on with.
Attached images
XRT_autoskin.jpg
XRT_autowire.jpg
lfs_00000060.jpg
Any skin maker can easily deal with this problem.
We are waiting for the update.
wow ! it's a great idea ! your facility idea are right in tempo with my need (and also for all i think)
in photoshop, this kind of colour addition is the result of layer mode, it never happen before with the actual wireframe used.

is there the edge 1 pixel wide ? is there a possibility to "contract" each part of the mesh shot ?

Uhmm
Quote from Foch_sho :Any skin maker can easily deal with this problem.
We are waiting for the update.

Thanks, but can you give me some more information... such as, do you think this is actually a helpful function? Big grin

I am thinking maybe there is too much "lighting" in this default skin and it should be made nearer to plain white, including the background, and that would help with the issue at seams.

Also what options should there be? For example the wireframe I've posted is white on a dark background. Do people usually prefer the other way round? These options are quite easy to add.

And one more question, would a stark white skin on a plain black background (as a separate option) be of any help? As a kind of mask? I really don't know what useful things could help.
Quote from Tomfuel :is there the edge 1 pixel wide ? is there a possibility to "contract" each part of the mesh shot ?

I don't really know what you mean. I suppose the edge is one pixel wide as it uses multi sample antialiasing.
-
(Scawen) DELETED by Scawen : error
Thanks for making our lives easier! Big grin

A plain white skin variant without shading on black background would definitely be helpful. In this case, would it be possible to introduce a few px of "bleed" around the edges of the cutouts programmatically to get rid of the seams?

For the wireframe, would it be possible to export a version with a transparent background that can be overlaid onto the skin layer?
Here is an example of a high quality skin template made by r4ptor. It consists of a mask and a wireframe with transparent background. Then it can be combined into one file like this. You can notice the small overlap of the cutouts to prevent the seams from appearing.

The other skin kits by Master Skinnerz work in a similar way.
Attached images
XRT Mask.png
XRT Wire.png
XRT preview.jpg
Attached files
XRT template.psd - 7.9 MB - 106 views
If you check Master Skinnerz pro kits,you'll see that black mask is always 2-4 pizels away from closest wireframe line,so I'd say that's the way to do it - some automated function that contracts the unused part by at least 2 pixels (resizing to 1024*1024 that would be just 1 pixel). If you can't create such function,I personally can do it myself - the automated wireframe is already huge step to make easier the making of skin kit.
most likely there is a problem with a calculation error, most likely in some place the UV coordinates are rounded, for example, from 0.334943 to 0.33
It should be possible to widen the white area if I make it render the white part of the image several times, in a circle.

It seems that would be incompatible with the "lightly shaded" version of the skin, unless the lightly shaded image (central) is drawn at the end, after the circular motion of plain white on black background.

I see that some people aren't interested in the lightly shaded version of the skin, but all LFS skins have been supplied that way - is that also a good option to provide?

And, if I do the slightly widened plain white renders on black background option, as requested, is there any need for the version with the light background?
Quote from denis-takumi :most likely there is a problem with a calculation error, most likely in some place the UV coordinates are rounded, for example, from 0.334943 to 0.33

Not at all. There is no mystery to be solved and no error. The edge issue is exactly as expected, from the method used, and perfectly aligned on every such seam.
Quote from Scawen :I see that some people aren't interested in the light shading version of the skin, but all LFS skins have been supplied that way - is that also a good option to provide?

Some people seem to make skins with shading, some make them without shading, so I'd say it would be best to provide an option for it so both variants are possible.
Regarding shading - I never used any as I have the opinion that any shadows should be done by LFS itself (I assume with new lightning system it would even work properly).

Edit: My personal opinion - all I need autocreated is black mask and wireframe as skin kit,rest is up to skinner.
Options... are good but sometimes cause confusion. How will this really work anyway? Will the mod creator do skin template exports for people when requested, catering for every possible slight adjustment?

This started as a "bug fix" because the existing mapping/cutout screenshot system was hard to use and doesn't work on all computers. Now it is becoming a bit complicated and could get confusing if we aren't careful.

I think we need to consider this both in the context of a mod maker providing templates, and simply creating a default skin.


Also what I have not mentioned is I am now extremely short of time. We need to release a final test version this week, so that it is tested over the weekend, ready for an official version next week. It won't be the end of mod development, but it will be the start of mods becoming available in our official version. It's important to do this for the holidays. Also I would find it hard to explain to anyone, just how much in need of a break I am.
in any case, automatic skin creation is a huge progress for the editor

if on the finished skin you paint the area manually a little more than necessary and at the same time this seam disappears, then I think, as an option, leave it as it is.
#15 - FIZ
Quote from Scawen :Also I would find it hard to explain to anyone, just how much in need of a break I am.

Dear Scawen,

as mush as I appreciate your amazing hard work, I am worried about this.
I waited so long to see LFS resurrect from ashes and so the last thing we need now would be another long break from development.
I can speak about it being a developer myself.
It is important not to spend too much time of a day on the same thing because it accelerates the probability of a brain-explosion. It may be rewarding but also consuming inside.
I understand it is important to release an official LFS version before Holidays, so I kindly suggest you to not implement this very cool "auto skin function". Now should be only bug-fix time!
There are so many things upgradeable: bikes, mini RCs, airplanes, destruction derbys, tanks firing..
Nothing can be done if the small team of yours struggle into insanity.
Please accept my suggestion to do the bare minimum needed before the Official LFS version, which is already a big thing!

With our warmest regards,
Fiz
Hi Fiz,

Don't worry, what I really mean is that I want a couple of weeks off while the kids are not at school. The trouble is I've been working long hours since February and it has been quite extreme for a few months, in a massive effort to get this stuff done. And I mean long hours every day of the week. This kind of update doesn't come easily!

But I'm OK, I've sat down with the family every evening and I've done a little exercise every day! And always eaten well and got my sleep. Smile

But the long hours have taken their toll anyway, I'm just holding it together and doing only what's needed for these last few days. Hopefully this weekend and next week I can just do a bit of documentation.
#17 - FIZ
Hug
OK! Please could you check out these? I've tried to do what is needed without getting complicated. So I added 4 buttons.

create shaded skin texture
black and white skin texture
white background wireframe
black background wireframe

The black and white one draws the white image 9 times (8 times in a circle with a 2 pixel offset and finally in the central position). Please tell me if this really is enough or if I should add a pixel or two, or if it needs 12 around instead of 8, etc. It's easy to update this to make it a bit better if I'm not adding more options to the interface.

Flame, it wasn't easy to change my code to allow copying of transparency to the clipboard in a hurry so I added two versions of wireframe, hoping they may be easy to convert to transparency in external software?
Attached images
XRT_shaded.jpg
XRT_black_white.jpg
XRT_wire_white.jpg
XRT_wire_black.jpg
I tried the black and white one at 2048 then scaled down to 1024 and 512 and there are small seams visible when scaled down.

512: https://www.lfs.net/attachment/264163
1024: https://www.lfs.net/attachment/264164
2048: https://www.lfs.net/attachment/264165

Quote from Scawen :Flame, it wasn't easy to change my code to allow copying of transparency to the clipboard in a hurry so I added two versions of wireframe, hoping they may be easy to convert to transparency in external software?

That's no problem, this is enough. Thumbs up
Attached images
512.jpg
1024.jpg
2048.jpg
This is almost perfect, do we still get to add a custom section into the template or will it be locked after autorender?
Quote from Flame CZE :I tried the black and white one at 2048 then scaled down to 1024 and 512 and there are small seams visible when scaled down.

Thanks for the test. I've attached one that does 12 around in a circle, with an offset of 4 pixels (in the 2048 case). Please let me know if this solves the problem. [EDIT - I've added a better one 2 posts down]

Quote from timdecnodder :This is almost perfect, do we still get to add a custom section into the template or will it be locked after autorender?

It's purely "copy to clipboard" so you can do whatever you want with it before actually saving it. Smile
Attached images
XRT_black_white_4P.jpg
That looks nice. Having the mapping mask and shadow is the first step for a good skin, so I am all in for that. Looks like you are managing to hide the seams, so that is perfect. Skins that are done fast without shadow are usually fast pbrush jobs, it can be ok, but will lack some finesse.
Anyway I hope you can finish this new version and enjoy some quality time for christmas!
-
(ACCAkut) DELETED by ACCAkut : misunderstood
I noticed the radius 4, 12 around version created some strange patterns if there was a spike. So I increased it to 24 around. Attached version should look cleaner.

Theory: radius of the little circle (diameter 8 pixels) is 8*PI pixels (about 25) but I prefer the choice '24' as it is a multiple of 4. Smile
Attached images
XRT_black_white_4P_24.jpg
Great work and makes life way easier for skin making for mods!
I always found that the best was to have a white body and black background because it helps with color blending function in photo editors... But the most likely its best to have body wich is white also have the details like if u r looking from side, u see door details and if there's blinker or smt u know where it is ans thats helpful..
Seeing u made many exporting options is great!

FGED GREDG RDFGDR GSFDG