The online racing simulator
Looking good, just need some vector wireframes for ultimate precision Thumbs up


A suggestion that might be simpler than that - as it stands, this still requires mod creators to create and supply the skin templates themselves, which I'm sure won't happen in all cases.

Would it be possible to automatically generate and pack the skin templates in the mod export to be available to download as a zip on the mod page?
#27 - Gunn
For the Master Skinnerz kits I made all the black masks 'by hand'. You can go pretty close to the wireframe without bleeding, at least within a few pixels.

You might also notice that your generated wireframes are a bit 'dirty'. By this I mean that each line actually is several lines stacked on top of each other. When creating the Master Skinnerz kits I manually edited the extra lines out so that the wireframe is 'clean'. As you can imagine, this takes a while to select each individual extra line and delete them one by one (see explanation further below).

Back in the day when I started making the kits I discussed this problem with Eric, and as I recall there is no easy solution (or there wasn't back then). other people who have produced wireframes in the past have the same issue.

I have a unique piece of software (made by Andylec) that extracts the wireframe directly from the CMX files and exports them as a metafile (either WMF or EMF).
I then load this metafile into Corel Draw so that I can edit the wireframe to get the 'clean' result. Being a vector file I can resize it to any resolution without loss of quality. This method produces the best results.

So for me at least, the best thing I could have is a way to produce a metafile from your new mesh format. That way I can continue to produce high quality kits. I realise this isn't going to be a popular request, but it is the only way I know how to get the best result for the skin kits.

As for the shadow image; when I first produced the earlier skin kits I didn't include the shadow layer, but pretty soon I realised that a lot of people wanted it, so from then on made all the kits with the shadow layer.
Quote from Degats :Would it be possible to automatically generate and pack the skin templates in the mod export to be available to download as a zip on the mod page?

I like the suggestion but there are a couple of problems with it. Aside from the fact that I can't do anything extra now before the first official version (including some of your other good requests). There is an issue with auto-exports, related to mesh configurations. It's hard for the LFS exporter to know what do do about them, which configuration should it use to create a skin template - maybe the mod creator has a way to put multiple configurations on a single skin but it would require manual editing. But maybe your idea could be used for single config mods. Anyway I can't think about it for now!

Quote from Gunn :your generated wireframes are a bit 'dirty'. By this I mean that each line actually is several lines stacked on top of each other. When creating the Master Skinnerz kits I manually edited the extra lines out so that the wireframe is 'clean'.

Do you mean that you would prefer to have antialiasing disabled? So each line looks a bit like like a series of steps if you zoom in on it? Like the top line in this image?
https://jpgraph.net/download/manuals/chunkhtml/images/aalias_line.jpg

Quote from Gunn :So for me at least, the best thing I could have is a way to produce a metafile from your new mesh format. That way I can continue to produce high quality kits. I realise this isn't going to be a popular request, but it is the only way I know how to get the best result for the skin kits.

It could be possible at some point to produce some sort of wireframe output, either in a simple file format we make up, or one that is already widely supported but I won't be doing anything like that this week as we need to get that official version out.

Quote from Gunn :As for the shadow image; when I first produced the earlier skin kits I didn't include the shadow layer, but pretty soon I realised that a lot of people wanted it, so from then on made all the kits with the shadow layer.

By shadow image, I assume you mean the image I have called 'black and white' skin? Or... are you talking about faked ambient shadows, such as below mirrors, etc.
Quote from Scawen :I like the suggestion but there are a couple of problems with it. Aside from the fact that I can't do anything extra now before the first official version (including some of your other good requests). There is an issue with auto-exports, related to mesh configurations. It's hard for the LFS exporter to know what do do about them, which configuration should it use to create a skin template - maybe the mod creator has a way to put multiple configurations on a single skin but it would require manual editing. But maybe your idea could be used for single config mods. Anyway I can't think about it for now!

Since it would be automated, exporting one set per configuration would avoid having to make a decision. That would be needed for mods like the RC car, as each config is an entirely different shell.



Quote from Scawen :By shadow image, I assume you mean the image I have called 'black and white' skin? Or... are you talking about faked ambient shadows, such as below mirrors, etc.

The latter, basically this one: https://www.lfs.net/attachment/264151
People often use them overlaid over the skin using a blend mode to fake a shadow effect, hence the name. Can also be useful to see the contours more easily.
#30 - Gunn
Quote from Scawen :
By shadow image, I assume you mean the image I have called 'black and white' skin? Or... are you talking about faked ambient shadows, such as below mirrors, etc.

Yes the default skin image.

Quote from Scawen :
Do you mean that you would prefer to have antialiasing disabled? So each line looks a bit like like a series of steps if you zoom in on it? Like the top line in this image?
https://jpgraph.net/download/manuals/chunkhtml/images/aalias_line.jpg

When you export the wireframe you are actually exporting several versions of it stacked on top of each other. This seems to be the case no matter which software exports the wireframe and nobody has been able to tell me why it happens.
Each individual 'wire' is actually several wires stacked on top of each other. By removing all but one of each stacked wire you end up with a very clean wireframe without the jaggedness. The only way I know to do this is to export the wireframe in a format compatible with vector software, then individually removing the extra stacked wires.

If you examine the wireframe on the left you will notice that the centre line is thicker than the one on the right. It is thicker because it is actually two lines stacked on top of each other. Originally it was four lines and looked even thicker. With angled lines the affect is even more noticeable. The image on the right has had these extra lines removed so that only one remains.
Attached images
stacked.jpg
#31 - Gunn
Here is a better representation. The top image has extra wires, but the bottom one has had several removed. You can see the difference in clarity. Keep in mind that this is a screenshot using vector software. In raster software the jaggedness is much more pronounced. In a JPG wireframe the difference is even more pronounced.
Attached images
stacked2.jpg
I see. This may be because the wireframes we generate by default (the easy way) are simply triangles drawn in wireframe mode. At most of the internal edges there are two triangles sharing each edge, so each edge gets drawn twice. At the outer edges of the visible object you may only see one triangle (as the other triangle sharing the edge is facing away) so those edges may look cleaner.

I can think of one solution for this. Instead of rendering the wireframe with MSAA, the wireframe could be rendered at 4 times the size (double width and height) with no antialiasing at all then reduced to the required size. So that would be supersampling instead of MSAA and each edge would look the same regardless of how many triangles shared the edge. Though they might look a bit too fine in this case.
#33 - Gunn
Quote from Scawen :I see. This may be because the wireframes we generate by default (the easy way) are simply triangles drawn in wireframe mode. At most of the internal edges there are two triangles sharing each edge, so each edge gets drawn twice. At the outer edges of the visible object you may only see one triangle (as the other triangle sharing the edge is facing away) so those edges may look cleaner.

I can think of one solution for this. Instead of rendering the wireframe with MSAA, the wireframe could be rendered at 4 times the size (double width and height) with no antialiasing at all then reduced to the required size. So that would be supersampling instead of MSAA and each edge would look the same regardless of how many triangles shared the edge. Though they might look a bit too fine in this case.

I have had this issue in other games, so it isn't unique to just LFS, but I think you are right about the triangle theory. Often the outer edges of a mapping only have two stacked wires, while most of the inside ones have four. Never (pretty much never) is there just one.
My starting resolution for a freshly-exported wireframe is something like 65000 pixels (metafile), so it is pretty big. I resize it down to 2048 so I can work without losing my mind. I also convert the line thickness to the thinnest I can (0.004 points). I think the same issue would occur even if you used a different method of AA, but I'm certainly no expert in this regard.

**EDIT: as for the possibility in future of being able to export the wireframe - I would prefer a format which can be imported into my software as the final product needs to be vector with no background so that I can include it in a PSD skin kit. I don't use Photoshop myself but I make these kits in that format for others, as PSD is a very common format in most graphics software these days. The kits include everything you need in layers, and a wireframe with no background means you can overlay the wireframe and switch it on and off as you work on your skin. The flattened skin templates in LFS are useful for basic skinning, but for precision and high quality they are not so suitable.

I hope this helps.
Well the thing about supersampling is you could overwrite it 100 times with the same line and it would still look exactly the same as if you drew the line only once. That's because the original image is generated without antialiasing - the antialiasing only takes place as a resize of the completed image. Compared with multisampling which changes the result a little each time an edge is added in the same place. It's worth a quick go if I have half an hour spare.
#35 - Gunn
Quote from Scawen :Well the thing about supersampling is you could overwrite it 100 times with the same line and it would still look exactly the same as if you drew the line only once. That's because the original image is generated without antialiasing - the antialiasing only takes place as a resize of the completed image. Compared with multisampling which changes the result a little each time an edge is added in the same place. It's worth a quick go if I have half an hour spare.

I understand it isn't a high priority and I appreciate the consideration you are giving to this topic.
If you do get around to playing with it, I'd be keen to test it in Corel if you could generate a WMF for this purpose.

Thanks for your continued work on our favorite sim. LFS
I has a quick go at trying the supersampling method. The first test was to draw without AA enabled. I already came across a problem, the triangle edge lines, with triangles drawn in wireframe mode, do not look as I would expect a simple line drawing function to work. So this would require more experimentation and there isn't time at the moment.

Anyway, a test version is now available. I have a question, should both the black wireframe on white background, and the white wireframe on black background, both be available? Or is one of them definitely better and so I shouldn't even have the function for the other one?


EDITOR update W55:

New buttons to create skin templates in 'page' mode:
- create shaded skin texture
- black and white skin texture
- white background wireframe
- black background wireframe

Number of points and triangles per spoke object now depends on the
number of spokes - maximum for all spokes of a wheel is now 1600

FIX: Mouse direction (for selecting triangles, etc) was calculated
wrongly if aspect ratio of visible area was wider than 16:9

https://www.lfs.net/forum/thread/95664
#37 - Gunn
Quote from Scawen :I have a question, should both the black wireframe on white background, and the white wireframe on black background, both be available? Or is one of them definitely better and so I shouldn't even have the function for the other one?

That's one of those things for which there is no perfect solution, unfortunately. I don't think one will be better than the other. They each show good contrast, so I want to say it doesn't matter which you choose - though for some reason the black frame on white background seems to appeal more to me. Not sure why.

Thanks for trying the AA alternative.
i didn't succeed to find information "how to" about the new feature "skin template generator"
could you give a short process in the main Mod topic (with the Brickmobile videos) or a link ?
or in the modeller and editor documents

it will be very usefull
thanks a lot
Quote from Scawen :I has a quick go at trying the supersampling method. The first test was to draw without AA enabled. I already came across a problem, the triangle edge lines, with triangles drawn in wireframe mode, do not look as I would expect a simple line drawing function to work. So this would require more experimentation and there isn't time at the moment.

Anyway, a test version is now available. I have a question, should both the black wireframe on white background, and the white wireframe on black background, both be available? Or is one of them definitely better and so I shouldn't even have the function for the other one?


EDITOR update W55:

New buttons to create skin templates in 'page' mode:
- create shaded skin texture
- black and white skin texture
- white background wireframe
- black background wireframe

Number of points and triangles per spoke object now depends on the
number of spokes - maximum for all spokes of a wheel is now 1600

FIX: Mouse direction (for selecting triangles, etc) was calculated
wrongly if aspect ratio of visible area was wider than 16:9

https://www.lfs.net/forum/thread/95664

Is there a better way of matching the size of the two sides, for example, I spent a long time just messing with the mapping so they looked the same size on the skin template if you could make this a bit easier to manage unless I am missing something. Thanks.
If you use the reflected points function then you should only need a single mapping for the two sides. In that case you use a main cutout and an opposite cutout, in the same mapping. This is the case for all the official cars.

If you are not using reflected triangles then you could type in the values and it should be quite simple to replicate them on one side or the other.

Or you can copy the drag box from one side then paste the drag box and adjust the mapping.

You can also link side mappings to top mappings, etc.

So, yes, there are various ways to either not need multiple mappings, or make mappings match each other. There shouldn't be any need for a lot of messing around. You should only need to get one of them right and the other one will be an exact copy of it.
Quote from Tomfuel :i didn't succeed to find information "how to" about the new feature "skin template generator"
could you give a short process in the main Mod topic (with the Brickmobile videos) or a link ?
or in the modeller and editor documents

it will be very usefull
thanks a lot

Enter 'page' mode.
Click the skin texture page.
Now you see four grey buttons at the bottom left to copy four types of template to the clipboard.
Quote from Scawen :If you use the reflected points function then you should only need a single mapping for the two sides. In that case you use a main cutout and an opposite cutout, in the same mapping. This is the case for all the official cars.

If you are not using reflected triangles then you could type in the values and it should be quite simple to replicate them on one side or the other.

Or you can copy the drag box from one side then paste the drag box and adjust the mapping.

You can also link side mappings to top mappings, etc.

So, yes, there are various ways to either not need multiple mappings, or make mappings match each other. There shouldn't be any need for a lot of messing around. You should only need to get one of them right and the other one will be an exact copy of it.

Just to add, (not that I've tested this) even if you're not using reflected triangles I think you should be able to copy the mapping and the cutout, change the new mapping to the new cutout, then move the new cutout position to immediately below the previous one on the skin page.

Not entirely sure how flipping the mapping for the sides works in the various mirrored/not mirrored situations, but you should at the very least be able to rotate the new mapping's heading (h) through 180 degrees.

Edit:
The tricky thing with the cutout/mapping combination is getting them the same aspect ratio to avoid stretching in the skin file. As far as I know, this *does* require fiddling with values and doing calculations. Nearly all the default LFS skins are are wrong aspect; most of them are different on the front/back vs the sides (though the top and sides are usually the same).
Quote from Degats :Nearly all the default LFS skins are are wrong aspect; most of them are different on the front/back vs the sides (though the top and sides are usually the same).

When making skins, I always used wireframes together with the info from this thread: https://www.lfs.net/forum/thread/64975-The-Stretching-of-Skins

Would it be possible to auto-generate those numbers and include them in the template?
Unique paintshops are a big part of LFS, it is nice to recognize players just from their cars, team colors etc.

How does skinning mod cars even work? Can LFS-Viewer open them?
So far I only managed it by copying all the files from LFS into the editor's folder. But that is not userfriendly and the editor has all those confusing extra buttons.
Quote from Gutholz :When making skins, I always used wireframes together with the info from this thread: https://www.lfs.net/forum/thread/64975-The-Stretching-of-Skins

Be careful with the values in that thread, several - especially in the first post - are quite wrong. Some were corrected in text some posts later.

I have to agree that having the numbers auto-generated would be nice, however how useful they are does also depend on the angle of the specific body panels vs the map's projection. It would give a good guide to the roughly perpendicular ones though.
A value *per polygon* would be most accurate, but that's probably not practical Wink
Quote from Degats :The tricky thing with the cutout/mapping combination is getting them the same aspect ratio to avoid stretching in the skin file. As far as I know, this *does* require fiddling with values and doing calculations.

I agree that this can quite tedious if you want to have the aspect ratios correct. I wonder if there could be a feature that would set the mapping's cutout to have the same aspect ratio as the selected mapping - you'd have to provide the size of the "fixed" dimension and the other one would get calculated accordingly. This would save us from doing some maths Big grin
There once was a video floating around on discord with someone doing a skin by actually using Photoshop on a 3D model. I cannot recall how they did it though. I imagine this is a "safe" yet not easy to set up method to skin.
The best thing mathematically should be to have all tri-faces in their true size in the plane, however the skin file would some of its recognisable features plus several tris probably don't fit into their spot.
Any projection of a plane onto an 3D object will always have varying scales after all, see the distortions of different map projections.
#47 - Gunn
Quote from Gutholz :
How does skinning mod cars even work? Can LFS-Viewer open them?

No, the LFS Viewer uses the old CMX file format which is not compatible with the editor. The CMX exporter was very complicated code mixed in with the car drawing code and the tyre drawing system. It was not easy to maintain the exporter. Scawen has always been a big supporter of LFS skinning and a new solution is required going forward.
#48 - Gunn
The stretching of the skins is not uniform, but for the sides and the top the ratio is fairly simple:





If the default skin is 1024 x 1024 the stretched skin is about 1280 x 1024 for example.

Some detailed areas of the skin are still more 'stretchy' in places so some tweaking may be required for artwork that is placed in areas where the mapping wraps around intakes, spoilers and bumpers.
#49 - Gunn
Quote from TFalke55 :There once was a video floating around on discord with someone doing a skin by actually using Photoshop on a 3D model. I cannot recall how they did it though. I imagine this is a "safe" yet not easy to set up method to skin.

Here is the video. The software is called 'Photoshop Extended'



Here is the LFS Forum thread related to this method:
https://www.lfs.net/forum/thread/93915
Quote from Gunn :No, the LFS Viewer uses the old CMX file format which is not compatible with the editor. The CMX exporter was very complicated code mixed in with the car drawing code and the tyre drawing system. It was not easy to maintain the exporter. Scawen has always been a big supporter of LFS skinning and a new solution is required going forward.

Ok.
The workaround with copying the files into LFS-edtior has another problem:
It can not reload/refresh skin files.

In the viewer, you can click "reload" to reload the skin if you have made changes. Or even use the auto-reload function.
In the editor, if you load a skin then you can not update it anymore:
If you make changes to the .jpg it is not possible to open it again. The editor always loads the old version. (Even if you load a different skin and then load your wip-skin again)
The only way is to restart the editor.

Maybe the editor could have a skinning mode?
It would be selected as third option on the launch screen.
Function-wise it would be the editor but:
-allows reloading skins
-hide all unnessecary buttons
-somehow able to load cars from LFS without the user having to copy files

FGED GREDG RDFGDR GSFDG