Skip to content

USource is a Unity Engine plugin for importing Source Engine content

Notifications You must be signed in to change notification settings

Shane-SDK/USource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This is in a very rough state right now and is not production ready yet

  • Has not been tested in builds (Does successfully build however)
  • Asset browser does not show preview images for content
  • Has only been tested on content from 2013 Source Engine games, specifically Garry's Mod, Half Life 2, and Counter Strike: Source files.
  • Centered around the Universal Rendering Pipeline
  • Inconsistent MDL importing relating to checksum errors
  • Some VPKs (Garry's Mod) are not read properly
  • Assets imported using the Asset Browser may need to be reimported through the Unity Project window in order for them to import correctly.
  • MDL bones do not import correctly

Despite the current state I want to publicize this for anyone who may be interested in its development. I plan on using this in my other projects so it is important to me that these problems get solved in the future

USource is a plugin that lets you import Source Engine content such as materials, textures, models, and maps.

usource-0

Specifically it uses Unity's AssetImporter classes to allow Source's proprietary file formats to be converted into their Unity-counterparts. This means any assets converted are handled in a way consistent with how the Unity Editor expects you to use assets.

In addition an Asset Browser is provided that allows users to browse and import any Source assets found in their games' folders into their project.

Note

USource is a heavily modified version of uSource by DeadZoneLuna.

Any Source Engine files in your project require their dependencies (IE other files like vmts, vtfs...) to be present first in order for them to import correctly. The Asset Browser handles importing dependencies for you and should be your primary means of getting content in your project, as opposed to copy/pasting with your clipboard.

Source Asset Support Status

Source File Type Asset Type Status
mdl Model Prefabs/GameObjects
vtf Texture Texture2D
vmt Material Material
vmf Uncompiled Level Prefab/RealTimeCSG Brushes. [1] Buggy
bsp Compiled Level Prefabs/GameObjects
pcf Particles In the future

Important

  • [1] VMF files use RealtimeCSG brushes for the level geometry. It is not a requirement to use this plugin

VMFs are only functional/supported if the RealtimeCSG symbol is present in your Project Settings. This symbol should appear automatically if RealtimeCSG is in your project.

MDL Data Support Status

Feature Status
Mesh Supported [1]
Bodygroups In the future
Skins In the future
Shape keys In the future
Hitboxes In the future
Animations In the future
Physics/Colliders Supported
Lightmaps Supported

Note

  • [1] Currently only the 'default' bodygroup/skin configuration is imported.

BSP Data Support Status

Feature Status
World collision Supported
World Geometry Supported [1]
Displacements Buggy [2]
Props Supported
Brush entities In the future
Skybox In the future [3]
Light probes Supported
Lightmaps Supported [4]
Water In the future

Note

  • [1] BSP files have import options to change how world geometry is imported. You can import it as 1 mesh or have it split by visleafs. The latter is necessary for Unity's occlusion system as it allows sections of the world to be hidden.
  • [2] Displacements generally work but can appear flattened. Blended materials are not supported right now.
  • [3] You can choose to occlude the skybox from your BSP's mesh. However models that appear in the sky will not be occluded right now. Additionally Unity Sky Materials are not created at the moment.
  • [4] Lightmap UVs are generated by Unity's lightmap UV generator. It does not use the BSP's UVs.

Images

usource-3

usource-1

settings

usource-4

Releases

No releases published

Packages

No packages published

Languages