Code Monkey home page Code Monkey logo

usource's Introduction

uSource

uSource is a plugin for importing MDL / BSP / VMT / VTF and etc... resources to Unity!

Screenshot

Supported formats (1.1 Beta):

Source

Format Type of content Import Export to Unity
.MDL Studio Models ✔️
.VCD Choreography Scenes (scenes.image) In the future
.BSP Map Files (Compiled) ✔️
.VMF Map Files (Hammer format) In the future
.VPK Valve Packages ✔️
.GCF Grid Cache Files In the future
.NCF No Cache Files In the future
.DMX Datamodels
.PCF Particles
.DMX SFM Sessions
.VTF Textures ✔️ ✔️
.VMT Materials ✔️ ✔️

GoldSource

Format Type of content Import Export to Unity
NOT SUPPORTED YET NOT SUPPORTED YET NOT SUPPORTED YET NOT SUPPORTED YET

Source 2

Format Type of content Import Export to Unity
NOT SUPPORTED YET NOT SUPPORTED YET NOT SUPPORTED YET NOT SUPPORTED YET

Supported features (1.1 Beta):

Studio Models (MDL / VVD / VTX / PHY / ANI / VHV)

Feature Supported
Versions 44 - 49 (Some older versions can load too, but possible errors!)
Bones ✔️
Hitboxes ✔️
Animations / Sequences (Partial)
Procedural Bones
Materials ✔️
Skinfamilies
Attachments
Flexes / Vertex Animations
Meshes (With skinning) ✔️ (Some mdl version 49 may not have meshes!)
Physics Model
Vertex Lighting (Static props)

BSP / Map Files

Feature Supported
Versions 19 (possible errors!), 20, 21
PAK ✔️
LZMA Lumps ❌ (TF2 Updated maps)
Models ✔️
Physics (Not a stable implementation, the code is "disabled")
Displacements (Partial, neighbor disps not supported yet)
Visibility
Occlusion
Entities ✔️
Static / Dynamic Props ✔️
WorldLights ✔️
Decals (Partial, overlays still not supported)
Cubemaps
Lightmaps (Partial, light style not supported yet)
Ambient cubes

Textures

Feature Supported
Versions 7.1 - 7.5 (Maybe 7.0?)
Envmaps (Cubemaps) ✔️
Convert to BGRA32 ✔️
Texture Formats Supported
RGBA8888 ✔️
ABGR8888 ✔️
RGB888 ✔️
BGR888 ✔️
RGB565 ✔️
I8 ✔️
IA88 ✔️
P8 ✔️
A8 ✔️
RGB888_BLUESCREEN ✔️
BGR888_BLUESCREEN ✔️
DXT1 ✔️
DXT3 ✔️
DXT5 ✔️
BGR565 ✔️
BGRX5551 ✔️
BGRA4444 ✔️
DXT1_ONEBITALPHA ✔️
UV88 ✔️
UVWQ8888 ✔️
RGBA16161616F ✔️
RGBA16161616 ✔️
R32F ✔️
RGB323232F ✔️
RGBA32323232F ✔️
NV_DST16 (Not Tested)
NV_DST24 (Not Tested)
NV_INTZ (Not Tested)
NV_RAWZ (Not Tested)
ATI_DST16 (Not Tested)
ATI_DST24 (Not Tested)
NV_NULL (Not Tested)
ATI_2N (Not Tested)
ATI_1N (Not Tested)

Materials (In Progress rework!)

Shaders Supported
LightmappedGeneric (Use Default / Generic)
LightmappedReflective (Use Default / Generic)
LightmappedTwoTexture (Use Default / Generic)
Lightmapped_4WayBlend (Use Default / Generic)
Multiblend (Use Default / Generic)
WorldTwoTextureBlend ✔️
WorldVertexTransition (Partial)
WindowImposter (Use Default)
Water (Use Default)
UnlitGeneric (Partial)
UnlitTwoTexture (Use Default / Generic)
WorldGGX (Use Default / Generic)
ParallaxTest (Use Default / Generic)
Sky ✔️
Core (Use Default)
SpriteCard (Use Default)
Cable (Use Default)
SplineRope (Use Default)
Refract (Use Default)
MonitorScreen (Use Default)
Modulate (Use Default)
VertexLitGeneric (Use Default / Generic)
Eyes (Use Default)
EyeRefract (Use Default)
VortWarp (Use Default)
Aftershock (Use Default)
Teeth (Use Default)
SurfaceGGX (Use Default)
Character (Use Default / Generic)
SolidEnergy (Use Default)
VolumeCloud (Use Default)
DecalModulate (Use Default)
Shadow (Use Default)
Subrect (Use Default)

VPK

Feature Supported
Version 1 ✔️
Version 2 ✔️

Datamodels (DMX)

Feature Supported
NOT SUPPORTED YET NOT SUPPORTED YET

Particles (PCF)

Feature Supported
NOT SUPPORTED YET NOT SUPPORTED YET

SFM Sessions (DMX)

Feature Supported
NOT SUPPORTED YET NOT SUPPORTED YET

usource's People

Contributors

deadzoneluna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usource's Issues

Seams in walls

I noticed that there are these small seams in seemingly all connecting walls. They become very clear once placing a directional light.
seam
(Picture from Portal 2's sp_a1_intro2)
In this picture I made the light red so you can clearly see it shining through the seams. I'm not sure how to do this, but the faces could be extended by some small value. (Note: I know you can play around with the bias of the light and etc, but even setting it to the smallest value doesn't really fix it, and it would be way nicer if it could be fixed without messing around with those.)

Import

How can i import this plugin ? and how can i use it ?

Loader credits stacked ontop of settings and the Lightmapped Generic shader turns everything black

I decided to import uSource into Unity 2019 LTS to port some maps from Gmod into it, and when I click on the loader window or use the loader script, the special thanks credits end up stacked on top of the settings to import the maps. I also have an issue where any material I try to give the lightmapped generic shader to turns pitch black. Is this a compatibility issue, or is it some other problem? I'd like to be able to use uSource with Unity 2019 since a game I play uses that build of the Unity engine.
Untitled

Support for static props with lightmaps?

I recently edited a map in hammer so all the static props are lightmapped, But USource does not seem to import the lightmaps on props? I looked through the code but i could not find a way to implement it myself.

Import mdl's with map?

Is it possible to load mdl's that aren't bundled or apart of a VPK on BSP load as so they can keep their original positions in the map?

As I am trying to load a map that has its models stored outside of the BSP

License

Could you please add some form of a license to the project? I am working on a tool that uses uSource and would like to opensource it as well.

How to use it.

I dont know how to use this in a project. i know how to inport him, but not how to use it

Can't load bsp maps of counter strike 1.6

Hi, the project wont be able to load the maps for counter strike 1.6. example map is de_dust2.bsp
here is the error message:

FileLoadException: de_dust2: File signature does not match 'VBSP'
Engine.Source.BspLoader.Load (System.String BSPName) (at Assets/Unity_Source_Engine_Importer/Core/BSP/BspLoader.cs:52)
Engine.Source.ConfigurationLoaderEditor.OnInspectorGUI () (at Assets/Unity_Source_Engine_Importer/Core/ConfigLoader.cs:20)
UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1647)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

ObjectDisposedException on map loading

I seem to encounter a bug that prevents me from loading Portal 2 maps, whenever the Load BSP button is pressed it throws a ObjectDisposedException. On portal 1 maps if i keep hitting the button it will eventually do it completely but this does not work for portal 2 bsps. heres the stacktrace:
ObjectDisposedException: Cannot access a disposed object. Object name: 'Stream has been closed'. System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) (at <695d1cc93cca45069c528c15c9fdd749>:0) uSource.Formats.Source.VBSP.VBSPFile.LoadStaticProps () (at Assets/Plugins/uSource/Formats/Source/VBSP/VBSPFile.cs:924) uSource.Formats.Source.VBSP.VBSPFile.Load (System.IO.Stream stream, System.String BSPName) (at Assets/Plugins/uSource/Formats/Source/VBSP/VBSPFile.cs:142) uSource.uResourceManager.LoadMap (System.String MapName) (at Assets/Plugins/uSource/uResourceManager.cs:287) uSource.uLoaderEditor.DrawGUI () (at Assets/Plugins/uSource/uLoader.cs:89) uSource.uLoaderWindow.OnGUI () (at Assets/Plugins/uSource/uLoader.cs:43)
I removed all the useless stuff from it to shorten it. At the time of the error the UnloadAll method had not been called so im confused as to whats causing it. Thanks :)

Hangs Forever

Trying to load any model causes this. It spikes in memory and then goes down to being idle but the task isn't responding but still using 30% of my CPU. Haven't even tried maps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.