Half-Life Asset Manager Created 1 year ago2021-01-28 20:57:54 UTC by Solokiller Solokiller

Created 1 year ago2021-01-28 20:57:54 UTC by Solokiller Solokiller

Posted 1 year ago2021-01-28 20:57:54 UTC Post #345295
Half-Life Asset Manager V1.0.0 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.0.0

Half-Life Asset Manager is a replacement for Half-Life Model Viewer that allows you to open Half-Life 1 studio models and view them. Many properties of models can be edited, including textures, bone controllers, events and much more.

The changelog is far too big to list here, so just check the wiki page linked in the releases page.

Half-Life Model Viewer 2.10 has also been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLMV-V2.10
Changes:
  • Fix bodyparts submodel defaulting to first submodel when changing selected body part instead of using the current submodel for that part
  • Add check to prevent models with invalid length value from crashing the program
  • Use higher resolution program icon (128x128 instead of 32x32)
This is likely the last release for Half-Life Model Viewer. It has been superseded by Half-Life Asset Manager and is only supported for those who cannot use HLAM.
Posted 1 year ago2021-03-19 15:07:51 UTC Post #345457
I've got a new alpha build for HLAM: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.1.0-alpha005
Changes:
  • Studio model data is now converted to a format that can be easily edited (note: data not part of the studiomodel format and data in the format not used by vanilla Half-Life is not saved and will be lost on save)
  • Sequence groups and textures are now automatically merged into the main model file on save
  • Fixed StudioModelEntity::SetMouth not checking if a mouth controller actually exists
  • Improved UI functionality for changing which bone and axis a bone controller is attached to. Changing the settings now automatically detaches any controllers attached to target bone and axis
  • Added controls to the Bones panel to view and change the bone controllers attached to a bone
The purpose of this alpha is to verify that everything's still working properly. Once i'm sure i can start adding new features like add/remove events, import textures with different dimensions, etc.
Posted 1 year ago2021-03-30 18:48:30 UTC Post #345490
Half-Life Asset Manager V1.1.0 Beta 001 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.1.0-beta001
Changes:
  • Fixed attachments and hitboxes panels causing invalid access if there are no attachments/hitboxes and a bone is renamed
  • Added dialog shown when a non-existent file is opened (e.g. deleted asset listed in recent files list)
  • Enabled backface culling when drawing floor quad used to limit mirrored model draw region (prevents drawing the mirrored model underneath the floor)
  • Saved & restored state of cull face when drawing mirrored floor to prevent model from drawing on top of player hitbox model
  • Imported textures can now have dimensions that differ from the original texture. ST coordinates will be rescaled to match the new size, but this may result in slight offsets in the coordinates in some cases (note: undo/redo requires a fair amount of memory to support this (4 bytes per vertex in every mesh that uses the texture), can easily get out of control)
  • Reworked Sequences panel UI to limit maximum width
  • Implemented support for addition and removal of sequence events
    • Events are now sorted when saved to ensure that the game's event code finds newly added events properly
  • Reworked Model Data panel UI to limit maximum width
  • Added Git information to the About dialog
Posted 1 year ago2021-04-03 14:13:31 UTC Post #345496
Half-Life Asset Manager V1.1.0 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.1.0
Notable changes:
  • Implemented Bounding Box and Clipping Box modification support
  • Implemented option to switch to Counter-Strike style sequence animation blending
  • Studio model data is now converted to a format that can be easily edited (note: data not part of the studiomodel format and data in the format not used by vanilla Half-Life is not saved and will be lost on save)
  • Sequence groups and textures are now automatically merged into the main model file on save
  • Imported textures can now have dimensions that differ from the original texture. ST coordinates will be rescaled to match the new size, but this may result in slight offsets in the coordinates in some cases (note: undo/redo requires a fair amount of memory to support this (4 bytes per vertex in every mesh that uses the texture), can easily get out of control)
  • Implemented support for addition and removal of sequence events (Events are now sorted when saved to ensure that the game's event code finds newly added events properly)
Posted 1 year ago2021-07-22 20:47:17 UTC Post #345798
Half-Life Asset Manager V1.2.0 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.2.0

Notable changes:
  • Fixed performance issue causing FPS drops
  • Added checks to prevent opening files currently being written to by the studiomdl compiler
  • Added button to flip normals
  • Implemented CTRL+W to close asset feature
  • Implemented F5 to refresh feature
Posted 1 year ago2021-07-29 14:32:09 UTC Post #345812
Half-Life Asset Manager V1.3.0 Beta 001 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.3.0-beta001

Notable changes:
  • The user interface has been redesigned to use dock panels. This allows you to move panels around in the tab bar, and more importantly move the panels to other sides of the window, as well as float them. All panels have been optimized to reduce their width and height in horizontal and vertical layout mode. It is possible that some dock panel layout combinations can lead to incorrect window and dock area sizes, this is due to the size of the panels. To fix this resize the window (minimizing and maximizing) or move the panels.
  • All dock panels can be closed and toggled through both the Asset->Panels menu as well as by right clicking in the tab bar region of any docked panels.
  • Added new panel Transformation: this lets you move the model like the old Origin edit widget, scale it like the old Scale Mesh and Scale Bones widgets (now combined with checkboxes to control behavior) and rotate it, though rotation may not always work correctly due to how model data is stored internally
  • Added new panel Scene: this lets you modify the objects that exist in the scene. The buttons to move the model object that used to be part of Model Display have been moved here, along with a new Origin edit widget (this does not modify the actual model data). The ground and background features are now centralized here: the checkboxes to toggle them have been moved here, the texture selection feature is now here as a line edit and updates the texture in real-time, and selecting a texture automatically shows them. The ground origin can now be modified, though this does not work properly when used with Mirror On Ground because mirroring is done using a hack instead of proper mirroring.
  • Added unanimated pose (the skeleton as defined in a modeling program) as reference_mesh sequence
  • The program will now remember which screen it was last opened on and will open on that screen
  • Textures are now drawn on a separate view that can be selected through a tab bar to the right of the FPS and drawn polygons counters. By default selecting the Textures panel will also switch the view to Textures, but this behavior can be disabled in the Options dialog. This allows you to view the 3D model while editing texture properties. Note that textures are no longer drawn using OpenGL, so filtering settings will not affect this view.
This is a beta release intended to gather feedback and to test for bugs.
Posted 1 year ago2021-07-30 10:47:13 UTC Post #345814
May I suggest two features:
  • Adding an option for switching between an orthographic projection and a perspective projection for the 3D view.
  • A predetermined perfect top, front, right side, etc. model projection views, that can freely morph into a free rotating/zooming/roaming afterwards.
I was in a big need for such features, while I was modeling for goldsource and none of the goldsource model viewers had them.
Other programs that can read .mdl files had them, but they lacked other much needed basic goldsource model viewer features at the same time.
Excuse me, if this is not the right place to post requests.
Thanks in advance!
Posted 1 year ago2021-07-30 12:34:04 UTC Post #345819
You can always ask here, on Github or on Discord. Anywhere's fine.

I've added the first suggestion as a feature marked for 2.0.0: https://github.com/Solokiller/HL_Tools/issues/190

For the second one, you want to place the camera on a specific axis facing the model and then be able to switch between any camera mode (aside from first person view) while still having the original camera origin and angles?
Posted 1 year ago2021-07-31 10:46:44 UTC Post #345826
[... you want to place the camera on a specific axis facing the model ...]
Initialy, my idea was adding an options/choises for placing the camera on the +X -X +Y -Y +Z -Z axises, and the camera to point perfectly perpendicular at the zeroes/crossing of the other two axises, that make a perpendicular plane to the camera axis. The distance betwen the camera and the other two axises can be automated, so the whole model is viewable, no model parts going out of the 3D view planel, or even better, it can be added an option to select that distance by number, or the user sliding along the axis (which means practicaly: zoom in and out), so a user can keep it constant when rotating around the model, which is more convinient if you ask me.

But then I realized, that it will be way way better if there is an option for switching between the proposed above and this:
Imagine the model have a perfect geometry center (center of mass). Imagine all 3 axises cross at this center instead of 0. Now if place the camera on any of this new "center of mass axises", the user will see the model better, because the "axises that cross at 0" are usually way way under the model compared to "center of mass axises". Everything else stays the same as above.

[... and then be able to switch between any camera mode (aside from first person view) while still having the original camera origin and angles ...]
No. I only suggest, that after placing the camera on an axis as described above, the user can move/rotate/zoom/roam it freely like usually/before from that axes position (go away from that axis). I just mean, that the view/camera shouldn't stay locked on the axis until explicitly other predetermined camera position is selected.

This is just a basic predetermined top, front, right side, etc. scene view in most programs. Goldsource model viewers just only have: start from only one option - center view (front view) and then you "free roam" around the model.

Aside from that, is Windows XP 32 SP3 build for HLAM even possible?

Sorry for suggesting a thousand things :)
Posted 1 year ago2021-07-31 11:57:24 UTC Post #345827
Initialy, my idea was adding an options/choises for placing the camera on the +X -X +Y -Y +Z -Z axises, and the camera to point perfectly perpendicular at the zeroes/crossing of the other two axises, that make a perpendicular plane to the camera axis. The distance betwen the camera and the other two axises can be automated, so the whole model is viewable, no model parts going out of the 3D view planel, or even better, it can be added an option to select that distance by number, or the user sliding along the axis (which means practicaly: zoom in and out), so a user can keep it constant when rotating around the model, which is more convinient if you ask me.
Most of that is already possible. The camera is currently always placed on the +X axis facing back to the model, positioned far enough away to show the entire model, up to a certain maximum size because there are some really large models out there (e.g. Natural Selection has some map-sized models). You can move the camera along the camera forward axis using the scroll wheel or right click+drag. The distance can be set explicitly through the Cameras panel. The Arc Ball camera maintains its distance while rotating around the model.

I can add buttons to place the camera on a specific axis to let you easily change viewpoints. I've added a new issue to track this: https://github.com/Solokiller/HL_Tools/issues/191
But then I realized, that it will be way way better if there is an option for switching between the proposed above and this:
Imagine the model have a perfect geometry center (center of mass). Imagine all 3 axises cross at this center instead of 0. Now if place the camera on any of this new "center of mass axises", the user will see the model better, because the "axises that cross at 0" are usually way way under the model compared to "center of mass axises". Everything else stays the same as above.
This is already the case. The current sequence's bounding box is used to get the center of the model, the camera is positioned at the middle point of that box. The Arc Ball camera rotates around this point. The point doesn't update when you change sequences. Asset->Center View will use the current sequence to re-center the camera so you can use that to get a sequence-specific position.
No. I only suggest, that after placing the camera on an axis as described above, the user can move/rotate/zoom/roam it freely like usually/before from that axes position (go away from that axis). I just mean, that the view/camera shouldn't stay locked on the axis until explicitly other predetermined camera position is selected.
This is the current behavior.
This is just a basic predetermined top, front, right side, etc. scene view in most programs. Goldsource model viewers just only have: start from only one option - center view (front view) and then you "free roam" around the model.
There are 3 camera modes in HLAM, 2 of which were also in HLMV:
  • Arc Ball (called Free View in HLMV) which rotates around the model (around the origin point in HLMV)
  • First Person
  • Free View (HLAM only, works like noclipping in-game in letting you fly freely around the scene)
Aside from that, is Windows XP 32 SP3 build for HLAM even possible?
No, Qt dropped support for XP after Qt 5.6. HLAM uses 5.15 and depends on certain features that were added after 5.6's release. 5.6 isn't available for download through Qt's maintenance tool anymore, though i did find a download link on their website but i don't know if that's a usable build.

Qt 6 drops support for anything older than Windows 10, so support isn't coming back on that end. Microsoft dropped support for XP starting with Visual Studio 2019's toolset, which means if you want to use C++20 you can't support XP. Supporting XP just isn't feasible anymore because of this.
Posted 1 year ago2021-08-01 17:13:45 UTC Post #345831
Half-Life Asset Manager V1.3.0 Beta 002 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.3.0-beta002

Changes:
  • Made OpenGL version check non-fatal, made it into a one off warning instead (It may be possible to run HLAM 1.x with OpenGL 1 only, but this requires testing)
  • Added actions to place camera on positive or negative X/Y/Z axis
  • Added more checkboxes to Scale mode:
    • Separated Scale Meshes into Scale Meshes, Scale Hitboxes and Scale Sequence BBoxes
    • Added Scale Eye Position and Scale Attachments
Posted 1 year ago2021-08-05 11:32:38 UTC Post #345849
I checked to see if i could build HLAM with Qt 5.6 to make a Windows XP compatible build, it's not possible. The new features being used are required to make everything work properly, there is no replacement for some of them.

I did change the OpenGL version setting so if you're using an OpenGL 2.1 GPU you should be able to run the program now if you're on Vista or newer (Vista has a minimum requirement of an OpenGL 2.1 GPU).

Beta 003 is out: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.3.0-beta003

Bug Fixes
  • Fixed Body Parts panel not showing body, submodel, skin if there are no controllers in model
  • Fixed mirror on axis not always mirroring on the correct axis
  • Fixed cancelling program close with unsaved asset causing crash
UI Changes
  • Changed OpenGL version to 1.0
Project Changes
  • Reworked matrix calculations to be consistent
Posted 1 year ago2021-08-07 11:10:37 UTC Post #345861
Half-Life Asset Manager now has a GameBanana page: https://gamebanana.com/tools/7311
Posted 11 months ago2021-08-13 19:24:32 UTC Post #345877
I've created ModDB file entries for both Half-Life Model Viewer 2.10 and Half-Life Asset Manager 1.2.0:
https://www.moddb.com/games/half-life/downloads/half-life-model-viewer-210
https://www.moddb.com/games/half-life/downloads/half-life-asset-manager-1-2-0

V1.3.0 is undergoing final testing and should be ready to release this weekend.
Posted 11 months ago2021-08-18 01:50:59 UTC Post #345886
Congrats on the release of these fancy tools. They're indeed a huge improvement over the classic versions. Thank you Solokiller.
How's it going on your SDK Frontline? Hl1,Op4,BS ? :)
Posted 11 months ago2021-08-18 09:14:49 UTC Post #345887
They're all in beta. Once V1.3.0 is out i'm going to merge in a pull request that's been sitting on the main updated repo, and fix an issue with the CMake version (an include path on the wrong CMake target, not a big deal but still wrong).

Since EHL ended up being so much bigger than i anticipated i want to merge the three updated repos together to make something that's easier to work with. Mostly cleaning up Gearbox's code for HUD colors and the mass of code duplication in the NPC code. Beyond that EHL has large updates waiting to be completed, there's not much to say about that right now.

I'm planning to get back to work on HLAM after the merge project is done so i can switch it to using OpenGL shaders. I've been trying to fix OpenGL support for old and integrated GPUs, some devices don't support OpenGL 2.1 while being capable of running shaders just fine due to poor driver support, so i've been looking into how to get Qt's ANGLE and software renderers to work. I've found that ANGLE works only with OpenGL 2.0, i'm guessing because it's interpreting the version number as OpenGL ES 2.0 (the embedded version of the API), so once shaders are in place i can try to get that working.

ANGLE will allow users to run the program even without OpenGL 2.1 support because it can use DirectX under the hood and integrated GPUs do support that properly. And the software renderer might work as well but that i haven't tested yet.

Once that's done i can release HLAM 2.0.0, and following that see what's next to be done. V1.3.0 is getting a bit more work right now to hopefully fix a crash on shutdown that some users are experiencing, i've fixed a memory leak that might be related to that. I decided to take care of a bunch of legacy code that was due for refactoring and removal, so things are streamlined a bit more.

That's about it for now really, i just need to take a good look around the codebase for any problems i can find so i can get everything working smoothly.
Posted 11 months ago2021-08-18 18:33:40 UTC Post #345888
Sounds wonderful as usual I wish you best of luck. :cyclops:
Posted 11 months ago2021-08-20 18:14:22 UTC Post #345889
Half-Life Asset Manager V1.3.0 has been released: https://github.com/Solokiller/HL_Tools/releases/tag/HLAM-V1.3.0
New User InterfaceNew User Interface
This release marks the first major update to the user interface. The existing tab-based panels have been redesigned to be dockable, which allows you to move them around to other sides of the window, put them side by side (assuming there is enough space), and even float them on top of the window. You can also close panels and open them again through the Asset->Panels menu or by right clicking in the tab area of a docked panel.

All dock panels are designed to lay themselves out both horizontally and vertically to minimize their size when docked and floated. Some panels are quite large so docking them may block other panels from being docked if there is not enough space to shift the user interface around.

Several new panels have been added: the Transformation panel works much like Hammer's Transform dialog in that it allows you to rotate, move and scale the model. Rotation is still a bit buggy when models have multiple root bones (e.g. sat_globe.mdl's satellites) but it works well enough otherwise.

Scaling now has options to control which parts of the model to scale, including both data that was previously scaled along with meshes such as hitboxes, as well as data such as the eye position which previously wasn't scaled.

The Scene panel is now where settings affecting only the objects in the 3D scene in Asset Manager reside. Here you can change the position of the object that the model is attached to, as well as control visibility of the ground and background. You can now move the ground object (e.g. move it to -36 on the Z axis to match the feet position of player models).

Note however that mirroring will not work with the ground moved up or down, this is slated to be fixed in HLAM 2.0.0. Both the ground and background will now automatically be made visible if you select a texture. Changing the filename will also try to change the texture in real-time. It is also possible to enable texture tiling for the ground and choose the tiling size, specified in units. The ground texture will automatically shift depending on the current sequence's linear movement (used to control movement speed and direction in-game), allowing you to preview this information.

The Textures panel now behaves differently. Previously opening this tab would automatically switch to a texture view, this is now its own separate window accessible through a separate tab bar next to the drawn polygons count. By default the original synchronized opening behavior is enabled, but this can be disabled. You can now edit textures while viewing the model itself, which dramatically improves visual feedback when making changes to texture flags and color remapping.

For V1.3.0 only the Texture view is rendered using Qt's image rendering API instead of OpenGL, so texture filtering settings will not affect this view. HLAM 2.0.0 will re-implement OpenGL based rendering to return this functionality.

You can now view the Skeleton as defined in the reference mesh provided to the Studiomdl compiler. This is a combo box next to the new view tab bar, to the right of the drawn polygons count. This lets you see how the Skeleton is defined without any animations affecting it. The Sequences panel will be disabled in this pose because none of its settings can affect it. This pose is very useful when using the Transformation panel since changes to the model are applied to the skeleton data and not the animation data.

You can refresh the model at any time by pressing F5 or by using Tools->Refresh. This reloads the model if possible and tries to restore the user interface to match as closely as possible the previous state. It is possible for the model being reloaded to be in an incomplete state if it is being recompiled (Studiomdl writes directly to the file which can be slow enough to cause race conditions). Asset Manager tries to make sure this won't load the model by trying to obtain an exclusive lock on the file but there may be cases where this can still happen.

Several memory leaks have been fixed, the object that the model is attached to used to be leaked and GPU texture memory was being leaked when the model is refreshed. Application shutdown now frees more memory to help avoid leaking state.

The OpenGL version check has been changed to be non-fatal, and checks for OpenGL 2.1 now instead of 3.0. Most program features should work for users running with OpenGL 2.1, except for texture mipmaps which relies on a 3.0 feature.

HLAM 2.0.0 is slated to get an upgrade to all of the OpenGL code to use shaders instead of immediate mode. This will improve performance and make future graphical features easier to implement and maintain. Additionally the GLEW dependency will be removed (since it only works with desktop OpenGL) and (assuming it works) Google's ANGLE will be used to provide support for users with OpenGL versions below 2.1. ANGLE provides OpenGL implementations that use DirectX under the hood. Users running on older systems (typically Windows 7 with integrated graphics cards) should be able to use all of Asset Manager's features through ANGLE once it has been upgraded, but this will require testing to verify.

This will ensure anybody running Windows 7 or newer can use Asset Manager.

After 2.0.0 has been finished the next update will include more user interface improvements. It's too early to go into detail on those, but the changes are largely based on user feedback, so if you have any suggestions or improvements i'd love to hear about them!

You can always create an issue on Github, post in the TWHL thread, post in the Knockout thread, or message me on Discord on TWHL's Discord server.
Posted 11 months ago2021-08-25 16:44:44 UTC Post #345893
Awesome!!
Posted 11 months ago2021-08-25 19:42:28 UTC Post #345894
Keep the gravy train rolling Solokiller.
Stojke Stojkeunreal
Posted 11 months ago2021-09-05 12:13:30 UTC Post #345922
Half-Life Model Viewer 2.11 has been released: https://github.com/SamVanheer/HL_Tools/releases/tag/HLMV-V2.11

This update is aimed at fixing Windows XP support. It is recommended that you use Asset Manager if your system supports it.

Changes:
  • Removed unnecessary filesystem path canonicalization (broken on Windows XP)
  • Disabled "correct sequence group filenames" feature on Windows XP (does not work due to non-functional filesystem support)
  • Disabled depth writing instead of clearing depth buffer bit so the OpenGL window isn't black in Textures mode
  • Recompiled HLMV using Visual Studio 2017 to ensure the program works on Windows XP
  • Bundled the latest Visual C++ redistributable (16.7) that works properly on Windows XP so users can run the program properly
Note for Windows XP users: do not install Visual C++ redistributables newer than version 16.7 (file version 14.27.29114.0). Newer redistributables will install a runtime that does not work on Windows XP and will break programs that rely on it. If you have one installed it is recommended to uninstall it.
Posted 5 months ago2022-02-27 22:26:46 UTC Post #346300
Hi Solo I'm trying to switch from Jed's Half-Life Model viewer to your superior Asset Manager.

Could you explain to me how to properly set up your tool?
I'm struggling to compile models with your tool.

What .exe in program path do you expect me to link there? That of Half-Life1 ?
Could you tell me a bit of the proper default features that should be enabled/disabled when compiling for an intended use in Gold Source?

Thank you in advance.
Posted 5 months ago2022-02-28 19:09:03 UTC Post #346303
The executable to use for compiling is whatever studiomdl.exe you want to use. This tutorial covers everything about compiling including the studiomdl to use: https://www.the303.org/tutorials/gold_mdl.htm

The default textures thing is a feature in studiomdl that lets you replace textures specified in the mesh smd, you can ignore that if you don't need it. I doubt anybody ever actually uses that feature anyway (it's also buggy).

I'd recommend using Crowbar if you want a proper GUI for compiling models. The GUI i made is a thin wrapper around vanilla studiomdl provided so people can use it through this tool if needed. Crowbar on the other hand is a purpose-built tool made to compile models and do all sorts of stuff.

Here's the website for Crowbar: https://steamcommunity.com/groups/CrowbarTool

You can find more tutorials on that website as well.

I'll probably expand on the compiler front-end at some point, but since Crowbar already does everything very well there's no pressing need right now.
Posted 3 months ago2022-04-23 21:07:38 UTC Post #346470
Hey can you help me when i open Half-Life Asset Manager it says "Couldnt create OpenGL context"
Posted 3 months ago2022-04-25 13:12:19 UTC Post #346472
That error means your computer doesn't support the version of OpenGL that's needed to run the program.

The planned changes for 2.0.0 might solve this problem for you and a few others that have had this error, but i can't guarantee that. I can't give an ETA on when the next version will be out, but i'll try to get this done soon.
Posted 3 weeks ago2022-07-17 12:45:17 UTC Post #346730

Status update on Half-Life Asset Manager

I've decided to write this update to address a few things now since development on the Unified SDK is taking a bit longer than i expected.

TL;DR: Windows 7 will remain as the minimum requirement for the foreseeable future, but this will eventually change to Windows 10. The minimum OpenGL version will eventually change to 3.3, and the Android version has been cancelled.

Ongoing development

I've reworked the project's dependencies to use vcpkg or Git submodules to acquire them all. Only Qt5 requires a separate installation now, handled using Qt's maintenance tool. Vcpkg downloads, builds and installs dependencies during the CMake configure stage which is about the best way to handle C++ dependencies these days (though far from ideal).

Continuous integration has been configured for Windows and produces a usable installation. This is intended to be used for testing only, not for actual use. Since these are dev builds they tend to be unstable and buggy.

This work gets us closer to a working Linux version, but i want to wait to make a Linux version until i've sorted out some other things. I don't know if there's anything else needed to get it working, but since Qt uses OpenGL 3 internally and the program itself uses OpenGL 1.1 there may be graphical issues i'm not aware of. Waiting to make a Linux version until after the switch to shaders might make it easier.

Minimum requirements

I've been looking into the best way to handle changes that involve changing system requirements. Specifically, the minimum version of Windows and OpenGL required to run the program.

Currently you need Windows 7 or newer (32 or 64 bit) to run this program. This requirement is imposed by the Graphical User Interface (GUI) framework used: Qt5.

Since Qt5.7 Windows 7 is the minimum supported version. Qt5.6 was the last version to support Windows XP and Vista. 5.6 was a Long Term Supported (LTS) release which means it received support (bug fixes) for 3 years after release. It was released in Q1 2016 which means support ended in Q1 2019. Backporting HLAM to 5.6 proved too complicated since the program uses features added in newer versions.

HLAM currently uses Qt5.15.2 which is also an LTS release. It released in Q2 2020 so it will be supported until Q2 2023. Support is available only for commercial licensees (HLAM uses the free license). Starting with version 5.15.3 you need a commercial license to use patch versions for this release.

To get support HLAM would need to upgrade to Qt6. Any bugs that prevent the program's intended operation will require that. So far there haven't been any of those (and i doubt there will be), but it is possible that a game-breaker bug will show up in the future.

Qt6 dropped support for Windows 7 and 8.1. There also aren't any 32 bit Qt binaries available although they can be manually built if needed. If an upgrade to Qt6 is required then the program will also be upgraded to 64 bit at the same time if it hasn't already been done by that time.

I'm holding off on switching to 64 bit only because i don't know if there are users that need a 32 bit version. There is no real advantage to switching to 64 bit at this time so supporting 2 versions is unnecessary. If nobody needs a 32 bit version then i can switch to 64 bit at any time.

Additionally, Microsoft has been dropping support across the board for Windows XP and Vista the past few years:

With Visual Studio 2015 they introduced the XP toolset, required to make programs that can run on XP.
Visual Studio 2017 was the last version to provide this toolset.
The Visual C++ re-distributable no longer provides an XP-compatible runtime. Support was removed last year because the certificate used to sign the redist was not renewed. The re-distributable will still install but programs that use it will fail to launch.

Visual Studio 2022 dropped support for targeting Windows Vista. Accordingly, Microsoft's standard library removed support for Vista just a few weeks ago. These changes will make their way to the re-distributable soon, so i'd expect it to stop working on Vista as well.

VS 2022 also can't be installed on Windows 7 and 8.1 anymore. This is a prelude to targeting support being dropped, but that's probably half a decade away.

It is still possible to target Vista by using the 2019 toolset and XP by using the 2017 toolset, but these toolsets are no longer supported and don't support newer versions of C++. In time it will become necessary to choose between using newer language and library features or supporting older platforms.

This is already a problem for XP: the C++17 filesystem API is not fully supported on XP. Half-Life Model Viewer 2 broke as a result. I had to remove some code and disable a feature on XP to get it working again.

Many C++ libraries already dropped support for XP and Vista well before Microsoft ended support themselves. Qt5.7 released in mid 2016, Chromium removed support at around the same time.

Any programs that use these libraries had to drop support to upgrade. This is why Steam dropped support for XP and Vista a few years back. Electron based programs use Chromium under the hood so they have to do this as well. Due to how often exploits are found in Chromium not updating can be a real danger to users.

Although there are places where you can find versions of these libraries that work on XP and Vista they are largely unsupported, closed source hacks. The risk of unofficial binaries containing malware is serious enough to discourage the use of them across the board.

The Dolphin emulator project recently dropped support for Windows 7 and 8.1. They explained their reasons for doing so quite well, and the same reasons apply to XP and Vista support. You can read their blog post for more information: https://dolphin-emu.org/blog/2022/06/09/leaving-a-legend/

I don't plan to drop support for Windows 7 and 8.1 at this time, but support for those platforms will eventually end. Newer versions of HLAM will not support it, while older versions will remain available to users on those platforms.

This covers Windows version support. OpenGL is a bit different.

Continued in next post ==>
Posted 3 weeks ago2022-07-17 12:45:25 UTC Post #346731
<== Continued from previous post

OpenGL requirements

HLAM's user code currently uses OpenGL 1.1, typically referred to as immediate mode. Pretty much anyone using a graphics card made this century can run it, though performance may vary. Qt5 uses OpenGL 3 features but they are optional.

Qt itself uses OpenGL through an abstraction layer that exposes the OpenGL ES (OpenGL for Embedded Systems, aka mobile devices) 2 and 3 APIs.

This abstraction has multiple implementations. By default Qt tries to pick an OpenGL implementation that provides the most complete support. If your driver supports OpenGL 3 then it will use desktop OpenGL. Otherwise it will fall back to using Google's ANGLE library to provide support, which means it may use Direct3D under the hood. It's also possible to use a Software implementation.

HLAM's user code (model rendering code) doesn't use Qt's API for OpenGL rendering. It instead uses a library called GLEW (OpenGL Extension Wrangler). This library works only with desktop OpenGL, which means HLAM requires the use of desktop OpenGL.

The use of this library caused some problems because some users have a graphics card that doesn't support OpenGL well enough, causing Qt to use ANGLE instead of desktop OpenGL which broke things.

HLAM currently forces the use of desktop OpenGL. I plan to remove GLEW and rely on Qt's API for OpenGL to allow the use of ANGLE which should ensure maximum compatibility.

Independently of this change i will also be rewriting the graphics code to use modern OpenGL (using shaders, retained mode). This means the minimum requirement will be OpenGL 3.3.

Although OpenGL 3.3 was released in 2010 the first graphics cards to support it were released in 2007: Intel integrated cards lagged behind, the first card to support 3.3 and newer on Windows was released in 2012: https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units#Gen7

Requiring OpenGL 3.3 means you'll need a graphics card made in the last 15 years. To put that into perspective, it's like requiring a Voodoo 3 card in 2014: https://en.wikipedia.org/wiki/Voodoo3#Models

Because there are some users whose systems don't support OpenGL 3.3 i will hold off on making that change until i've done a bunch of other work first. There is a lot of refactoring, user interface and bug fixing work that needs doing so i'll do that first. I'll leave the switch to shaders until after that point.

Unfortunately it is not possible to support both versions of OpenGL. Immediate mode and retained mode are very different in how they work. I've also looked into supporting OpenGL 2.0 as a fallback, but the differences between that and 3.3 are significant enough that supporting both at once is a very complicated task.

As with Windows i don't want to raise the system requirements, but the use of immediate mode makes adding features that require graphics support more difficult. Performance issues on newer cards that don't support immediate mode well are also an issue, and the use of such an old API can cause the driver to switch to less efficient ways of handling things behind the scenes (which is one of the reasons why Vulkan exists).

OpenGL 3.2 added the concept of core and compatibility contexts. Compatibility contexts allow the use of immediate mode while core contexts do not. I expect that immediate mode and everything that interacts with it will suffer from performance issues, now or in the future. OpenGL 2.0 shaders were built on top of immediate mode, so i expect that to run into problems as well at some point.

I want to make sure this program continues to function correctly and efficiently for a long time, so using OpenGL 3.3 is the best option here, at least for the foreseeable future.

Qt6 introduced a new API called QRhi (in preview in Qt5, and some of the tools are restrictive in license) that allows you to switch between OpenGL 3, OpenGL ES 2, D3D11 and Vulkan. If and when HLAM upgrades to Qt6 this API could be used to allow users to pick the backend that performs best. Hopefully this would also allow users to sidestep issues with APIs no longer being fully supported.

I'm not planning to do this at this time since it requires Qt6. The licensing seems to have changed, but only for Qt6.3 onwards. It's something to keep in mind for the future. I expect that the amount of work won't be anywhere near the amount required for the move from immediate mode to shaders since QRhi supports OpenGL 3 and uses cross-compiling to convert shaders.

Android version

There have been a few requests for an Android version. I've said in the past that an Android version would require at minimum a working Linux version and shaders. I've looked into this further to determine whether is it viable to provide an Android version.

Making a native program work on Android requires the use of a Java wrapper. This is mostly automated for Qt CMake projects from what i've found so it shouldn't be a problem, but it does add some complexity.

HLAM depends on third party libraries. These have to be available on Android for the program to work. Qt5 supports Android and OpenAL-Soft provides Android support, though it appears it has to be built manually.

A recent issue seems to have popped up that makes targeting newer versions of Android (Android 11, released almost 2 years ago) more difficult when using Qt: https://bugreports.qt.io/browse/QTBUG-91255
Since Qt5.15 is no longer supported for non-commercial licensees this is possibly a deal-breaker. Qt6 would be required for HLAM to target newer Android versions.

HLAM is designed for use in desktop environments. Android requires a completely new user interface to rely on touch-screen input. I doubt it will be possible to provide the entire interface.

I suspect all users requesting an Android version are doing so because they are playing Half-Life using Xash for Android. Xash uses a slightly modified version of the Studiomodel format that makes it incompatible with HLAM. HLAM loads models and converts them to allow them to be edited. Since Xash re-purposes unused data this causes the program to crash.

My solution for this will be to add a means of detecting this format and forwarding users to Paranoia 2 Model Viewer if they have it installed and HLAM is configured to know of its location. In the long term, if and when a plugin system is added it may be possible to load these models in HLAM directly but that's not possible at this time because Xash is GPL-licensed, which would require HLAM to also be GPL-licensed.

HLAM still uses Half-Life SDK code (slowly getting refactored out, almost all of the remaining code will be replaced with the shader update) and is intended to be MIT licensed (which i need to sort out as well), so Xash's code can't be used here. I'm not a lawyer, so i don't know under what conditions it is possible to use that code here. The research i've done is inconclusive about this.

Although Xash for Android requires the original game to be installed along with models that don't include the new data, there is no way to know just how many models use the unmodified format and how many don't. An Android version could be completely useless if a significant number of models can't be loaded.

I also don't have an Android tablet to work with, only a phone which limits my ability to develop and test such a version.

Lastly, there have been only a handful of these requests. Developing an Android version is a lot of work, and justifying it considering the small number of requests is difficult. There is a lot of work needed elsewhere such as adding support for other model formats and other asset types (hence the name) so an Android version would always keep getting pushed back.

I don't want to promise a feature that will never be made, so i've decided to cancel this version. I should've done this sooner but i expected to finish the Unified SDK a lot sooner. The delays ended up pushing this further back, which is why i've investigated it now to make a decision.

For Android users that want to view models on Android i'd recommend directing your requests to the Paranoia 2 Model Viewer developers. The GameBanana page has links relevant to this: https://gamebanana.com/tools/6828

Near future

I'm still working on the Unified SDK so until V1.0.0 is done i won't be working on HLAM. It is getting closer to being finished so hopefully i can get things going soon.

See the Half-Life Updated thread for more information about that.
You must be logged in to post a response.