• Welcome, Guest. Please login.
 
November 09, 2025, 10:50:17 PM

News:

MX Bikes beta19 available! :)


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - PiBoSo

1
Other / Conversion tools
November 13, 2021, 12:06:33 AM
The conversion tools have been moved to a separate download: https://www.mx-bikes.com/?page=downloads

Changelog
fbx2edf:
- added support for skinned models
- added support for animations
2
Documentation / Undocumented features
May 08, 2021, 10:14:09 PM
- Pressing the ESC key goes back to the previous page.

- Pressing the ESC key when a dialog is open is equivalent to clicking on the "Close" / "Cancel" / "No" button.

- Pressing the Enter key when a dialog is open is equivalent to clicking on the "Yes" button ( or "Return to Pit" when the on-track dialog is open ).

- When an editbox is active, it is possible to copy text from the clipboad pressing Left Ctrl + V
3
Documentation / Chat commands
May 08, 2021, 10:10:48 PM
In the chat, it is possible to send a private message typing '@' followed by the client's name ( or #race number), followed by the message.
For example, to send a private "Hello" to Adam with race number 7 you can type:
@A Hello
@Adam Hello
@#7 Hello
4
Documentation / Client Port
January 01, 2021, 10:51:42 PM
It is possible to change the port used when connecting to a server, using the "-clientport" launch parameter:
mxbikes.exe -clientport (port)
For example:
mxbikes.exe -clientport 54211
The default port is 54210

This option can be useful, for example, when multiple PCs on a local network need to connect to the same server.
5
Bikes / Bike registration
October 31, 2020, 07:43:40 PM
Starting with MX Bikes beta15, it is possible to register bikes to have best laps and other statistics recorded.

1) Enable physics debug mode: http://forum.mx-bikes.com/index.php?topic=1383.0

2a) The bike folder must be unpacked, not a PKZ file.
2b) While on track in testing mode, press Left Ctrl + B to generate a new "registration.bin" file ( in the bike folder ) and a code.
2c) The bike ID ( the bike folder name ) and code should be saved in the "bike.txt" file in the MX Bikes installation directory.
2d) Please save the code to a safe place, so it can be used for updates.

3) Register the bike at http://stats.mx-bikes.com/bikereg.php
"Prev. Bike Code" is only used to update the data and must be left empty when registering the bike for the first time.

4) Finalize the registration completing at least a lap on a "World" server or dedicated server.

5) Pack the mod for release, making sure to include the "registration.bin" file.

6a) If any of the elements of the bike ( tyres, rider ) is changed, then the registration must be updated, using the old code.
6b) If the name or category need to be changed, it is possible to re-use the same code in "Prev. Bike Code", without the need to generate a new one ( steps 1 and 2 ) and re-release the mod ( step 5 ).
6
Documentation / Remote Admin
October 27, 2020, 04:46:37 PM
It is possible to connect to a dedicated server to send admin commands.
The feature is off by default and must be enabled:
http://forum.mx-bikes.com/index.php?topic=197.0
Only 1 client can connect to the server.

Communication is made with UDP sockets and strings terminated with "\n".

Send "CONNECT" followed by the connection password ( empty string if no password ).
Reply:
OK -> connected
FULL -> another client is already connected
WRONGPASSWORD -> wrong password

Data format is "CMD" followed by an incremental message ID and then the command.
The possible commands are:
"QUIT": closes the server
"MSG": followed by the chat message, that also allows to send commands ( see the dedicated server documentation for more info: http://forum.mx-bikes.com/index.php?topic=197.0 )

The server will send an ACK followed by the message ID for each CMD received.

Send "KEEPALIVE" every 15 seconds to keep the connection active.
The server sends "ALIVE" to report that the connection is active.

Send "DISCONNECT" to correctly close the connection.


Example source code can be downloaded at this link: http://www.kartracing-pro.com/downloads/remoteadmin.c
7
Physics / Rear suspension geometry
April 17, 2020, 04:47:29 PM
MX Bikes supports 6 types of rear suspension geometry.

There are 3 main categories:
1) "Classic". The shock is linked to the chassis and swingarm directly.
Examples: Ducati Monster, KTM 450 EXC, vintage bikes.

2) Linkage suspension. There are two additional elements: rocker and rod.
Example:

The rocker is blue, the rod red.

2a) "Linkage Rocker Chassis". The shock is linked to the chassis and the rocker to the chassis.
Examples: Ducati Panigale V2, Kawasaki Uni-Trak.

2b) "Linkage Rod Chassis". The shock is linked to the chassis and the rod to the chassis.
Example: Honda Pro-Link, stock MSM bikes.

2c) "Linkage Rocker Swingarm". The shock is linked to the swingarm and the rocker to the chassis.
Examples: Ducati Desmosedici, Suzuki Full Floater.

2d) "Linkage Rod Swingarm". The shock is linked to the swingarm and the rod to the chassis.
Example: Honda Unit Pro-Link.

3) "Hardtail". There is no suspension and the rear wheel is connected directly to the chassis.
Example: speedway bike.
8
Physics / Front Suspension Geometry
April 17, 2020, 04:41:48 PM
MX Bikes supports 4 types of front suspension geometry.

1) "Telescopic". Used on almost all racing bikes.

2) "Push Arm". The front wheel is attached to an arm, with the pivot behind.
Example: speedway bike.

3) "Trail Arm". Same as push arm, but the pivot is in front of the wheel.
Example: Vespa.

4) "Rigid". There is no suspension and the front wheel is connected directly to the steer.
Probably only used on minibikes.
9
Bikes / Chain animation
July 10, 2019, 11:41:57 AM
How to link the chain to the front sprocket:

1. Open the file gfx.cfg and go to ( or create ) the "chain" section ( there should be two, one for full model and one for the cockpit )

2. Make sure that "name" matches the object name in the model

3. Open the bike in the Bike Editor: http://forum.mx-bikes.com/index.php?topic=974.0

4. Drag "Chain Link" over "FSprocket"

5. Copy the "Pos" and "Rot" values in the gfx.cfg file

6. Please make sure that the chain LODs, if present, use the same object name and pivot position and rotation as the top LOD


Please note that it is also possible to add a blur texture.
10
Documentation / Windows desktop scaling
September 23, 2018, 05:22:04 PM
If the Windows scaling is set to a value over 100% then MX Bikes will start at a lower resolution to compensate for the automatic scaling.

To solve the issue and use the full resolution: right-click on the MX Bikes icon -> Properties -> Compatibility

Then, on Windows 10:
Click on Change high DPI settings -> "Override high DPI scaling behavior. Scaling performed by:"
Select "Application"

On Windows 7/8 instead:
Click on "Disable display scaling on high DPI settings"
11
Physics / Alta conversion
September 04, 2018, 10:35:12 PM
Steps to convert the Alta to make use of Beta9 electric engine support.

1. open the file MX2OEM_2018_Alta_Redshift_MXR.cfg

2. go to the "engine" section.
2a. add
electric = 1
This tells the physics that there is no fuel tank, no idle and no engine stall.
2b. the "stall" section is still used to make sure that engine braking goes down to zero at zero rpm.  Example:

stall
{
RPM = 500
torque = 0.1
}

2c. "IdleThrottle", "IdleRPM", "FuelRatio", "shiftRPM" can be removed.
2d. the "Clutch" section must be removed to tell the physics that the engine is direct drive.
2e. the real engine primary ratio, "Ratio0", is actually 19, 67  :P

3. remove the "fueltank" section, and replace it with:

batterypack
{
Capacity = 5.8
}


4. remove the "gearbox", "autoclutch" and "shifthelp" sections.

5. go to the "driveline" section.
5a. delete "SecondAxisInertia".

6. "data" in "tyres" is not used anymore.

7. save and close the file.

8. open the file sfx.cfg

9. the "starter" and "gearbox" sections can be removed.

10. save and close the file.

11. all done, but you can also delete the files "engine.wav", "p_mx.cfg", "p_mx_f_midsoft.tyre" and "p_mx_r_midsoft.tyre", because they are unused.
12
Plugins / UDP Proxy
July 18, 2018, 05:43:59 PM
Starting with Beta8, MX Bikes integrates a plugin that allows to receive UDP data from the simulated bike in realtime.

To enable it and set the parameters, edit the file "proxy_udp.ini" in the MX Bikes installation folder:

[params]
enable = 1
port = 30000
ip = 127.0.0.1:30001
delay = 1


port: outbound port
ip: inbound address and, optional, port ( if missing, the outbound port is used )
delay: hundredths of second between packets

The packet format:
"data": null-terminated string
"state": integer. 0: software running; 1: on-track, simulation paused; 2: on-track, simulation running
"time": integer, milliseconds
The rest of the packet follows the "SPluginsBikeData_t" structure of the plugins interface: http://www.mx-bikes.com/downloads/mxb_example.c


In the proxy_udp.ini file, add the line

info = 1

to enable the streaming of the event, session, lap and split data.

Data format of the event packet, sent every second:
"evnt": null-terminated string
The rest of the packet follows the "SPluginsEventData_t" structure of the plugins interface.

Data format of the session packet, sent every second:
"sesn": null-terminated string
The rest of the packet follows the "SPluginsBikeSession_t" structure of the plugins interface.

Data format of the lap packet, sent five times a second:
"lap ": null-terminated string
The rest of the packet follows the "SPluginsBikeLap_t" structure of the plugins interface.

Data format of the split packet, sent five times a second:
"splt": null-terminated string
"split": integer. 0: the latest line crossed is the start / finish one; 1: the latest line crossed is a split one
The rest of the packet follows the "SPluginsBikeSplit_t" structure of the plugins interface.
13
Other / Rider model templates
November 21, 2017, 01:17:01 PM
RIDER TEMPLATE FILES
http://www.mx-bikes.com/downloads/mxb_rider_templates.zip


When importing the skeleton FBX file in 3dsmax, please make sure to not convert the bones to dummy.

The boots template shows how to use script files to export all LODs in a single EDF file, saving disk space.

  • The script file for each model must be set in the editbox, on the second line, of the FBX2EDF program.
  • Please make sure to edit the INI files to change (User_Name) to your Windows user name
  • Please note that in the template a single model has been used for all LODs and for the shadow. However, for a proper release, each LOD should have roughtly half the triangles of the previous one, and the shadow should use a dedicated model without the innner details and with no textures

CONVERSION TOOLS
http://www.kartracing-pro.com/downloads/ct.zip


When exporting the FBX file from Blender, please make sure that the Primary Bone Axis is set to "X Axis" and the Secondary Bone Axis is set to "-Z Axis".
14
Bikes / IK Links Debug Mode
November 05, 2017, 02:21:02 PM
Inverse kinematic is used to animate the chain and to link the rider hands to the handlebars.

To show the link points ( cyan ) and the targets ( magenta ), edit the file global.ini ( by default generated in "My Documents"/PiBoSo/MX Bikes/ ) and add:
[debug]
links = 1
15
Track Editing / Default Deformation
November 05, 2017, 12:45:32 AM
There is a little feature that could be useful.

1) Open the file global.ini ( by default generated in "My Documents"/PiBoSo/MX Bikes/ ) and add the following lines:
[edit]
deformation=1
2) Ride several laps in testing mode on a track to create the deformation ( it's possible to use deformation_multiplier to generate it faster )
3) Press left ctrl + d: a file named temp.dfm will be saved in the MXB installation folder
4) Rename temp.dfm to track_id.dfm ( for example: practice.dfm - or practice_short.dfm for the short layout ) and move it to the proper track folder, with the matching TRH file
5) MXB should automatically read the dfm file at track load time
16
Documentation / VR Support
November 04, 2017, 10:44:31 PM
When installing MX Bikes a desktop shortcut named "MX Bikes - VR" should be created.
It launches MXB with the "-vr" command line switch, that enables VR support.

If both a Rift and a Vive are installed on the same PC, it's possible to force Oculus using the "-vro" switch, and SteamVR using "-vrs".

In MX Bikes -> Settings -> Input3 it's possible to set the control to reset the VR camera tracking. The default key is F8. It resets the position and rotation of the user interface virtual screen, too.

It is possible to change the Oculus pixel density, creating a text file called oculus.ini in the MXB installation folder and adding the following lines:
[render]
pixel_density=1.5

By default, the rendering of both eyes is mirrored to the MXB window.
It is possible to change the mirroring setting creating a text file called oculus.ini or openvr.ini in the MXB installation folder and adding the following lines:
[mirror]
eye = 2
The possible values are:
-1: mirroring disabled
0: left eye
1: right eye
2: both eyes

On Oculus only, it is also possible to add, under the "mirror" section
post = 1
to show the barrel distorted render in the desktop window.

For SteamVR only, it is possible to add to the openvr.ini file
[ipd]
scale = 0.9
to modify the IPD, changing the world scale.

Note: If the Windows Taskbar overlaps the MXB window preventing the cursor from reaching the bottom of the user interface, please try right clicking on the shortcut icon and, in the Properties, selecting Run Maximized.


Known Bugs
- HTC Vive ( SteamVR ): transparent asphalt in the user interface
17
Documentation / Extract data from installer
July 23, 2017, 11:19:56 PM
If you don't like installers or if you need to access the original data ( maybe to replace corrupted files ), it is possible to extract data from the installer.
Run the installer adding "-extract" to the command line.
18
Documentation / Disable joystick input
July 23, 2017, 10:38:04 PM
It is possible to disable an input of a joystick.
This could be useful, for example, to disable a broken potentiometer that is outputting noise.

The file joysticks.cfg is automatically read at startup.
It is possible to add multiple joysticks: "name" is the name of the joystick as it appears in the "Calibration" page of MX Bikes.
The names of the inputs are the same of the calibration page:

x, y, z, rx, ry, rz
slider1, slider2
pov1 to pov4
button1 to button32


The default joysticks.cfg disables the buttons linked to the triggers of the PS4 pad, so that it is possible to assign them as analog inputs.
19
Documentation / Direct connection
March 17, 2017, 11:31:07 AM

To directly connect to a server, launch mxbikes.exe with the following params:

mxbikes.exe -directconnect (ip address):(port)


for example:

mxbikes.exe -directconnect 127.0.0.1:10411