Making a Car

From VR Wiki
Revision as of 01:36, 30 September 2022 by N3X15 (talk | contribs) (Created page with "ChilloutVR allows one to make realistically-behaving vehicles as props. This is a guide will teach you how to produce a working vehicle using Realistic Car Controller. == Prerequisites == * Unity experience * Blender experience * A model to turn into a car * [https://assetstore.unity.com/packages/tools/physics/realistic-car-controller-16296 Realistic Car Controller] ($50 MSRP, goes on sale often) == Model Setup == This part of the guide is not going to be step-by-ste...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ChilloutVR allows one to make realistically-behaving vehicles as props. This is a guide will teach you how to produce a working vehicle using Realistic Car Controller.

Prerequisites

Model Setup

This part of the guide is not going to be step-by-step, because models can be complex and the changes between Blender versions and different modelling software can introduce vast changes in workflow. Instead, this guide will outline what your model needs to have in order to work properly with RCC.

  • Wheels must be separated into submeshes or armature bones. It's recommended to name them something like FrontLeft/FrontRight/BackLeft/BackRight, but any name will work.
  • Wheels must have their rotation axis aligned along the X axis, and the origin somewhere along the rotation axis.
  • At least four wheels are required.
  • Steering Wheel is optional, rotation aligned along Z, with the up direction being -Z.
  • It's recommended to have separated seat meshes to use as interactable seat positions.
  • It's recommended to make a custom body collision mesh that does not include wheels or suspension.

Unity Editor Setup

Warning: It is HIGHLY RECOMMENDED to make a separate project for vehicles, as RCC requires a weird environment. While it can work with other props and avatars, some shaders and editor packages can throw errors in an RCC project due to input changes.

Creating the Project

  1. Open Unity Hub.
  2. Install Unity 2019.4.31f1 from the LTS release page (or whatever version CVR currently requires).
  3. In the Unity Hub, click the Create Project button.
  4. At the top of the screen, make sure the Editor Version is set to the correct version (2019.4.31f1 at time of writing).
  5. Select the 3D: Core project template.
  6. Name the project something appropriate.
  7. Set the location to somewhere on a drive with plenty of empty space (>5GB). For example, I usually put all my CVR-related projects in V:\CVR.
  8. Click "Create Project."

Preparation

  1. Install the CCK.
  2. Open Edit > Project Settings.
  3. Select the Player tab from the list on the right side of the dialog.
  4. Scroll down until you see Other Settings. Expand it, if needed.
  5. Under the Configuration heading, change Active Input Handling to Both.
  6. When Unity asks to restart the editor, do so.

Importing RCC

  1. Buy Realistic Car Controller (by Bonecracker Games) from the Unity Asset Store.
    • It's not recommended to pirate RCC, as the UnityPackages pirates offer often do not change project settings, or are old and/or broken. Just save yourself the grief and buy the damn thing.
  2. In the Editor, select Window > Asset Store (or press Ctrl+9).
  3. Log in, if needed.
  4. Go to My Assets.
  5. Find Realistic Car Controller in the list.
  6. If the Download button is shown next to RCC, press it and wait for it to download.
  7. Press the Import Button next to RCC.
  8. When Unity tells you it has Package Manager dependencies, select Install/Upgrade.
  9. Click Import once the Import Unity Package dialog appears. Do not unselect anything.
  10. Unity will tell you it found some missing layers. Press Add.

Vroom

This part will be less specific due to differing model workflows and needs.

Importing

  1. Close Unity so it doesn't reimport everything 15 times while you copy everything over.
  2. Save your model to some subfolder of Assets. I generally use something like Assets\Vehicles\VEHICLENAME\models\vehiclename.fbx.
  3. Save your textures to another subfolder of Assets. I generally use something like Assets\Vehicles\VEHICLENAME\textures\SKINNAME\*.png.
  4. Open Unity.
  5. Wait for the import to finish.
  6. Import your favorite shaders, if needed.
    • Do not use Standard, as many maps still assume everyone uses toon shaders and therefore don't have reflection probes and/or lighting probes. If you need something standard-y, use Rero Standard, as it permits faked lighting and fallback cubemaps.