Difference between revisions of "LFS Editor/Troubleshooting"

From LFS Manual
Jump to navigationJump to search
(Created page with "{{Infobox LFS Editor}} This page provides explanation of common errors you can encounter when working with the LFS Editor. == Modelling == === ERROR in object X: N poin...")
 
m
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
This page provides explanation of common errors you can encounter when working with the [[LFS Editor]].
 
This page provides explanation of common errors you can encounter when working with the [[LFS Editor]].
 +
 +
== Importing an external OBJ model ==
 +
 +
{{further|LFS Editor/Guides/Importing an external model|Importing an external model}}
 +
 +
=== Too many vertices (32768) ===
 +
 +
The number of vertices exceeded the maximum limit of 32768 for OBJ import. Note that when importing a model into the LFS editor, it is possible to import only one half of the model and then use the mirror function to mirror the triangles to the other side automatically. The total limit of vertices or triangles is 65536.
 +
 +
=== Vertex X is out of bounds ===
 +
 +
One of the vertices is more than 1024 metres away from the origin. This could be a problem of wrong scaling. LFS uses metres for units.
  
 
== Modelling ==
 
== Modelling ==
Line 59: Line 71:
 
* Save the PNG file as a 32-bit image (including the alpha channel)
 
* Save the PNG file as a 32-bit image (including the alpha channel)
 
* The file name must end with <code>_ALP</code>, for example <code>TextureName_ALP.png</code>
 
* The file name must end with <code>_ALP</code>, for example <code>TextureName_ALP.png</code>
* In [[Modeller]] in {{old button|cutout}} mode, the cutouts that use this texture page must have the material property "Alpha type" set to "Alpha".
+
* In [[Modeller|modeller]] in [[../Modeller/Texture Cutout Mode|cutout mode]], the cutouts that use this texture page must have the material property "Alpha type" set to "Alpha".
  
 
==== You want a texture without transparency ====
 
==== You want a texture without transparency ====

Latest revision as of 07:25, 17 June 2024

LFS Editor
Vehicle Mods

This page provides explanation of common errors you can encounter when working with the LFS Editor.

Importing an external OBJ model

Further information: Importing an external model

Too many vertices (32768)

The number of vertices exceeded the maximum limit of 32768 for OBJ import. Note that when importing a model into the LFS editor, it is possible to import only one half of the model and then use the mirror function to mirror the triangles to the other side automatically. The total limit of vertices or triangles is 65536.

Vertex X is out of bounds

One of the vertices is more than 1024 metres away from the origin. This could be a problem of wrong scaling. LFS uses metres for units.

Modelling

ERROR in object X: N points with a bad normal

This usually means that some triangles, within a single smoothing group, meet at a point such that LFS does not know which direction that point should face. Most commonly, this can happen if a triangle is built in one direction, and another triangle is built on the same points, in the opposite direction. The point directions (known as 'normals' add up to zero, so LFS cannot decide where the normal should really point). Maybe the triangles were built this way by mistake, or maybe you intend to create a double-sided surface. If you do want a double sided surface, the triangles on one side should be in a different smoothing group from the triangles facing in the opposite direction and that will solve the problem.

The trouble is, you may not know exactly where the problem is when you see this message. It may also come up if you import a mesh (as an OBJ file) from some other 3D modelling softrware. Have a look around your model, for vertical red lines. LFS tries to display a red line where any of these bad normals are found. At the bottom of the red line you should find the offending vertex. The line is bright red where it is exposed, and a darker red where it is behind some surfaces of the model.

Mod looks shiny in the editor but matt in game

If you only have a single LOD (level of detail) the environment map is not shown because LFS thinks it is drawing the the physics LOD. That is because the collision mesh is defined by the lowest level of detail (LOD with the highest number).

To solve this, you can easily add an automatically created collision mesh (also known as physics LOD). How to do this is described in the Level of detail guide.

Texturing

Invalid texture X - Too small

There is a texture named X whose dimensions (width and height) are too small to be used in LFS. The minimum allowed dimensions are 16×16 pixels.

Invalid texture X - Not a square

There is a texture named X whose width and height are not equal to form a square. The width and height must be the same.

To fix that, use one of the following texture dimensions in pixels:

  • 16×16
  • 32×32
  • 64×64
  • 128×128
  • 256×256
  • 512×512
  • 1024×1024

Invalid texture X - Not a power of two

There is a texture named X whose width and height are not powers of 2 (2, 4, 8, 16, 32 etc.).

To fix that, use one of the following texture dimensions in pixels:

  • 16×16
  • 32×32
  • 64×64
  • 128×128
  • 256×256
  • 512×512
  • 1024×1024

Invalid texture X - Colour type RGBA but A is not required

There is a texture named X that contains an alpha channel (32-bit) but you are trying to load it as a non-alpha texture (24-bit).

You want a texture with transparency

  • Save the PNG file as a 32-bit image (including the alpha channel)
  • The file name must end with _ALP, for example TextureName_ALP.png
  • In modeller in cutout mode, the cutouts that use this texture page must have the material property "Alpha type" set to "Alpha".

You want a texture without transparency

  • Save the PNG file as a 24-bit image (without the alpha channel)
  • The file name must not end with _ALP, for example TextureName.png
  • In Modeller in cutout mode, the cutouts that use this texture page must have the material property "Alpha type" set to "Solid".

NOTE: In the current public version of LFS, the alpha channel (just like the R, G, B channels, it is a number on each pixel from 0 to 255) is only used for transparency (actually 'opacity' - higher alpha means less transparent). In fact alpha channels can be used for various purposes, for example in the development version of LFS it can be used to specify the reflectivity of each point on a texture page.

Total png texture area limit of 5 megapixels exceeded by X megapixels

The area of a texture is the number of pixels it contains (the with times the height). For example, a 1024 × 1024 texture has an area of 1048576 pixels, which is about 1.04 megapixels.

In order to stay within the 5 megapixel limit, try to place use as much area of the texture as possible and do not use big textures if not necessary.

To check the current total texture area, open Vehicle Editor, go to Textures and click calculate combined texture area.

A subobject has a 'skin' texture page but no skins are listed in Colours

In Vehicle Editor, at the bottom right under default colours, select one of the default colours, then go to the Colours tab and select a skin in the Skin File Name section.

Mod submission

Skin ID is not suitable for upload - you need a Skin ID from LFS.net

To be able to upload a mod, it must be assigned a unique Skin ID. The Skin ID is generated automatically for each mod. To get the Skin ID, go to the Vehicle mods page and click Submit a vehicle mod, which will lead you to the vehicle submission page. After you provide a unique name for the mod and the submission has been created, you will receive a unique Skin ID that you must enter in the LFS Vehicle Editor at the top left.