Giter VIP home page Giter VIP logo

sourceio's Introduction

Blender Download Discord

SourceIO

SourceIO is a Blender(3.4+) addon for importing source engine textures/models/maps Our Discord server https://discord.gg/SF82W6aZ67

Current TODO list -> TODO.md

Small WIKI -> WIKI

Usage

In order to find the import tools you simply need to go to File>Import>Source Engine Assets

Credits

Supported formats (v5.3.0):

Source 1

File Type Contents Import Export
.MDL Model ✔️
.BSP Map Files (Compiled) ✔️ Not Planned
.VMF Map Files (Hammer Format) Not Planned Not Planned
.VTF Textures ✔️
.VMT Materials ✔️

Source 2

File Type Contents Import Export
.VMDL Model ✔️ Not Planned
.VMAP Map Files (Compiled) ✔️ Not Planned
.VMAP Map Files (Hammer Format) Not Planned Not Planned
.VTEX Textures ✔️
.VMAT Materials ✔️

Supported games

Game Status
CSGO Partial support: models, maps(not all entities), textures, materials
TF2 Full support
HL2 and episodes Full support
Portal 1/2 Full support
L4D2 Full support(expect infected materials)
Vindictus Partial support: (models, maps(not all entities), textures, materials(not all shaders)
BlackMesa Full support
Titanfall 1 Partial support: maps(not all entities), models, textures, materials
Counter Strike 2 Partial support: (models, maps(not all entities), textures, materials(not all shaders, require blender 3.4 or newer)
Half-Life: Alyx Partial support: (models, maps(not all entities), textures, materials(not all shaders)
S&BOX Partial support: Waiting for full release
Aperture Desk Job Partial support: (models, maps(not all entities), textures, materials(not all shaders)

sourceio's People

Contributors

darkblade909 avatar ganonmaster avatar half5life avatar hisprofile avatar irmitya avatar kant avatar nekkowe avatar redstonedash avatar redxeye avatar renakunisaki avatar shadelessfox avatar syborg64 avatar tltneon 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sourceio's Issues

Cannot import name "NonSourceInstall"

When I try to install and activate the addon, Blender presents me with the error message below:

Traceback (most recent call last):
  File "/snap/blender/41/2.83/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/__init__.py", line 23, in <module>
    from .source1_operators import (BSPImport_OT_operator,
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1_operators.py", line 8, in <module>
    from .source1.vtf.blender_material import BlenderMaterial
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/blender_material.py", line 4, in <module>
    from ..vtf.vmt import VMT
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/vmt.py", line 3, in <module>
    from ...utilities.path_utilities import NonSourceInstall
ImportError: cannot import name 'NonSourceInstall' from 'SourceIO-master.utilities.path_utilities' (/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/utilities/path_utilities.py)

Operating System: Linux Mint 19.3 Tricia (MATE Desktop)
Blender Version: 2.83.2
Installation: snapd

Can't open libVTFLib13.so on Linux

When activating the addon:

Traceback (most recent call last):
  File "/usr/share/blender/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/__init__.py", line 9, in <module>
    from SourceIO.vtf.blender_material import BlenderMaterial
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/vtf/blender_material.py", line 5, in <module>
    from SourceIO.vtf.import_vtf import import_texture
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/vtf/import_vtf.py", line 6, in <module>
    from SourceIO.vtf.VTFWrapper import VTFLib
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/vtf/VTFWrapper/VTFLib.py", line 40, in <module>
    class VTFLib:
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/vtf/VTFWrapper/VTFLib.py", line 44, in VTFLib
    vtflib_cdll = cdll.LoadLibrary(vtf_lib_name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libVTFLib13.so: cannot open shared object file: No such file or directory

Copying the file into /usr/local/lib doesn't help. What does fix it is changing VTFLib.py to use the full path to the file like it does on Windows:

elif platform_name == "Linux":
    # On linux we assume this lib is in a predictable location
    # VTFLib Linux: https://github.com/panzi/VTFLib
    # requires: libtxc_dxtn
    full_path = os.path.dirname(__file__)
    vtf_lib_name = "libVTFLib13.so"

# ...

    elif platform.system() == "Linux":
        vtflib_cdll = cdll.LoadLibrary(os.path.join(full_path, vtf_lib_name))

Error on old model import

  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\__init__.py", line 61, in execute
    importer.load()
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\mdl\mdl2model.py", line 63, in load
    self.model.read()
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\mdl\source_model.py", line 47, in read
    self.mdl.read()
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\mdl\mdl_readers\mdl_v48.py", line 14, in read
    self.read_bones()
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\mdl\mdl_readers\mdl_v48.py", line 40, in read_bones
    SourceMdlBone().read(self.reader, self.file_data)
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\data_structures\mdl_data.py", line 667, in read
    reader.read_ascii_string)
  File "C:\blenderfolder\2.80\scripts\addons\SourceIO-master\byte_io_mdl.py", line 211, in read_from_offset
    raise OffsetOutOfBounds()
SourceIO-master.byte_io_mdl.OffsetOutOfBounds

Sample.

new mdl importer isn't working

pretty much self-explainatory, old version of the addon (3.75) was working fine, but maybe I'm doing something wrong here. (blender 2.83.16 build, used the old version on this build too)
image

Exporting

Hello! Is there anyway to export any imported model back to SFM?
I mean without the hard way called Blender Source Tools moreover with this plugin...

Error when importing any .mdl with textures

Anytime I import any .mdl and use the import textures option this error throws and the textures are just solid colours. I'm using the most recent version of Blender (as of 13 Aug 20) and most recent version of your SourceIO. Models I've tried it on are some Portal 2 ones. Is there a specific order you should import stuff into Blender?

(Textures/Materials first, then model? Or should the "import textures" checkbox when importing the model do it all?)

image

Import error: L4D2 survivor model meshes are messed up

In version 3.4.0:
Importing Left 4 Dead 2 pak01_dir.vpk "models\survivors\survivor_mechanic.mdl" shows Ellis with much of the mesh messed up.
Importing Left 4 Dead 2 pak01_dir.vpk "models\survivors\survivor_coach.mdl" shows Coach with much of the mesh messed up.

(Importing Left 4 Dead 2 pak01_dir.vpk "models\v_models\v_desert_eagle.mdl" shows as expected.)

SourceIO - Installation Instructions?

Do you mind including instructions for installing the add-on in Blender 2.80?
Tried installing from here: https://github.com/REDxEYE/SourceIO/archive/master.zip

I get the following error when trying to activate the add-on:

Traceback (most recent call last):
  File "/home/user/Downloads/Blender/blender-2.80-bb7b741d2f1c-linux-glibc217-x86_64/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO-master/__init__.py", line 13, in <module>
    from .mdl import mdl2model
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO-master/mdl/mdl2model.py", line 12, in <module>
    from ..mdl.source_model import SourceModel
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO-master/mdl/source_model.py", line 4, in <module>
    from ..mdl import qc_generator
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO-master/mdl/qc_generator.py", line 5, in <module>
    from SourceIO.data_structures.mdl_data import SourceMdlBone
ModuleNotFoundError: No module named 'SourceIO'

Blender v2.80 Beta
Date: 2019-07-10 15:05
Hash: bb7b741d2f1c

SourceIO v3.5.4 - Not Installing Correctly

Blender v2.80 Official Release
Pop!_OS 64bit (based on Ubuntu)
SourceIO v3.5.4 (28c64ac - Oct 18 2019)

When attempting to install this release, It said:
Modules Installed () from '/home/user/Downloads/Blender/addons/SourceIO/2-8x/20191018/SourceIO.zip' into '/home/user/.config/blender/2.80/scripts/addons'

However, the add-on does not appear in the Blender Preferences - Add-ons menu.
I did not see any error messages in the Scripting section.

I'm not a programmer, but I also took a look at the init.py in a text editor and noticed the version is still showing 3.5.1.

EDIT
Also, the bl_info appears to be inside the if bpy_available, not sure if it's supposed to be like that.

According to Blender wiki:

You must include a python dictionary named "bl_info" at the top of your addon .py file or init.py if your Addon is a Python module.

bl_info = {
    "name": "My Script",
    "description": "Single line explaining what this script exactly does.",
    "author": "John Doe, Jane Doe",
    "version": (1, 0),
    "blender": (2, 65, 0),
    "location": "View3D > Add > Mesh",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
                "Scripts/My_Script",
    "tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
    "support": "COMMUNITY",
    "category": "Add Mesh"
}

Flex/Shapekeys do not always import correctly on clamped meshes

In the current version of SourceIO (3.7.1.1 and current github code), some Source1 MDL files with clamped/split meshes do not import all their Flex/ShapeKey vertex positions correctly, causing unexpected deformations among the clamped areas.

The same MDL files and process works correctly in previous versions of SourceIO (3.5.5 and 3.5.8).

Error When Importing (+ Another Small Error)

image
Im not sure how I could explain this, also another error I have found is when you import any model, the meshes are not parented to the armature and only connected using the modifier, and also bodygroups are not in collections and such but yeah, the error I wanted to talk about was this error which im unsure how it happened.

VMTs dont import with model

I have tested 3.5.5 and it seems as if the ability to import textures with it doesnt work, i tried it with multiple models (from badasses and a couple other ones like bendy) and not a single one worked! Idk if this is just unfinished or if its a bug but uh yeah

List index out of range error when importing a cube in vmdl_c format

It managed to import a skeleton but not the mesh

Traceback (most recent call last):
File "C:\Users\A5\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\SourceIO_init_.py", line 118, in execute
Vmdl(str(directory / file.name), True)
File "C:\Users\A5\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\SourceIO\source2\vmdl.py", line 48, in init
self.build_meshes(self.main_collection, armature)
File "C:\Users\A5\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\SourceIO\source2\vmdl.py", line 51, in build_meshes
control_block = self.valve_file.get_data_block(block_name="CTRL")[0]
IndexError: list index out of range

location: :-1

Readme

Hello

Can you provide a list of formats openable with this addons ?
And what is supported by your addon ?
I see mesh, armature and lod ?

Thank you

Broken shape keys

https://sfmlab.com/project/30339/

This model here seems to break when imported via MDL. It works fine when using Crowbar and decompiling, but usually MDL importing provides stronger and more accurate rips of SFM models. I'm not an SFM expert, so I'm not sure if there is something specific in this model compared to others by this model maker that causes this issue.

Cannot Find File "libtxc_dxtn.so"

I tried to uninstall and reinstall with the current version, and this error came up:

Traceback (most recent call last):
  File "/snap/blender/41/2.83/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/__init__.py", line 23, in <module>
    from .source1_operators import (BSPImport_OT_operator,
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1_operators.py", line 8, in <module>
    from .source1.vtf.blender_material import BlenderMaterial
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/blender_material.py", line 5, in <module>
    from ..vtf.import_vtf import import_texture
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/import_vtf.py", line 6, in <module>
    from ..vtf.VTFWrapper import VTFLib
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/VTFWrapper/VTFLib.py", line 40, in <module>
    class VTFLib:
  File "/home/rjunicruz/.config/blender/2.83/scripts/addons/SourceIO-master/source1/vtf/VTFWrapper/VTFLib.py", line 44, in VTFLib
    vtflib_cdll = cdll.LoadLibrary(os.path.join(full_path, vtf_lib_name))
  File "/snap/blender/41/2.83/python/lib/python3.7/ctypes/__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "/snap/blender/41/2.83/python/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtxc_dxtn.so: cannot open shared object file: No such file or directory

Operating System: Linux Mint 19.3 Tricia (MATE Desktop)
Blender Version: 2.83.2
Installation: snapd

Incompatible with Blender 2.83!

So I was just about to try the latest build, and when trying to turn it on, I got this error:
image
I'm pretty sure its because of 2.83 but im not 100% sure

Session Import

The SFM session import of the addon seems to be not working at all. I tried it with a session with only one model in it and no map selected but I always get the same error. I'm not sure if this error is on my side or the addon isn't working as it should be, so I'm asking you if you could maybe take a look at that once you have the time for it.

Thanks in advance.

Error when writing QC file: 'SourceMdlBone' object has no attribute 'poseToBoneColumn0'

When importing a model:

Traceback (most recent call last):
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/__init__.py", line 64, in execute
    qc.write_models(qc_file)
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/mdl/qc_generator.py", line 48, in write_models
    self.write_model(fileh, bp, bp.models[0])
  File "/home/rena/.config/blender/2.80/scripts/addons/SourceIO/mdl/qc_generator.py", line 81, in write_model
    bone.poseToBoneColumn0,
AttributeError: 'SourceMdlBone' object has no attribute 'poseToBoneColumn0'

location: <unknown location>:-1

Despite the error, the model is imported OK.

Import error: "Normalize bones" breaks rigging on some models

Currently using v3.4.0 as this is the latest working in Blender 2.8 as of nightly 009dbc2bc9fb.

Normalize bones was stated as having no affect on rigging, yet breaks the weighting of certain models when enabled.

As I currently do not know GitHub's stance on NSFW imagery in public issues, I will withhold sharing image examples for now, but the problem can be examined via StealthClobber's MercyNude2018-SFM-WIP-V2 model.

Bodygroups not sorted anymore/Objects not parented to Armature

So i know I always come on here and I've seen this issue for a long time now, but I didn't know if it were intentional or not so i decided to write it on here. Whenever a model is imported, it is no longer parented to its armature so whenever you move it in object mode, it doesnt move the meshes. The other issue is that the bodygroups are no longer sorted in collections like they were with the previous importer. Do you have plans to bring back the bodygroups feature and fix the issue?

Materials not properly applied to imported maps

When importing a map, the first material in the list of imported materials is applied to every surface in the map, as can be seen below. I have tested this by selecting assigned faces for each material in edit mode, which confirmed this.
image

Strange import problem

image
Basically I just tried to import default sfm hwm scout (sourcefilmmaker\game\tf_movies\models\player\hwm\scout.mdl) but somehow he's missing his feet and all of the shapekeys. Tried to import with Blender Source Tools and everything seems fine.
Used latest builds of your addon (from 16 and 17 of july). Blender 2.90.0 Alpha

ImportError: cannot import name 'SourceModel' from 'SourceIO.source_model'

Blender 2.80 Beta [ Date: 2019-03-03 Hash: ae977d13f8e9 ]
SourceIO v3.3.5 https://github.com/REDxEYE/SourceIO/releases/download/3.3.5/SourceIO.zip

I don't know if it's too early to submit bug reports.
When attempting to import a MDL, I get the following error:

Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO_init_.py", line 50, in execute
from . import mdl2model
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\mdl2model.py", line 16, in
from SourceIO.source_model import SourceModel
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\source_model.py", line 3, in
from SourceIO import qc_renerator
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\qc_renerator.py", line 9, in
from SourceIO.source_model import SourceModel
ImportError: cannot import name 'SourceModel' from 'SourceIO.source_model' (C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\source_model.py)

location: :-1

Mysterious Stereo Flexes Error

I am not entirely sure what the error being thrown at me is correct because the model imported normally. Is this a case of model versions/formats?

Traceback (most recent call last):
  File "/home/rjunicruz/Desktop/blender-2.83.2-linux64/2.83/scripts/addons/SourceIO-master/source1_operators.py", line 58, in execute
    mdl, vvd, vtx = import_model(directory / file.name, vvd, vtx, phy, self.create_flex_drivers)
  File "/home/rjunicruz/Desktop/blender-2.83.2-linux64/2.83/scripts/addons/SourceIO-master/source1/new_model_import.py", line 208, in import_model
    name: str = mdl.get_value('stereo_flexes')[flex.flex_desc_index]
TypeError: 'NoneType' object is not subscriptable

location: <unknown location>:-1

Operating System: Linux Mint 19.3 Tricia (MATE Desktop)
Blender Version: 2.83.2
Installation: zipped folder

struct.error: unpack requires a buffer of 4 bytes

Blender 2.80 Beta [ Date: 2019-03-03 Hash: ae977d13f8e9 ]
SourceIO v3.3.6 https://github.com/REDxEYE/SourceIO/releases/download/3.3.6/SourceIO.zip
4c2752f

Attempting to import a MDL v48: https://sta.sh/09oqflbli8o
Please let me know if you're unable to download the model.

MDL file type ID: IDST
MDL file version: 48
MDL stored file name: "characters/postal_babe/postal_babe.mdl"
MDL stored file size: 250,960 bytes
MDL actual file size: 250,960 bytes
MDL checksum: 9925ED6E

When the model failed to import, the following error message appeared:

 Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\__init__.py", line 58, in execute
    importer.load()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\mdl2model.py", line 70, in load
    self.model.read()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\source_model.py", line 46, in read
    self.mdl.read()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\mdl_readers\mdl_v48.py", line 22, in read
    self.read_bone_flex_drivers()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\mdl_readers\mdl_v48.py", line 180, in read_bone_flex_drivers
    mouth.read(self.reader)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\data_structures\mdl_data.py", line 1458, in read
    self.bone = reader.read_int32()
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\byte_io_mdl.py", line 175, in read_int32
    return self.read('i')
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\byte_io_mdl.py", line 159, in read
    return struct.unpack(t, self._read(size))[0]
struct.error: unpack requires a buffer of 4 bytes

location: <unknown location>:-1

Import texture ?

Upon searching the web, I've stumbled upon this tweet: https://twitter.com/DaLoaf1/status/1282757020022640642
It mention an ability to import texture & possibly other things in the screenshot.

In the comment, an user requested to know which addon it was, and the OP answered with a link directing to this addon. After installation and trials, I did not manage to make any of the option shown in the screenshot available and usable. The only option I was able to get is "Write QC".

How does this user get the ability/options shown in the screenshot and how to activate them to be used ?
Thanks !

Eye Texture - UV mapping

Blender 2.80 Beta [ Date: 2019-03-17 Hash: 9099305771ec ]
SourceIO v3.4.0
SFM Model: http://sfmlab.com/item/3383/

Someone was having issues with eye textures not applying correctly in Blender:

It's similar to what I've experienced before with other models (Harley Quinn), but this time it's different.
Before, I usually change the scales on the mapping node (https://docs.blender.org/manual/en/dev/_images/render_blender-render_materials_nodes_types_vector_mapping_node.png) to quickly fix the issue, but this particular model may require more tweaking.

Dota2 Imports

Hey REDxEYE.
I'm in the process of including SourceIO as an Source2 importer with a "watch the development of this tools as a Blender Source Tools alternative" (I'm not quite ready to highlight it yet as it is still in development) in the new guide I'm writing for converting models for use in SFM using Blender 2.8x and up.
I'm running into issues with Source2 imports. Half-Life: Alyx models seem to be importing well and the the VMat_C imports are creating the shader nodes and texturing the models very well, however all I'm getting for Dota2 imports are base armatures.

I've tried both the Latest Release 3.7.11 and the SourceIO Master (3.8.0 as of today) and get the same result. Models start to Import, then the add-on is bailing as soon as it hits the vmesh_c file.

This is the import log written to the console.
register_class(...): Warning: 'source_io.utils' doesn't contain '_PT_' with prefix & suffix Loading 0/1 {'models/courier/badger/asset_sequences_76def6bf.vagrp': WindowsPath('G:/DNS-323/DOTA/models/courier/badger/asset_sequences_76def6bf.vagrp_c'), 'models/courier/badger/courier_badger_05f497f2.vagrp': WindowsPath('G:/DNS-323/DOTA/models/courier/badger/courier_badger_05f497f2.vagrp_c'), 'models/courier/badger/courier_badger_model.vmesh': WindowsPath('G:/DNS-323/DOTA/models/courier/badger/courier_badger_model.vmesh_c')}
And this is all I get for a model, (and it doesn't matter what DOTA2 model I try to import, all I get is an armature and a bail out at the vmesh_c)
2020-10-02_0-30-17

I thought this tool was supposed to be DOTA2 compatible.

Then again, I'm also wondering if this might be because I'm using Blender 2.9.1(Alpha) (I'm trying to keep the guide ahead of the development of Blender as well) and the tool is breaking because of that. Am I finding an upcoming bug you might have to address and soon.

So the question becomes, in the current version of Blender (2.9.0.1) is the tool Dota2 compatible? If it is supposed to be, you may have a problem when 2.9.1 hits the market.

Further issues I've noticed. When importing VMat_c. If a texture can't be found, the add-on start looking for it. I like this idea, however, when I found it starts looking in the Root of the drive I'm using, I become concerned over security issues.
The test I performed was to move a VTEX_C file to various places on my computer and then import the VMAT_C. I find that the search doesn't extend beyond the drive the vmat_c is in, but...
In one test, I moved the vtex_c from my extractfolder\models\materials folder into my C:\ root folder and imported the vmat_c. When I viewed the log and found the only reason it didn't convert the texture to a TGA and load it into the image texture node was because it didn't have permission to write to the folder the vtex_c was in (the C:\ (Root) or my C:\Users folder) I have to ask, to what extent does your add-on search drives for missing content and what is it fetching? Are you gathering information about me? Is the add-on sending you stuff it finds? (you know, the old paranoia thing... LOL) Maybe limiting the search to the extract folder would be better (if you can??). For example if I extract a VPK to a folder called HL_Alyx on my desktop, the search can access up to the point that if finds the models and materials main folders but not outside the extraction folder. Kind of a hard thing to code around, but the add-on should not be searching system folders.

Next issue I have is import VTMs with separated Alpha. This seems to be hit and miss. For example For some VMTs I get the RGB and the A textures, but here, (this is the bot_worker_a_red VTF from TF2), when I imported the VTF with the Separate Alpha box enabled, as you can see in this picture all I get is a RGB texture. On the right is that texture's Alpha channel shown in VTFEdit. The Alpha channel in this texture is not separated and it is not written as an Alpha texture by the add-on.
2020-10-02_0-54-03

The last issue I have for now in 3.7.11, (but I think you've already fixed in the 3.8.0 master for your next release), is that when using the import vtex_c files. It failed every time I tried to use it in 3.7.11, I think it was because the Separate Alpha check box was missing from the Options in the import browser screen (the check box is now present in the screen in the new 3.8.0 master.)

One last thing, the Import Source2 vwrld map files. Scanning the vpks for both Dota2 and HL:Alyxx I can't find a single vwrld type file. Is this something that is exported from the game's workshop tools like the vmf files used by Hammer for the Source engine?

I must really congratulate you on how you're pulling your Shapekey names and populating them in Blender. I only wish that Crowbar or Blender Source Tools would do the same. There isn't a single corrective shape name that breaches the Blender 65 character limit and is truncated when I import a HWM model. Great job there!

I do have other issues with the way things are brought in, but those I mentioned are at the top of my list.

Your doing a fantastic job with this tool and it is a far scream from where it was when I first started watching the development. I only wish I had your programming skill and the Valve Model knowledge you do to create an add-on like this.

Regards, Pte Jack!

Oh, on closing, another "simply cosmetic" thing you you might want to check is on some of your "Import" buttons, what are the label names they're using (wink-wink, nudge-nudge, chuckle)

Would like to participate

Hi,
I would like to compile some files to add macOS support. Would you be so kind to tell me, which libraries/modules you compiled to the PySourceIOUtils.so/PySourceIOUtils.pyd archive?

I already compiled the VTFLib13 for macos and the PySourceIOUtils is the only thing missing to successfully run SourceIO on macOS.

3.5.4 is not working

The version 3.5.4 is not installing correctly, it doesn't show up on blender.....

Importing VTF - System Error: 0x00000002: The system cannot find the file specified.

Blender 2.80 Beta [ Date: 2019-03-17 Hash: 9099305771ec ]
SourceIO v3.4.0 - b052680
Model Used (NSFW): https://sfmlab.com/item/2711/

MDL imported successfully.
Afterwards, I selected all VTF textures and imported them successfully.

I don't know how to import VMT, so I skipped it for now.

Then I clicked, File --> New --> General
This time I tried to import all VTF textures first before importing MDL, but then I got the error message below:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\__init__.py", line 92, in execute
    self.load_alpha, self.only_alpha)
  File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SourceIO\vtf\import_vtf.py", line 23, in import_texture
    vtf_lib.get_last_error()))
Exception: Failed to load texture :Error:
Error opening file.

System Error: 0x00000002:
The system cannot find the file specified.



location: <unknown location>:-1

I might be wrong, but I think I can avoid the error if I import the individual VTF textures 1 at a time.

OSError: libtxc_dxtn.so: cannot open shared object file

Blender v2.80 Official Release
Ubuntu Linux 64bit
SourceIO v3.5.1

Traceback (most recent call last):
  File "/home/user/Downloads/Blender/blender-2.80-linux-glibc217-x86_64/2.80/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO/__init__.py", line 15, in <module>
    from .vtf.blender_material import BlenderMaterial
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO/vtf/blender_material.py", line 5, in <module>
    from ..vtf.import_vtf import import_texture
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO/vtf/import_vtf.py", line 6, in <module>
    from ..vtf.VTFWrapper import VTFLib
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO/vtf/VTFWrapper/VTFLib.py", line 40, in <module>
    class VTFLib:
  File "/home/user/.config/blender/2.80/scripts/addons/SourceIO/vtf/VTFWrapper/VTFLib.py", line 44, in VTFLib
    vtflib_cdll = cdll.LoadLibrary(os.path.join(full_path, vtf_lib_name))
  File "/home/user/Downloads/Blender/blender-2.80-linux-glibc217-x86_64/2.80/python/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
  File "/home/user/Downloads/Blender/blender-2.80-linux-glibc217-x86_64/2.80/python/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libtxc_dxtn.so: cannot open shared object file: No such file or directory

I believe this was mentioned here #13 (comment)
but I should have made it a separate issue earlier to reduce confusion.

Request: Return of Normalizing Bones

I used the normalize bones pretty often due to it being able to connect with one another, it would be pretty awesome to see this return for source1 in the near future as I use this as my go-to thing for porting. Thanks!

Update to python 3.8

I'm getting this error when trying to load latest version

PySourceIOTextureUtils import error
Traceback (most recent call last):
  File "/usr/share/blender/2.82/scripts/modules/addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "../blender/2.82/scripts/addons/SourceIO/__init__.py", line 28, in <module>
    from .source2.resouce_types.vmdl import Vmdl
  File "../blender/2.82/scripts/addons/SourceIO/source2/resouce_types/vmdl.py", line 10, in <module>
    from ..source2 import ValveFile
  File "../blender/2.82/scripts/addons/SourceIO/source2/source2.py", line 10, in <module>
    from .blocks import DataBlock
  File "../blender/2.82/scripts/addons/SourceIO/source2/blocks/__init__.py", line 6, in <module>
    from .texture_data_block import TextureBlock
  File "../blender/2.82/scripts/addons/SourceIO/source2/blocks/texture_data_block.py", line 8, in <module>
    from ..utils.PySourceIOUtils import *
ImportError: Python version mismatch: module was compiled for Python 3.7, but the interpreter version is incompatible: 3.8.2 (default, Apr  8 2020, 14:31:25) 
[GCC 9.3.0].

Model files do not appear when attempting to import

I am attempting to import models from HLA. I have tried to import both the .vmdl file and .vmdl_c file but neither of these show up inside of the directory. Is there some sort of prerequisite for the files to be compatible, or is it possible that these files are just not able to be imported at all? I feel like I'm missing something very simple with the import process. Model examples are below, any help would be greatly appreciated.

https://drive.google.com/open?id=1bOsAgm3ZNsXSpHCZBnAxj1Gd5c4DkKoW

Edit: I have attempted to use this with both Blender 2.82 and 2.80 with no luck so far.
Update: Got it working, just had the filtering turned on for the file names. I knew it would be a simple fix.

VMDL Does not work at all!

Yes, I get it's experimental atm and all but when I ripped the models from Alyx, i got .vmdl and not .vmdl_c, so now I cannot get the model to import because of this.

Import mdl > Normalize Bones: Root/Pelvis bone locked translation

When you import a model using Normalize, there is a potential for a weird thing in Blender.

What happens is no matter what you do, a bone's location can't change (moving/constraints/drivers/etc), and the solution isn't obvious

In order to fix it, you have to go into edit mode, then Alt+P > Clear Parent, to disable the Connected property of the bone.

When a bone has the use_connected property, it locks it to it's parent. Thing is, if the bone doesn't have a parent, it locks to nothing.
I would think Blender would notice it doesn't have a parent and move on but that's not the case.

This is the model I found this on:
https://sfmlab.com/item/3113/

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.