Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d271238
Fix automatic material generation causing materials to get shuffled up
LagoLunatic Mar 9, 2020
8cf7bbc
Show error if user has multiple meshes sharing a single material
LagoLunatic Apr 1, 2020
11668ed
Make texture paths in exported dae relative instead of absolute
LagoLunatic Apr 12, 2020
b6d6724
Fix importing relative texture path when no tex_headers.json specified
LagoLunatic May 3, 2020
403f00d
Make material display names in blender nicer looking
LagoLunatic May 3, 2020
b95bdfb
Merging Gamma's changes for Winditor
LagoLunatic May 3, 2020
9e8d3e5
Various project changes for winditor compatibility
LagoLunatic May 3, 2020
a776329
Update GameFormatReader
LagoLunatic May 3, 2020
565bef7
Make dependencies relative to solution dir for winditor compatibility
LagoLunatic May 3, 2020
02ef453
Fix GameFormatReader relative reference
LagoLunatic May 3, 2020
eda54a7
Fix bug when writing floats in rare cases
LagoLunatic May 31, 2020
b8fc4a9
Fix a var name
LagoLunatic Jul 9, 2020
0989d2a
Remove two post-dae-export hacks
LagoLunatic Jul 9, 2020
ddaf992
Fix how materials are handled to support AssimpNet 4.1.0
LagoLunatic Jul 9, 2020
c6ff9c3
Fix regression where texture paths were absolute instead of relative …
LagoLunatic Jul 23, 2020
ff799aa
Fix root joint being treated as the armature instead of a bone
LagoLunatic Aug 6, 2020
6745958
Fix root node not having its transformation set when converting bmd->dae
LagoLunatic Aug 7, 2020
1270281
Update .NET
LagoLunatic Aug 11, 2020
305f8b7
Update gameformatreader again
LagoLunatic Aug 12, 2020
a4ac99c
Fix misleading error message when dae has loose vertex/edge
LagoLunatic Sep 7, 2020
cc99a8a
Added support to Map Materials for transparency in textures + materia…
Sage-of-Mirrors Mar 17, 2021
815aefb
Added an error message when tex_headers has conflicting formats for a…
LagoLunatic Mar 25, 2021
241e0d8
Addded fog settings for map imports.
Sage-of-Mirrors Apr 1, 2021
97fd66d
Merge branch 'master' of https://github.com/LagoLunatic/SuperBMD
Sage-of-Mirrors Apr 1, 2021
9c18645
Fix not being able to read material names sanitized by Blender 2.79
LagoLunatic Nov 22, 2021
99ceef4
XFRegister tex matrix: Create enum instead of hardcoding reg value
LagoLunatic Jan 5, 2022
0ae2558
Duplicate vertex removal: Properly support vertex colors
LagoLunatic Apr 29, 2022
6e2fbae
Fix materials.json being dumped to input dir instead of output dir
LagoLunatic Apr 29, 2022
1c9a636
Fix red channel of vertex colors being imported from dae incorrectly
LagoLunatic Apr 29, 2022
fa884cf
BP/XF commands: Add sanity checks to avoid truncating bitfield values
LagoLunatic Jul 13, 2022
eee25f9
Fix some wrong bit sizes for SETTEXMTXINFO XF command
LagoLunatic Jul 13, 2022
e692c8b
Fix new error because LitMask was not being properly split into upper…
LagoLunatic Jul 13, 2022
2acf428
Add comments explaining attenuation functions
LagoLunatic Jul 13, 2022
87e94b7
Add GitHub actions builds workflow
LagoLunatic May 6, 2025
833583f
Update some action versions
LagoLunatic May 6, 2025
2f2b97f
Add missing OpenTK dlls
LagoLunatic May 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install nuget dependencies
run: nuget restore SuperBMD.sln
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build
run: msbuild SuperBMD.sln /t:Build /property:Configuration=Release
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: SuperBMD
path: SuperBMD\bin\Release\*
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "GameFormatReader"]
path = GameFormatReader
url = https://github.com/LagoLunatic/GameFormatReader.git
branch = master
1 change: 1 addition & 0 deletions GameFormatReader
Submodule GameFormatReader added at 62a940
18 changes: 16 additions & 2 deletions SuperBMD.sln
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
# Visual Studio Version 16
VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperBMDLib", "SuperBMDLib\SuperBMDLib.csproj", "{828BE5E5-9E98-46C9-B63E-D2D03322A825}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperBMD", "SuperBMD\SuperBMD.csproj", "{7349EE4E-A17C-4715-A5B4-07533D1DC701}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameFormatReader", "GameFormatReader\GameFormatReader\GameFormatReader.csproj", "{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -41,6 +43,18 @@ Global
{7349EE4E-A17C-4715-A5B4-07533D1DC701}.Release|x64.Build.0 = Release|Any CPU
{7349EE4E-A17C-4715-A5B4-07533D1DC701}.Release|x86.ActiveCfg = Release|Any CPU
{7349EE4E-A17C-4715-A5B4-07533D1DC701}.Release|x86.Build.0 = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|x64.ActiveCfg = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|x64.Build.0 = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|x86.ActiveCfg = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Debug|x86.Build.0 = Debug|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|Any CPU.Build.0 = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|x64.ActiveCfg = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|x64.Build.0 = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|x86.ActiveCfg = Release|Any CPU
{AFCE536D-92FF-4EE5-8536-731D2CD5FBCA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 3 additions & 3 deletions SuperBMD/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
</configuration>
5 changes: 3 additions & 2 deletions SuperBMD/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
using System.Threading;
using SuperBMDLib;

namespace SuperBMDLib
Expand All @@ -8,8 +9,8 @@ class Program
{
static void Main(string[] args)
{
// Prevents floats being written to the .dae with commas instead of periods on European systems.
CultureInfo.CurrentCulture = new CultureInfo("", false);
// Prevents issues with reading/writing floats on European systems.
Thread.CurrentThread.CurrentCulture = new CultureInfo("", false);

if (args.Length == 0 || args[0] == "-h" || args[0] == "--help")
{
Expand Down
11 changes: 6 additions & 5 deletions SuperBMD/SuperBMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
<OutputType>Exe</OutputType>
<RootNamespace>SuperBMD</RootNamespace>
<AssemblyName>SuperBMD</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -34,8 +35,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AssimpNet, Version=3.3.2.0, Culture=neutral, PublicKeyToken=3edc10cb77b1bca2, processorArchitecture=MSIL">
<HintPath>..\packages\AssimpNet.3.3.2\lib\net45\AssimpNet.dll</HintPath>
<Reference Include="AssimpNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=0d51b391f59f42a6, processorArchitecture=MSIL">
<HintPath>..\packages\AssimpNet.4.1.0\lib\net40\AssimpNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -61,11 +62,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\AssimpNet.3.3.2\build\AssimpNet.targets" Condition="Exists('..\packages\AssimpNet.3.3.2\build\AssimpNet.targets')" />
<Import Project="..\packages\AssimpNet.4.1.0\build\AssimpNet.targets" Condition="Exists('..\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\AssimpNet.3.3.2\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AssimpNet.3.3.2\build\AssimpNet.targets'))" />
<Error Condition="!Exists('..\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AssimpNet.4.1.0\build\AssimpNet.targets'))" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion SuperBMD/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AssimpNet" version="3.3.2" targetFramework="net461" />
<package id="AssimpNet" version="4.1.0" targetFramework="net45" />
</packages>
25 changes: 0 additions & 25 deletions SuperBMDLib/OpenTK.dll.config

This file was deleted.

12 changes: 6 additions & 6 deletions SuperBMDLib/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 40 additions & 14 deletions SuperBMDLib/SuperBMDLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>SuperBMD</RootNamespace>
<AssemblyName>SuperBMDLib</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
Expand All @@ -28,6 +28,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -52,28 +53,49 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="AssimpNet, Version=3.3.2.0, Culture=neutral, PublicKeyToken=3edc10cb77b1bca2, processorArchitecture=MSIL">
<HintPath>..\packages\AssimpNet.3.3.2\lib\net45\AssimpNet.dll</HintPath>
<Reference Include="AssimpNet, Version=4.1.0.0, Culture=neutral, PublicKeyToken=0d51b391f59f42a6, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\AssimpNet.4.1.0\lib\net40\AssimpNet.dll</HintPath>
</Reference>
<Reference Include="EndianBinaryStreams, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>lib\EndianBinaryStreams.dll</HintPath>
<Reference Include="DynamicData, Version=6.16.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\DynamicData.6.16.6\lib\net461\DynamicData.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.0.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.0.1\lib\net20\OpenTK.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SolutionDir)\lib\OpenTK.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=9.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.9.6.1\lib\net461\Splat.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Reactive, Version=4.4.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Reactive.4.4.1\lib\net46\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TgaLib, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\TgaLib.1.0.2\lib\net472\TgaLib.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\Resources.Designer.cs">
Expand Down Expand Up @@ -203,10 +225,14 @@
<Compile Include="source\Util\WrapModeUtility.cs" />
</ItemGroup>
<ItemGroup>
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\GameFormatReader\GameFormatReader\GameFormatReader.csproj">
<Project>{afce536d-92ff-4ee5-8536-731d2cd5fbca}</Project>
<Name>GameFormatReader</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
Expand All @@ -222,17 +248,17 @@
<ItemGroup>
<Content Include="lib\EndianBinaryStreams.dll" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="resources\default_checker.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\AssimpNet.3.3.2\build\AssimpNet.targets" Condition="Exists('..\packages\AssimpNet.3.3.2\build\AssimpNet.targets')" />
<Import Project="$(SolutionDir)\packages\AssimpNet.4.1.0\build\AssimpNet.targets" Condition="Exists('$(SolutionDir)\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\AssimpNet.3.3.2\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\AssimpNet.3.3.2\build\AssimpNet.targets'))" />
<Error Condition="!Exists('$(SolutionDir)\packages\AssimpNet.4.1.0\build\AssimpNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\AssimpNet.4.1.0\build\AssimpNet.targets'))" />
</Target>
</Project>
Binary file removed SuperBMDLib/lib/EndianBinaryStreams.dll
Binary file not shown.
13 changes: 9 additions & 4 deletions SuperBMDLib/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AssimpNet" version="3.3.2" targetFramework="net461" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
<package id="OpenTK" version="3.0.1" targetFramework="net461" />
<package id="TgaLib" version="1.0.1" targetFramework="net461" />
<package id="AssimpNet" version="4.1.0" targetFramework="net45" />
<package id="DynamicData" version="6.16.6" targetFramework="net472" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
<package id="Splat" version="9.6.1" targetFramework="net472" />
<package id="System.Reactive" version="4.4.1" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="TgaLib" version="1.0.2" targetFramework="net472" />
</packages>
5 changes: 5 additions & 0 deletions SuperBMDLib/source/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public struct Arguments
public string tristrip_mode;
public bool rotate_model;
public bool output_bdl;
public bool generate_map_materials;

/// <summary>
/// Initializes a new Arguments instance from the arguments passed in to SuperBMD.
Expand All @@ -29,6 +30,7 @@ public Arguments(string[] args)
tristrip_mode = "static";
rotate_model = false;
output_bdl = false;
generate_map_materials = false;

for (int i = 0; i < args.Length; i++)
{
Expand Down Expand Up @@ -82,6 +84,9 @@ public Arguments(string[] args)
case "--bdl":
output_bdl = true;
break;
case "-glm":
generate_map_materials = true;
break;
default:
throw new Exception($"Unknown parameter \"{ args[i] }\"");
}
Expand Down
Loading