Llamatek Garage GitHub & Community

The Llamatek Garage GitHub contains additional systems designed to work seamlessly with Llamatek Assets.

Llamatek Garage GitHub

They are free to use with your purchased Llamatek packages and can be imported through the Unity Package Manager.

Features will grow over time based on feedback and requests from our users.

Llamatek Garage Discord

For support, feature requests and bug reports, join the Llamatek Discord:

Llamatek Garage Discord

The Discord is the best place to get help with using Llamatek in your game, request new features or report issues.

Everyone is welcome in the Llama Garage.

Installation

Install the package using the standard Asset Store package installation process.

https://docs.unity3d.com/6000.0/Documentation/Manual/upm-ui-install2.html

Render Pipeline Support

If your project uses the URP or HDRP render pipeline, convert the materials using the

Render Pipeline Material Converter

https://docs.unity3d.com/6000.0/Documentation/Manual/urp/features/rp-converter.html

Package Structure

Each Llamatek package contains the same folder structure

LLamatek
    <PackageName>
        LLamatek_<PackageName>_package.asset
        Source
        Parts
        Models
        Materials
        Textures
        Shaders
    SharedContent
        Scripts
        SwappableMaterials
        Models
        Materials
        Textures
        Shaders

Llamatek_<Package Name>_package.asset defines the location for each vehicle package and contains references to the folder structure

SharedContent contains shared assets that all Llamatek packages need.

<PackageName> contains unique assets to this particular package.

You may move SharedContent and <PackageName> folders within your project.

Building Vehicles

The Part Tool is used to build a vehicle from its individual parts.

  1. Start by dragging a suspension part into the scene. Found in: LLamatek/<PackageName>/Parts/<PackageName>/Suspensions

  2. Select a part of the suspension in the scene or hierarchy. The Part Tool will then become available.

  1. Use the buttons in the Scene View to add parts.

(hold shift when selecting a part to automatically fill in the rest of the vehicle)

  1. Press the bin buttons in the Scene View to remove parts.

Vehicle Structure

Llamatek vehicles are modular and OCD friendly.

The vehicle parts form a tree structure, unfolding from the suspension and progressing through the body and interior down to smaller components such as the pedals and steering wheel.

The LLamaRef component defines which parts can be used at each point in this structure.

This LLamaRef component for example unfolds the bodies. Those bodies in turn have more LLamaRef components inside that unfold the next layer.

Painting Vehicles

The Color Tool allows you to quickly change materials.

Start by selecting a part of the vehicle in the scene or hierarchy.

  1. Select the Color Tool to open the material selection popup.

  2. Select a replacement material.

The material popup displays the materials found in the package's SwappableMaterials folder.

You may insert your own categories and materials in this folder to extend your color options.

Scripting

The LLamaTag is a simple component used to identify and find specific GameObjects within a Llamatek vehicle.

To see which tags are available, open the LLamaTag script and check the Tag enum. This enum contains the currently available tags.

(The list of available tags may expand as new vehicle features are added.)

Finding Objects Examples

//find the front left wheel
LLamaTag.Find(gameObject, Tag.WheelFL)

//find the steering wheel
LLamaTag.Find(gameObject, Tag.SteeringWheel);

//find the front left door
LLamaTag.Find(gameObject, Tag.DoorFL);

//find the front left door lock
LLamaTag.Find(gameObject, Tag.DoorFL, Tag.Lock);

//find the parent with tag
LLamaTag.FindInParent(gameObject, Tag.Body);

//find all glass parts
LLamaTag.FindAll(gameObject, Tag.Glass);

//find all broken glass
foreach( var i in LLamaTag.FindAll(gameObject, Tag.Glass)) {
    var brokenGlass = LLamaTag.Find(i, Tag.Destroyed);
}

//find all right sided indicator lights
foreach( var i in LLamaTag.FindAll(gameObject, Tag.IndicatorLight)) {
    var isRightSided = LLamaTag.FindInParent(i, Tag.LightsFL) == null && 
    LLamaTag.FindInParent(i, Tag.LightsRL) == null
    if(isRightSided) {
        //indicator on the right side
    } else {
        //indicator on the left side
    }
}

//find all light objects that can hold a unity light
foreach( var i in LLamaTag.FindAll(gameObject, Tag.LightMesh)) {
    var parent = LLamaTag.Find(i, Tag.Parent);
    //parent your light source in here
}

//find the gameObject for parenting the exhaust particle system into
LLamaTag.Find(gameObject, Tag.Exhaust, Tag.Parent);

//find the tyre of a wheel
LLamaTag.Find(gameObject, Tag.WheelFL, Tag.Tyre);

//find all colliders
LlamaTag.FindAll(gameObject, Tag.Collider);

This allows vehicle parts to be found and manipulated reliably through code. Providing a solid framework to build your code onto.

Damage

Llamatek Vehicles support damage beyond mesh deformation using 3 states. The different states can be found using the LLamaTag system.

UnDamaged
Damaged
Destroyed

For example, to find damaged glass:

LLamaTag.Find(gameObject, Tag.Glass, Tag.Damaged)

or to find a destroyed tyre:

LLamaTag.Find(gameObject, Tag.Tyre, Tag.Destroyed)

Physics parts

We separated Doors, Bumpers, Hoods, Trunk, etc supporting things to hinge, scrape, detach using physics. Supporting a wide variety of damage systems.

These parts have separated collision already setup.

Collision

Llamatek vehicles include two collision setups for different types of games.

Low Collision provides a simpler collision setup intended for racing games and other situations where detailed vehicle collision is not required.

High Collision provides a more detailed collision setup for games where players can enter and exit the vehicle or interact with its individual parts.

Both collision setups are enabled by default.

You can find the Colliders under Low or High collision their LLamaTags:

LLamaTag.Find(gameObject, Tag.LowCollision)
LLamaTag.Find(gameObject, Tag.HighCollision)

All vehicle colliders are Convex, allowing them to work with Unity Rigidbody physics.

Suspension

Llamatek vehicles use a rigged suspension system rather than simple animation.

The suspension is driven by wheel targets. Moving the wheel targets automatically moves and rotates the corresponding suspension components.

Rigging Scripts

The suspension system uses three components located in: SharedContent/Scripts/Rigging

LLamatek_Constraint limits the translation and rotation of a suspension component.

LLamatek_Node is an editor component that displays a node in the Scene view to help with suspension setup.

LLamatek_Rod moves and rotates individual suspension components based on their assigned targets.

Wheel Targets

The suspension prefab only requires the wheel targets to be moved to make the suspension react.

Rig

We have put considerable effort into making our suspension systems behave like the real deal.

Every component moves as it would in a real vehicle. Parts rotate, bend, and shift independently, following the movement and geometry of the actual suspension system.

Custom Parts

Llamatek vehicles can be extended with your own parts.

For demonstrative purposes, lets add a capsule part to the rear seat.

Open a back seat prefab in prefab mode. (using the 'echo' package you can find a backseat here: LLamatek/Echo/Parts/Echo/Backseats/Backseat_1.prefab)

  1. Create an Empty Gameobject, name it P_Capsule, position it roughly where you want the part to be and add the LlamaRef component to this gameObject.
  2. Set Package property to the current package asset.
  3. Set refFolder property to CapsuleTest.
  1. Create another Empty Gameobject inside P_Capsule, name it Capsule_1 and reset its position to 0,0,0 , rotation to 0,0,0 and scale to 1,1,1.
  2. Inside Capsule_1 Create the content, in this case a capsule and a sphere, position and scale them how you like.
  1. Create a new folder named CapsuleTest inside the Parts folder of the package you assigned.
  2. drag Capsule_1 into that folder to make it a prefab.

Rebuild the parts references by selecting the package asset, and clicking Rebuild Part Library.

Testing you custom capsule part

the LlamaRef now knows that your capsule part is located in Parts/CapsuleTest relative to the package asset, and the Parts Tool should show the capsule option in the backseat.

Left VS Right Hand Drive

All Llamatek vehicles support left hand drive and right hand drive options.

They are indicated by LHD and RHD.

Generaly anything that needs switching is located inside the dashboard.

HD Graphics

Getting the most out of the vehicles is largely about how they interact with the environment around them. Because vehicle paint and glass are highly reflective, lighting and reflections have a much greater impact on the final result than they might on other assets.

Lighting

Lighting is one of the most important parts of creating a good-looking vehicle scene.

Cars are highly reflective, meaning that much of what you see on the bodywork is actually the environment being reflected across the surface. A good skybox or HDRI can therefore make a huge difference to the appearance of the vehicle.

This applies to both URP and HDRP. Start with a suitable skybox or environment before adjusting the vehicle itself. A well-lit environment will give the bodywork natural highlights, gradients and reflections without requiring excessive additional lighting.

Reflection

Reflection is king when it comes to vehicles.

There are many ways to produce reflections, including Reflection Probes, Screen Space Reflections, ray tracing and custom shaders. The best choice depends on the render pipeline, target hardware and type of project.

For the HDRP examples in this manual, we use real-time ray-traced reflections. Ray tracing allows reflections to include information that is outside the camera's view, producing more accurate reflections across the vehicle body.

For URP, Reflection Probes and the skybox provide the main reflection sources. The exact setup will depend on your scene and the visual style you are aiming for.

Exposure

Once the sky and reflections are set up, exposure is the next important step.

Exposure controls the overall brightness of the image. If the exposure is too low, the vehicle can lose detail in darker areas. If it is too high, highlights and reflections can become washed out.

For the images in this manual, we use a fixed exposure so that the lighting remains consistent between shots. In a game, you may instead want to use automatic or other dynamic exposure modes so the exposure can adapt as the camera moves between different lighting conditions. HDRP supports both fixed and automatic exposure modes.

Smoothness

Smoothness controls how the vehicle surface responds to light and reflections.

For a clean, polished vehicle, a smoothness value around 0.95 gives the paint a strong, clean reflection. Lower values can be used for vehicles with matte paint, worn surfaces or an older appearance.

The right value depends on the condition and material of the vehicle. A brand-new car and a weathered 1980s daily driver should not necessarily reflect the environment in exactly the same way.

Color

Using realistic colors is another important part of making the vehicles feel believable.

The built-in materials use colors based on real vehicle colors, and the materials are named after those colors where appropriate. When creating your own materials, it can be useful to look up the original color and compare it with photographs of the real vehicle.

The appearance of a color can change significantly depending on the lighting, reflections and render pipeline. Tune the material in the environment where it will actually be used, whether that is URP or HDRP, rather than judging the color in isolation.

Result

All of these elements work together.

A good environment provides the lighting, reflections show that environment across the vehicle, exposure controls the overall brightness, smoothness defines how the surfaces respond to those reflections, and realistic colors complete the material.

There is no single setting that makes a vehicle look realistic. The final result comes from the interaction between the vehicle, its materials and the environment around it.