Difference between revisions of "CarWorks"
Line 9: | Line 9: | ||
==Creating a car shape file== | ==Creating a car shape file== | ||
− | The most useful way to work with this tool | + | The most useful way to work with this tool is to first produce a Wavefront OBJ file with a 3D shape editor such as Blender or Anim8or. CarWorks includes a material library file called ''stunts.mtl'' that can be used to simulate the colours as will be seen in the game. One should first create a shape and optionally, paint it in a way that's approximately what one would like. Names should be assigned to the materials used according to the ones present in the material library file provided. If names ''Stunts0'' to ''Stunts128'' are used, these will later be interpreted as static materials from 0 to 128 of Stunts internal material library. Names ''base1'' to ''base4'' can be used for shades of the same colour that are supposed to change with paint-jobs. So for blue, for example, ''base4'' will be the brightest blue and ''base1'', the darkest. |
+ | |||
+ | With the shape saved to OBJ, material names will be stored in the OBJ file. With Blender, a material library file with the same file name will be created. This can be discarded. The OBJ file can be edited and the line that begins with "''mtllib''" can be changed to "''mtllib stunts.mtl''". This will allow the shape editor (i.e.: Blender) to see the actual appearance of the shape if it is loaded again. CarWorks does not require this change to be made, though. It will ignore the new material library and always use Stunts materials based on the material names given. | ||
+ | |||
+ | In order to use this OBJ file in CarWorks, first you should load a 3SH file from another car using option 1. After than, option 2 (''Load object file'') can be used to load the OBJ shape. CarWorks will overwrite all vertices and primitives except the wheels, effectively borrowing these from the previously loaded car shape, as Blender and Anim8or cannot produce wheels. The shape will be scaled to generate the three chunks: car0, car1 and car2 automatically in memory. Debris will be borrowed from the loaded car too. This can easily be edited later with Stressed. | ||
+ | |||
+ | To produce working paint jobs, use option 6 (''Select paint jobs''). Use Tab, PgUp/PgDn, Enter and the arrow keys to configure the set of paint jobs you want the car to have. Then, return to the main menu. Option 5 (''Adjust wheels'') can be used to correctly align the wheels and also centre the car shape if you want to. | ||
+ | |||
+ | With all these done, use option 3 (''Save Stunts car shape'') to produce a 3SH file. Paint jobs will be automatically generated based on the ''base1'' to ''base4'' materials. | ||
[[Category:Tools]] | [[Category:Tools]] |
Revision as of 07:39, 4 March 2021
CarWorks is a tool developed by Cas with the purpose of aiding in custom car creation by providing some degree of automation to the process. Together with Dash Manager, it is part of a project that started in 2020 and as of March 2021 remains in a preliminary stage, albeit already being useful. A forum thread was started on 10 December 2020 in which the first versions were posted.
The interface is mostly text-based. Different uncompressed car files can be loaded and edited and then put together. It can load and save OBJ shape files that it automatically scales so that cars have a natural size in meters. It was originally intended to handle all of the car files, but at the current stage, it can do mainly two things: edit car parameters in a way that's more direct than with Car Blaster and generate a complete 3SH file for a car from an OBJ shape producing all three scales and borrowing wheels and debris from a pre-existing car. The car files can later be edited with Stressed, so it's optimal to use them together.
Editing car parameters
Upon entering the program, menu option 7 (Load Stunts car parameters) can be used to load a CAR*.RES file. Then, option 9 (Edit parameters) leads to a simple screen in which each parameter can be entered numerically. At the bottom, a graphical representation of the torque curve can be edited with the mouse pointer. After finishing, option 8 (Save Stunts car parameters) can be used to write the CAR*.RES file back. It's important to load a RES file before editing, as other existing data in the file will be kept, such as parameters that control the dashboard, which cannot be edited from here. If the RES file is written starting from an empty session, all these parameters will be set to zero, which can be harder to edit later.
CarWorks was made using the Stunts Wiki as a reference. The car parameters were at that time described relative to the beginning of the file instead of the beginning of the simd block (see Car parameters). For this reason, files with a different chunk ordering will not load correctly into CarWorks. The ordering can be changed in Stressed.
Creating a car shape file
The most useful way to work with this tool is to first produce a Wavefront OBJ file with a 3D shape editor such as Blender or Anim8or. CarWorks includes a material library file called stunts.mtl that can be used to simulate the colours as will be seen in the game. One should first create a shape and optionally, paint it in a way that's approximately what one would like. Names should be assigned to the materials used according to the ones present in the material library file provided. If names Stunts0 to Stunts128 are used, these will later be interpreted as static materials from 0 to 128 of Stunts internal material library. Names base1 to base4 can be used for shades of the same colour that are supposed to change with paint-jobs. So for blue, for example, base4 will be the brightest blue and base1, the darkest.
With the shape saved to OBJ, material names will be stored in the OBJ file. With Blender, a material library file with the same file name will be created. This can be discarded. The OBJ file can be edited and the line that begins with "mtllib" can be changed to "mtllib stunts.mtl". This will allow the shape editor (i.e.: Blender) to see the actual appearance of the shape if it is loaded again. CarWorks does not require this change to be made, though. It will ignore the new material library and always use Stunts materials based on the material names given.
In order to use this OBJ file in CarWorks, first you should load a 3SH file from another car using option 1. After than, option 2 (Load object file) can be used to load the OBJ shape. CarWorks will overwrite all vertices and primitives except the wheels, effectively borrowing these from the previously loaded car shape, as Blender and Anim8or cannot produce wheels. The shape will be scaled to generate the three chunks: car0, car1 and car2 automatically in memory. Debris will be borrowed from the loaded car too. This can easily be edited later with Stressed.
To produce working paint jobs, use option 6 (Select paint jobs). Use Tab, PgUp/PgDn, Enter and the arrow keys to configure the set of paint jobs you want the car to have. Then, return to the main menu. Option 5 (Adjust wheels) can be used to correctly align the wheels and also centre the car shape if you want to.
With all these done, use option 3 (Save Stunts car shape) to produce a 3SH file. Paint jobs will be automatically generated based on the base1 to base4 materials.