Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the start of my plans to add a general-purpose vehicle standard into OMI's glTF extensions.
Preview: https://github.com/aaronfranke/gltf-extensions/tree/OMI_vehicle/extensions/2.0/OMI_vehicle_body (and see also the OMI_vehicle_wheel and OMI_vehicle_thruster folders).
Proof of concept Godot implementation: omigroup/omi-godot#11
OMI_vehicle_body is the base type, the properties here are vehicle-wide and highly generalized. For example, while a car would have steering left and right for its only angular control, OMI_vehicle_body defines a Vector3 for angular activation, where a car's steering would be represented as rotation around the Y axis (ZX plane). The other angular directions may be used for other types of vehicles, such as aircraft and spacecraft pitch/roll. Similarly, the linear activation is defined as a Vector3, whereas a car would just use the Z direction for forward/backward.
OMI_vehicle_body also defines gyroscope torque, maximum speed, and several properties for how vehicles should be controlled, such as dampeners, throttle, and most importantly the pilot seat. The pilot seat refers to a glTF node with the OMI_seat extension, and the player sitting in this seat should control the vehicle.
OMI_vehicle_wheel is designed for things like cars and aircraft landing gear. It defines the maximum force, steering angle, and variables to control the current activation ratios of those. Note that many driving games define engine force and steering vehicle-wide, while OMI_vehicle_wheel defines these on the wheel. This is to allow for asset authors to have full freedom in designing vehicles, and compatibility with games like Space Engineers which only define per-wheel properties. Also, many driving games use properties like wheel count and axle width, but this would prevent custom configurations such as the Reliant Robin, so OMI_vehicle_wheel allows any amount of wheels in any position using glTF node positions.
OMI_vehicle_wheel also defines a radius, width, physics material, and 4 different suspension properties including damping, stiffness, and travel. For the physics material, this depends on #226, because physics materials still need to be added to the OMI_physics_body extension.
OMI_vehicle_thruster can be used for vehicles such as aircraft, spacecraft, rockets, and more. It defines force and gimbal, including the maximum, and variables for the current activation ratio. For both wheels and thrusters, the current activation ratio is exposed, allowing wheels and thrusters to optionally be used independently of OMI_vehicle_body, making all three extensions technically independent. For example, someone may choose to attach an OMI_vehicle_thruster to a non-vehicle dynamic rigid body node, and script custom input with a KHR_interactivity script, for a result such as this https://www.youtube.com/watch?v=qsdhFXUD8nA&t=150s
The OMI_vehicle_body folder also has a Markdown file called
mappings.md
that defines how these properties correspond to properties in various games, game engines, and platforms. This document needs to be expanded as we do more research into vehicle systems, and discoveries made as part of that research will help refine the standard.