Difference between revisions of "LFS Editor/Modeller"

From LFS Manual
Jump to navigationJump to search
(Copied verbatim from https://www.lfs.net/ed_man/modeller.htm)
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Live for Speed Modeller =
+
{{Infobox vehicle mods}}
 +
{{Under construction}}
  
<br />
+
The Modeller is a part of the [[LFS Editor]]. It is used to edit the 3D model, which includes editing the mesh and applying textures.
  
 +
For user guides and walkthroughs for various modeller features, see [[Modeller Guides]].
  
This is not intended as a complete manual. It's more like an incomplete FAQ and reference document.
+
[[image:LFS Editor welcome screen.jpg|thumb|LFS Editor entry screen]]
 +
[[image:LFS Modeller - start screen.png|thumb|Modeller start screen - standalone mode]]
 +
[[image:LFS vehicle editor showcase.jpg|thumb|Modeller with a car loaded through [[Vehicle Editor]]]]
  
To learn the basics of the LFS modeller, please watch the mods tutorial videos.
+
== Requirements ==
  
<br />
+
To be able to use the modeller, you must have an S3 license. To get the S3 license, you can visit the [https://www.lfs.net/shop/licenseselect LFS shop page].
  
 +
== Starting the modeller ==
  
'''Background images'''
+
First, follow the [[LFS Editor#Downloading|instructions]] how to download and install the [[LFS Editor]].
  
You can load background images to help with modelling.
+
Once you have the editor installed and run the LFS Editor application, you will be presented with the entry screen. Click the {{button|Modeller}} button to enter the Modeller.
  
* Save a square png image (probably 1024x1024 or 2048x2048) in your data\bkg folder
+
The modeller can also be entered from the [[Vehicle Editor]] by pressing {{key press|E}} or clicking the {{old button|E - Edit Model|#a1a1ff}} button on the right hand side of the vehicle editor.
* Go into a 2D view (R/F/V etc)
 
* At the bottom right click &quot;load bkg&quot; to load your image
 
* Click &quot;adjust&quot; then use the mouse to adjust the position and size
 
* After clicking &quot;adjust&quot; you can also click &quot;bkg scale&quot; to type in the scale
 
* Repeat the steps above for any of the other main 2D views
 
* Then click &quot;save scm&quot; which saves the whole scheme of adjusted backgrounds so you can easily load it next time
 
* The &quot;use opposite&quot; option: for example on the left side it will use the right side image and position, automatically flipped
 
  
<br />
+
== General modeller tips ==
  
 +
* The list of colours at the bottom left in 'tri' mode is a different view of the list of mappings in 'map' mode.
 +
* When you select a triangle, its colour is selected in the bottom left list. If the list is long, click {{old button|cols : X|#ffffa1}} to bring the selected colour onto screen.
 +
* In 'subob' mode you can select a subobject with {{key press|Ctrl|click}} while pointing at one of its surfaces.
 +
* In 'tri' mode, {{key press|Ctrl|click}} adds or removes triangles from the selection. {{key press|Alt|click}} starts a new selection (one triangle).
 +
* In the special view modes (like groups or mappings) the group select feature ({{key press|Ctrl|Shift|click}}) does a flood select within the group.
 +
* Press {{key press|Shift|F}} to temporarily hide the editor buttons.
 +
* To reduce clutter, use {{old button|hide selected|#ffffa1}} to temporarily hide points and triangles, then {{old button|unhide all|#a1ffa1}} to show the again.
 +
 +
== User interface ==
 +
 +
When you open the Modeller, the user interface looks as follows:
  
'''Customisable colours'''
+
[[File:LFS Editor modeller user interface.jpg]]
  
You can set colours to be adjustable, when a user enters the garage screen and clicks &quot;New colours&quot;.
+
The interface consists of the following parts:
  
This is done by giving some of the mappings a special name. Each mapping has a colour, but sometimes you want several mappings to have the same colour. For example the top and side mappings of a car. You can define a &quot;Main&quot; colour and &quot;Copied&quot; colours. So for example you could set top mapping to be a Main colour, then assign the side, front and rear mappings to be Copied colours of the top. Main colours are identified by the letter M followed by a number, while copied colours are identified by the letter C followed by the same number.
+
# 3D model view
 +
# [[#Editing modes|editing mode selector]]
 +
# [[#Editing modes|editing mode specific controls]]
 +
# [[#Load / save object|load / save object]]
 +
# [[#View modes|view modes]] & [[#View options|view options]]
 +
# [[LFS Editor User Interface#View controls|common editor view controls]]
  
Taking the example above, you could name your mappings (colours) like this:
+
== Vehicle model structure ==
  
<pre>    M1_top
+
Modeller uses 3D meshes to represent the vehicle model in 3D space. All meshes are built from three basic structures - points, edges and triangles.
    C1_side
 
    C1_front
 
    C1_rear</pre>
 
As soon as you set the names this way, you will notice the C1 colours aren't adjustable in the modeller. You can adjust the M1 colour and all the C1 colours will take the same value. Also this colour is now adjustable by the user, in the settings block. You can see that in the vehicle editor in the Colours section.
 
  
You can allow more than one customisable colour group, as seen on some of the LFS cars. This is done by creating M2 / C2 colours, up to a maximum of 4 customisable colours.
+
[[Image:LFS editor mesh parts.jpg]]
  
Note 1: You can use copied colours without them being adjustable by users. Use higher values than 4. E.g. M5_original and C5_copy.
+
=== Points ===
  
Note 2: Customisable colours are also available for subobjects. To use this feature, select the subobject and switch on &quot;use custom colours&quot;
+
The most elementary part of a 3D model is the point (also referred to as a vertex) which is a single point in 3D space. Points are represented in the 3D viewport in [[#Point|point mode]] as small square buttons.
  
Advanced: You can also create a darker copy of the main colour, by using the prefix 'D' for dark or 'E' for extra dark. This can be useful to fake reduced ambient lighting if you are adding surfaces in a place where there should be less light. For example:
+
=== Edges ===
  
<pre>    M1_main - the user can set this colour
+
An edge always connects two points by a straight line. They are used to construct triangles. Edges are represented in 3D viewport in [[#Tri|tri]] and [[#Point|point]] modes as thin lines.
    C1_copy - direct copy of M1_main
 
    D1_dark - darker copy of M1_main
 
    E1_extra - extra dark copy of M1_main</pre>
 
<br />
 
  
 +
=== Triangles ===
  
'''Modeller tips'''
+
Triangles (often abbreviated to tris) are used to build the actual surface of the object. They are what you see when you render the mesh. If this area does not contain a face, it will simply be transparent or nonexistent in the actual model.
  
* The list of colours at the bottom left in 'tri' mode is a different view of the list of mappings in 'map' mode.
+
A triangle is defined as the area between three points, with an edge on every side.
* When you select a triangle, its colour is selected in the bottom left list. If the list is long, click &quot;cols : X&quot; to bring the selected colour onto screen.
 
* In 'subob' mode you can select a subobject with CTRL + click while pointing at one of its surfaces.
 
* In 'tri' mode, CTRL + click adds or removes triangles from the selection. ALT + click starts a new selection (one triangle).
 
* In the special view modes (like groups or mappings) the group select feature (CTRL + SHIFT + click) does a flood select within the group.
 
* Press SHIFT+F to temporarily hide the editor buttons.
 
* To reduce clutter, use 'hide selected' to temporarily hide points and triangles, then 'unhide all' to show the again.
 
  
<br />
+
== Object types ==
  
 +
The vehicle model consists of a main object and optionally one or more subobjects.
  
'''Light colours: headlights, indicators, etc.'''
+
=== Main object ===
  
All light mappings have a name with prefix &quot;l_&quot;
+
This is usually the vehicle body, excluding small independent parts or special objects like the steering wheel, wipers etc.
  
The cutouts for all light mappings must share a single texture page.
+
=== Subobject ===
  
The special names for light mappings are:
+
Subobjects are standalone 3D models belonging to the vehicle model. They can be loaded or saved independently of the main object.
  
<pre>    l_brk - brake (main mapping of brake light)
+
There are several types of subobjects that can be created, such as steering wheel, internal mirror, brakes, mudguards, wings and other attachments.
    l_sbrk - side brake (e.g. side of a curved brake light)
 
    l_tbrk - top brake (e.g. top of a curved brake light)
 
    l_cbrk - centre brake (e.g. brake light in rear window)
 
    l_head - headlight (main headlights)
 
    l_side - side light (smaller lights near headlights)
 
    l_tail - tail light (red rear lights)
 
    l_stail - side tail light (e.g. side of a curved tail light)
 
    l_ttail - top tail light (e.g. top of a curved tail light)
 
    l_rind - rear indicator
 
    l_find - front indicator
 
    l_rsind - rear side indicator
 
    l_fsind - front side indicator
 
    l_rfog - rear fog light
 
    l_ffog - front fog light
 
    l_rev - reversing light</pre>
 
  
<br />
+
See [[#Subob|subob editing mode]] for more information about working with subobjects.
  
 +
== Load / save object ==
  
'''Level of detail (LOD) and Shadow / Physics / Collision meshes'''
+
{{see also|LFS Editor Guides#Loading a model}}
  
When you first start work on a mod, you can test it in LFS with only a single level of detail. That is the main graphical LOD, known as LOD1. But your mod cannot be uploaded to the website like that. It needs at least a physics or collision mesh, and finished mods should usually have a shadow mesh too.
+
At the bottom left of the screen, there is a set of buttons used to load or save an object in the Modeller.
  
There are two possible LOD choices for a mod you upload to the website.
+
[[image:Modeller load and save objects.jpg]]
  
<u>Work in progress / test mod - 2 levels of detail</u>
+
If you have an subobject selected, another row of buttons appears, allowing you to load or save the current subobject.
  
LOD1: The main graphical LOD<br />
+
{| class="wikitable"
LOD2: The low resolution physics / collision mesh<br />
+
|+ Load / save object buttons
<br />
+
|-
In this case, the collision mesh doubles as the shadow casting mesh. For most models this approximation is too crude, because the collision mesh is very limited in the number of points and triangles. But it's fine for early testing.
+
| {{old button|subobject}} || Indicates that a subobject is currently selected
 +
|-
 +
| {{old button|load|#a1ffa1}} || Load a new subobject, replacing the selected subobject
 +
|-
 +
| {{old button|save|#a1ffa1}} || Save the current subobject as an object in data\3dob
 +
|-
 +
| {{old button|main object}} || The name of the main object
 +
|-
 +
| {{old button|LOAD|#00ff00}} || Load a new object from data\3dob
 +
|-
 +
| {{old button|SAVE|#00ff00}} || Load the main object to data\3dob
 +
|-
 +
| {{old button|skin}}{{old button|XFG_DEFAULT}} || Click the skin name (e.g. XFG_DEFAULT) to select a JPG image in data\skins to use as a skin in the editor
 +
|-
 +
| {{old button|OBJ|#ffffa1}} || Load an OBJ file from data\obj
 +
|-
 +
|}
  
<u>Completed mods usually have 3 levels of detail</u>
+
== View modes ==
  
LOD1: The main graphical LOD<br />
+
In the bottom right part of the screen, you can choose different view modes of the model:
LOD2: The shadow and distance view mesh<br />
 
LOD3: The low resolution physics / collision mesh<br />
 
<br />
 
In this case, LOD2 is drawn when the mod is in the middle distance. This saves the graphics card doing a lot of work drawing detail that you can't see and helps with frame rate. This LOD should be a good representation of the shape of your mod, so it looks good in the distance, and casts a good looking shadow. LOD3 is only used as a visual representation when the mod is very far away. Its main purpose is for collisions with other vehicles or when your mod hits a wall or rolls over.
 
  
<u>How to add an automatically created physics / collision mesh</u>
+
[[image:LFS_Editor_Modeller_view_modes.jpg|Modeller view modes]]
  
* In the modeller, click the + (plus) button to the right of lod1 (near the top left) to add a new LOD
+
=== Layers ===
* Now select lod2 or lod3 (the newly created, empty LOD)
 
* Click &quot;auto-create collision mesh&quot;
 
  
The automatically created collision mesh is created based on the size of the existing LOD1 (high detail) mesh. This should provide basic collision physics but you will probably want to improve the shape to make it a better match for your vehicle.
+
[[Image:LFS Editor Modeller layers mode.jpg|thumb|Layers]]
  
<br />
+
Each colour represents triangles assigned to a particular layer. You can toggle layers on/off by clicking the layer buttons in the top left part of the screen.
  
 +
{{Clear}}
  
'''Draw order of materials'''
+
=== Wire ===
  
You can see a material list in the vehicle editor &quot;Class/Textures&quot; tab. That should represent the draw order of the materials.
+
[[Image:LFS Editor Modeller wire mode.jpg|thumb|Wireframe]]
  
To actually change the draw order of the materials, you adjust the draw order of the cutouts in the modeller. The draw order is assigned by the order the materials are first encountered in the cutout list. The material's index is the number on the right of the 'material' column in the list of cutouts.
+
Shows the edges as a wireframe. The edges can have different colours:
  
The idea is to make sure the material for the steel frame appears in the cutout list before the material for the cloth cover. For example if you selected a material with material index '2' and move it to the top of the list, then on reaching the top, it should acquire material index '1'. What was material 1 will become material 2.
+
* grey - two triangles share the edge. This is the normal condition for most edges in an object.
 +
* red - an unshared edge - only one triangle uses this edge.
 +
* cyan - three triangles share the edge.
 +
* orange - four triangles share the edge.
  
<br />
+
When you see an edge that is not grey, it may be intentional or it may draw your attention to a bug in the model. There are reasons to have unshared edges or multiple shared edges in some cases. But if it is not intentional, it may indicate a modelling error such as:
  
 +
* A double built triangle - this would appear as a cyan triangle where you expect grey triangles.
 +
* A triangle connected to the wrong vertex - could cause unshared edges.
  
'''Draw order of individual triangles'''
+
It's good to click wire mode occasionally and if you see edges that are not grey, make sure that you know the reason for them and that they are as intended.
  
Within materials, triangles are drawn in the order they appear in the internal list of triangles. LFS doesn't give you direct control over this list, but you can improve the draw order by clicking &quot;magic triangle sort&quot;. This function tries to adjust the draw order so that further away triangles are likely to be drawn first. This may be better than randomly ordered triangles, and may help with &quot;Z fight&quot; problems if the nearby surfaces share a material so you can't manually correct the draw order by ordering the materials.
+
{{Clear}}
  
<br />
+
=== Mappings ===
  
 +
[[Image:LFS Editor Modeller mappings view.jpg|thumb|Mappings]]
  
'''Creating a SKIN texture'''
+
Each colour represents a different mapping.
  
A skin is a special texture designed to cover the paintwork of your vehicle so that other people can create their own custom paint jobs. The idea is to uniquely cover the whole paint surface of the vehicle without any part of the texture being used more than once. As a mod creator you may take on the task of creating a default skin that people can modify to use when driving your mod. Here are a few tips for designing skins.
+
{{Clear}}
  
A skin must be created as 1024 or 2048 square image. To load it into LFS it must be saved as a JPG in your data\skins folder, with a name like ABC123_NAME.jpg where ABC123 is the Skin ID of your mod and NAME is a name for the texture (usually DEFAULT for a plain texture).
+
=== Flat ===
  
The artists who create custom skins prefer everything lined up as well as possible, so try to use the options &quot;link with SIDE&quot; / &quot;link with FRONT&quot; / &quot;link with BACK&quot; / &quot;link with TOP&quot; for the main mappings, so your mappings have the correct width.
+
[[Image:LFS Editor Modeller flat mode.jpg|thumb|Flat]]
  
You can type in the height of the mapping, to make sure front, back, side mappings have the same height. You can also type in the right, front, up values.
+
Flat shading of the triangles without being smoothed.
  
Try to keep the pixels of your mappings fairly square (cutout has a similar aspect ratio to the mapping). The squarer they are, the easier for your skin artists.
+
{{Clear}}
  
TIP: Not *everything* needs to be skinned from a proper direction. E.g. skin artists may be quite happy with a single mapping for a wing mirror, probably from the front, that goes right through the object (so the side and top surfaces are not individually mapped). Smaller mappings don't 'link' with any other mapping.
+
=== Groups ===
  
Skins on models with complex shapes may have the added complication of overlapped areas. So you should plan this in advance, where you want the MAIN top, front, side, back mappings and allow enough space for the overlapped areas to be mapped separately. You may wish to follow the general idea of one of our default skins, and change it to suit your needs.
+
[[Image:LFS Editor Modeller groups mode.jpg|thumb|Smoothing groups]]
  
You may find the &quot;copy screen shot&quot; function useful. It takes the correct size screenshot of the mesh for the selected mapping, and copies that to the clipboard so you can paste it into your work-in-progress skin in your 2D graphics software. Before using this function, use a white (or light grey) car colour, and move the lighting UP by using CTRL + left
+
{{see also|LFS Editor Guides#Smoothing groups}}
  
<br />
+
Smoothing groups. The boundaries between different smoothing groups usually have a sharp edge. All triangles within one smoothing group have artificial smoothing applied.
  
 +
When you switch to the groups view mode and select {{old button|tri}} mode, an additional set of buttons will be shown in the top right corner of the screen.
  
'''Importing from other 3D modelling software'''
+
[[Image:LFS Editor smoothing group tri mode.jpg|thumb|Groups mode in combination with tri mode]]
  
You can import the points and triangles from another 3D program by exporting an OBJ file and loading it into LFS from the data\obj folder. Texture mappings and materials are not imported.
+
Each smoothing group is represented by a number and a distinct colour.
  
How to export from Blender:
+
[[Image:LFS Editor smoothing group buttons.jpg|Smoothing group buttons]]
  
<u>Scale</u>
+
If needed, you can create new groups by clicking the {{old button|new group (N)|#ffffa1}} button, where N is the number of the group to be created.
  
LFS uses metres for units. If you use another unit, please export using an appropriate scale.
+
You can create up to 23 groups for the model.
  
<u>Position</u>
+
When you select a group which is not assigned to any triangles, a {{old button|delete|#EA927E}} button appears at the top, allowing you to delete unused groups:
  
Your model should be approximately centred over the origin and ideally the body should sit on the ground (without the correct ride height)
+
[[Image:LFS Editor smoothing group delete button.jpg|Delete group button]]
  
<u>Backface culling</u>
+
When you press and hold {{key press|Ctrl}}, the labels of the group buttons will say {{old button|all}}. If you click one of them, all triangles assigned to that group will be selected.
  
Live for Speed uses single sided triangles. While modelling in blender and before exporting, make sure you look at your model with back face culling enabled so you can be sure the surfaces are facing the right way.
+
[[Image:LFS Editor smoothing group all buttons.jpg|Select all buttons]]
  
<u>Export Settings - Export OBJ file</u>
+
=== Gouraud ===
  
Transform:<br />
+
[[Image:LFS Editor Modeller gouraud mode.jpg|thumb|Gouraud]]
- Y forward / Z up (so the model is oriented correctly in LFS)
 
  
Geometry:<br />
+
The default rendering of the model with [https://en.wikipedia.org/wiki/Gouraud_shading gouraud shading] applied. This is how the car should appear in game.
- Write normals (so LFS can work out smoothing groups)<br />
 
- Triangulate faces (as LFS geometry is based on triangles)
 
  
<br />
+
{{Clear}}
  
'''Extrude and Lathe functions'''
+
=== N.C.level ===
  
To use the extrude or lathe functions, first you select a series of points in order to create a cross section that you will either extrude linearly (extrude) or rotate around a point (lathe). You can see the cross section by enabling the 'trace' option in point mode, then selecting points in the correct order. It can sometimes be confusing which order to select the points, and then choose 'inside' or 'outside' to get the desired effect.
+
[[Image:LFS Editor Modeller NC level mode.jpg|thumb|Normal contribution levels]]
  
<u>Extrusion</u>
+
Normal contribution levels. Each triangle meeting at a vertex, within the same smoothing group, contributes to the [https://en.wikipedia.org/wiki/Normal_(geometry) normal] of that surface at that vertex. In fact, large triangles have a larger contribution. So for example you could make a simple "hardback book" shaped object and most of the apparent curvature would be on the spine of that book. But the spine would still be contributing to the normals, so the front and back faces of the "book" would still be a little curved. If, however, you set the normal contribution level" of the spine to zero, then the spine would not contribute to the normals at all. Then the front and back face of the book would look totally flat.
  
* Put your viewpoint on the side so that you will pull the extrusion towards you
+
{{Clear}}
* Select the trace points in anti-clockwise direction as seen from that point
 
* Create extrusion by clicking 'extrude' (and select outside, inside, etc.)
 
* Pull the points towards you
 
  
Then you should find that your inside / outside request is respected.
+
=== L.R.swap ===
  
<u>Lathe</u>
+
[[Image:LFS Editor Modeller L.R. swap mode.jpg|thumb|Left/right swap]]
  
* Put your view on the side where the lathe operation will initially head towards (at the start of the curve)
+
Driver swap modes. The triangles can have different colours:
* Select the trace points in anti-clockwise direction as seen from that point
 
* Rotation will take place around the last point you select (which may or may not be included as part of the cross-section)
 
* Go to 2D view and create lathe object by clicking 'lathe' (and select outside, inside, etc.)
 
  
<br />
+
* grey - applied to mirrored triangles, which do not have any swapping
 +
* blue (static) - do not change sides when driver side is swapped
 +
* red (swap) - change sides when driver side is swapped
  
 +
In this mode, you can set driver swap modes to triangles by going to the {{old button|tri|#c9c9c9}} mode, selecing one or more triangles and clicking one of the swap mode buttons in the top right corner.
  
'''Moving parts of a model to a different model'''
+
{{Clear}}
  
This is done by saving a subobject from one mesh and loading that subobject into another mesh. In 'subob' mode, with a subobject selected, you can see light green 'load' and 'save' buttons beside the word 'subobject' at the bottom left. These will load and save subobjects with the extension '.sre' in the folder data\3dob.
+
== Editing modes ==
  
But what if the parts you want to move are not part of a subobject? In this case you can use the 'break off' and 'merge' functions.
+
{{Under construction}}
  
* Create a new empty subobject
+
=== Subob ===
* Select the triangles in the main object that you want to move to another object
 
* Click the &quot;break off&quot; button
 
* The triangles (and mappings) are moved into the new subobject
 
* Save the subobject
 
* Load the mesh where you want to add the subobject
 
* Add a new, empty subobject to that mesh
 
* Load the saved subobject into your new empty subobject and move it to the right position
 
* Optionally, click &quot;merge into main&quot; to merge the new subobject into the main object
 
  
<br />
+
Subobject mode
'''Troubleshooting'''
 
  
<u>Invalid texture [texture name] - Colour type RGBA but A is not required</u>
+
=== Tri ===
  
This means that you have exported a texture that contains an alpha channel (32-bit) but you are trying to load it as a non-alpha texture (24-bit). If you do want to include an alpha channel, the texture name must end with the suffix _ALP.
+
Triangle mode
  
* 24-bit (RGB) textures should be named like this: TextureName.png
+
=== Point ===
* 32-bit (RGB+A) textures should be named like this: TextureName_ALP.png
 
  
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.
+
=== Build ===
  
<br />
+
=== Map ===
  
 +
=== Cutout ===
  
<u>ERROR in object X: N points with a bad normal</u>
+
=== Page ===
  
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.
+
=== View ===
  
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.
+
== View options ==
  
<br />
+
{{Under construction}}
  
 +
=== Show main ===
  
<u>Mod looks shiny in the editor but matt in game</u>
+
=== Show subobs ===
  
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).
+
=== Show wheels ===
  
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' section above.
+
=== Show hidden ===
  
<br />
+
=== Normals ===
  
 +
=== Test L.R.swap ===
  
[end]
+
=== Wire overlay ===

Revision as of 11:09, 30 December 2022

Vehicle Mods
Vehicle Mods at LFS.net
TemplateIconUnderConstruction.png This page or section is being initially created, or is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it.

The Modeller is a part of the LFS Editor. It is used to edit the 3D model, which includes editing the mesh and applying textures.

For user guides and walkthroughs for various modeller features, see Modeller Guides.

LFS Editor entry screen
Modeller start screen - standalone mode
Modeller with a car loaded through Vehicle Editor

Requirements

To be able to use the modeller, you must have an S3 license. To get the S3 license, you can visit the LFS shop page.

Starting the modeller

First, follow the instructions how to download and install the LFS Editor.

Once you have the editor installed and run the LFS Editor application, you will be presented with the entry screen. Click the Modeller button to enter the Modeller.

The modeller can also be entered from the Vehicle Editor by pressing E or clicking the E - Edit Model button on the right hand side of the vehicle editor.

General modeller tips

  • The list of colours at the bottom left in 'tri' mode is a different view of the list of mappings in 'map' mode.
  • When you select a triangle, its colour is selected in the bottom left list. If the list is long, click cols : X to bring the selected colour onto screen.
  • In 'subob' mode you can select a subobject with Ctrl + click while pointing at one of its surfaces.
  • In 'tri' mode, Ctrl + click adds or removes triangles from the selection. Alt + click starts a new selection (one triangle).
  • In the special view modes (like groups or mappings) the group select feature (Ctrl + ⇧ Shift + click) does a flood select within the group.
  • Press ⇧ Shift + F to temporarily hide the editor buttons.
  • To reduce clutter, use hide selected to temporarily hide points and triangles, then unhide all to show the again.

User interface

When you open the Modeller, the user interface looks as follows:

LFS Editor modeller user interface.jpg

The interface consists of the following parts:

  1. 3D model view
  2. editing mode selector
  3. editing mode specific controls
  4. load / save object
  5. view modes & view options
  6. common editor view controls

Vehicle model structure

Modeller uses 3D meshes to represent the vehicle model in 3D space. All meshes are built from three basic structures - points, edges and triangles.

LFS editor mesh parts.jpg

Points

The most elementary part of a 3D model is the point (also referred to as a vertex) which is a single point in 3D space. Points are represented in the 3D viewport in point mode as small square buttons.

Edges

An edge always connects two points by a straight line. They are used to construct triangles. Edges are represented in 3D viewport in tri and point modes as thin lines.

Triangles

Triangles (often abbreviated to tris) are used to build the actual surface of the object. They are what you see when you render the mesh. If this area does not contain a face, it will simply be transparent or nonexistent in the actual model.

A triangle is defined as the area between three points, with an edge on every side.

Object types

The vehicle model consists of a main object and optionally one or more subobjects.

Main object

This is usually the vehicle body, excluding small independent parts or special objects like the steering wheel, wipers etc.

Subobject

Subobjects are standalone 3D models belonging to the vehicle model. They can be loaded or saved independently of the main object.

There are several types of subobjects that can be created, such as steering wheel, internal mirror, brakes, mudguards, wings and other attachments.

See subob editing mode for more information about working with subobjects.

Load / save object

At the bottom left of the screen, there is a set of buttons used to load or save an object in the Modeller.

Modeller load and save objects.jpg

If you have an subobject selected, another row of buttons appears, allowing you to load or save the current subobject.

Load / save object buttons
subobject Indicates that a subobject is currently selected
load Load a new subobject, replacing the selected subobject
save Save the current subobject as an object in data\3dob
main object The name of the main object
LOAD Load a new object from data\3dob
SAVE Load the main object to data\3dob
skinXFG_DEFAULT Click the skin name (e.g. XFG_DEFAULT) to select a JPG image in data\skins to use as a skin in the editor
OBJ Load an OBJ file from data\obj

View modes

In the bottom right part of the screen, you can choose different view modes of the model:

Modeller view modes

Layers

Layers

Each colour represents triangles assigned to a particular layer. You can toggle layers on/off by clicking the layer buttons in the top left part of the screen.


Wire

Wireframe

Shows the edges as a wireframe. The edges can have different colours:

  • grey - two triangles share the edge. This is the normal condition for most edges in an object.
  • red - an unshared edge - only one triangle uses this edge.
  • cyan - three triangles share the edge.
  • orange - four triangles share the edge.

When you see an edge that is not grey, it may be intentional or it may draw your attention to a bug in the model. There are reasons to have unshared edges or multiple shared edges in some cases. But if it is not intentional, it may indicate a modelling error such as:

  • A double built triangle - this would appear as a cyan triangle where you expect grey triangles.
  • A triangle connected to the wrong vertex - could cause unshared edges.

It's good to click wire mode occasionally and if you see edges that are not grey, make sure that you know the reason for them and that they are as intended.


Mappings

Mappings

Each colour represents a different mapping.


Flat

Flat

Flat shading of the triangles without being smoothed.


Groups

Smoothing groups

Smoothing groups. The boundaries between different smoothing groups usually have a sharp edge. All triangles within one smoothing group have artificial smoothing applied.

When you switch to the groups view mode and select tri mode, an additional set of buttons will be shown in the top right corner of the screen.

Groups mode in combination with tri mode

Each smoothing group is represented by a number and a distinct colour.

Smoothing group buttons

If needed, you can create new groups by clicking the new group (N) button, where N is the number of the group to be created.

You can create up to 23 groups for the model.

When you select a group which is not assigned to any triangles, a delete button appears at the top, allowing you to delete unused groups:

Delete group button

When you press and hold Ctrl, the labels of the group buttons will say all. If you click one of them, all triangles assigned to that group will be selected.

Select all buttons

Gouraud

Gouraud

The default rendering of the model with gouraud shading applied. This is how the car should appear in game.


N.C.level

Normal contribution levels

Normal contribution levels. Each triangle meeting at a vertex, within the same smoothing group, contributes to the normal of that surface at that vertex. In fact, large triangles have a larger contribution. So for example you could make a simple "hardback book" shaped object and most of the apparent curvature would be on the spine of that book. But the spine would still be contributing to the normals, so the front and back faces of the "book" would still be a little curved. If, however, you set the normal contribution level" of the spine to zero, then the spine would not contribute to the normals at all. Then the front and back face of the book would look totally flat.


L.R.swap

Left/right swap

Driver swap modes. The triangles can have different colours:

  • grey - applied to mirrored triangles, which do not have any swapping
  • blue (static) - do not change sides when driver side is swapped
  • red (swap) - change sides when driver side is swapped

In this mode, you can set driver swap modes to triangles by going to the tri mode, selecing one or more triangles and clicking one of the swap mode buttons in the top right corner.


Editing modes

TemplateIconUnderConstruction.png This page or section is being initially created, or is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it.

Subob

Subobject mode

Tri

Triangle mode

Point

Build

Map

Cutout

Page

View

View options

TemplateIconUnderConstruction.png This page or section is being initially created, or is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it.

Show main

Show subobs

Show wheels

Show hidden

Normals

Test L.R.swap

Wire overlay