mirror of
https://github.com/Misterblue/convoar.git
synced 2026-08-14 00:57:55 +00:00
Some changes for specifying the output format.
Update the Assimp and AssimpNet binary files.
This commit is contained in:
+4
-1
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.13
|
||||
VisualStudioVersion = 15.0.27130.2003
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "convoar", "convoar\convoar.csproj", "{BD9942A1-315C-4961-B56A-D1770BED83B0}"
|
||||
EndProject
|
||||
@@ -25,4 +25,7 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {5A7B81A2-9EFD-4287-852D-38E31437A820}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -60,6 +60,22 @@ namespace org.herbal3d.convoar {
|
||||
}
|
||||
}
|
||||
|
||||
public Assimp.ExportFormatDescription[] GetExportFormatDescription() {
|
||||
return assimpContext.GetSupportedExportFormats();
|
||||
}
|
||||
|
||||
public string GetFileExtensionForFormat(string format) {
|
||||
string ret = String.Empty;
|
||||
Assimp.ExportFormatDescription[] formats = assimpContext.GetSupportedExportFormats();
|
||||
for (int ii = 0; ii < formats.Length; ii++) {
|
||||
if (String.Compare(formats[ii].FormatId, format, true) == 0) {
|
||||
ret = formats[ii].FileExtension;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Pass over everything in the scene and convert everything to AssimpNet structures.
|
||||
public Assimp.Scene ConvertBSceneToAssimpScene(BScene bScene, IAssetFetcher contextAssets, int imageSizeConstraint) {
|
||||
Assimp.Scene aScene = new Assimp.Scene();
|
||||
|
||||
+8
-1
@@ -55,6 +55,8 @@ namespace org.herbal3d.convoar {
|
||||
return @"Invocation:
|
||||
convoar
|
||||
-d directoryForOutputFiles
|
||||
--subregion <x,y,z>
|
||||
--exportFormat format
|
||||
--displacement <x,y,z>
|
||||
--rotation degrees
|
||||
--verbose
|
||||
@@ -302,7 +304,12 @@ convoar
|
||||
| Assimp.PostProcessSteps.None;
|
||||
assimp.Export(aScene, aScene.RootNode.Name + ".gltf2", "gltf2", postProcessingFlags);
|
||||
*/
|
||||
assimp.Export(aScene, aScene.RootNode.Name + ".gltf2", "gltf2");
|
||||
string exportFormat = Globals.parms.ExportFormat;
|
||||
Globals.log.DebugFormat("{0}: Doing Assimp export to format '{1}'", _logHeader, exportFormat);
|
||||
string ext = assimp.GetFileExtensionForFormat(exportFormat);
|
||||
assimp.Export(aScene, aScene.RootNode.Name + "." + ext, exportFormat);
|
||||
// assimp.Export(aScene, aScene.RootNode.Name + ".gltf2", "gltf2");
|
||||
Globals.log.DebugFormat("{0}: Export completed", _logHeader, exportFormat);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace org.herbal3d.convoar {
|
||||
public string ConvoarID; // GUID for 'convoar' identity (used for CreatorID, ...)
|
||||
public string Displacement;
|
||||
public string Rotation;
|
||||
public string SubRegion; // Bounds of a sub-region of the whole region that will be exported
|
||||
|
||||
// Optimizations
|
||||
public bool MergeStaticMeshes; // whether to merge meshes with similar materials
|
||||
@@ -64,6 +65,8 @@ namespace org.herbal3d.convoar {
|
||||
|
||||
// Assimp conversions
|
||||
public bool ExportAssimp; // use AssimpNet to convert and output files
|
||||
public string ExportFormat; // format to export the OAR file
|
||||
public bool ListExportFormats; // list the possible export formats
|
||||
|
||||
// Terrain processing
|
||||
public bool AddTerrainMesh; // whether to create and add a terrain mesh
|
||||
@@ -119,6 +122,8 @@ namespace org.herbal3d.convoar {
|
||||
null ),
|
||||
new ParameterDefn<string>("Rotation", "Optional rotation to add to OAR entites",
|
||||
null ),
|
||||
new ParameterDefn<string>("Subregion", "Bounds of subregion to export. Whole region if empty or null",
|
||||
null ),
|
||||
|
||||
// Optimizations
|
||||
new ParameterDefn<bool>("MergeStaticMeshes", "whether to merge meshes with similar materials",
|
||||
@@ -159,6 +164,10 @@ namespace org.herbal3d.convoar {
|
||||
// AssimpNet
|
||||
new ParameterDefn<bool>("ExportAssimp", "use AssimpNet to convert and output files",
|
||||
true),
|
||||
new ParameterDefn<string>("ExportFormat", "Format to export the region as",
|
||||
"gltf2"),
|
||||
new ParameterDefn<bool>("ListExportFormats", "List the possible export formats",
|
||||
false),
|
||||
|
||||
// Terrain processing
|
||||
new ParameterDefn<bool>("AddTerrainMesh", "whether to create and add a terrain mesh",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -23,7 +24,6 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
@@ -185,9 +185,13 @@
|
||||
<Compile Include="WebGLConstants.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include=".dockerignore">
|
||||
<DependentUpon>Dockerfile</DependentUpon>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="..\libs\openjpeg-dotnet.dll" CopyToOutputDirectory="Always" Visible="true" />
|
||||
<None Include="..\libs\openjpeg-dotnet-x86_64.dll" CopyToOutputDirectory="Always" Visible="true" />
|
||||
<None Include="Dockerfile" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
-10387
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+19
-14
@@ -1,20 +1,25 @@
|
||||
#! /bin/bash
|
||||
mkdir -p convoar
|
||||
cd convoar
|
||||
../../convoar/bin/Debug/convoar.exe ../testtest88.oar
|
||||
# format=collada
|
||||
format=gltf2
|
||||
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_00.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_01.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_02.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_10.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_11.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_12.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_20.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_21.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Atropia_22.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../IMAOutpostAlphaForest.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../IMAOutpostAlphaTerrain.oar
|
||||
../../convoar/bin/Debug/convoar.exe ../Region-3dworlds-20170604.oar
|
||||
cd convoar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_12.oar
|
||||
exit
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../testtest88.oar
|
||||
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_00.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_01.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_02.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_10.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_11.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_12.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_20.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_21.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Atropia_22.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../IMAOutpostAlphaForest.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../IMAOutpostAlphaTerrain.oar
|
||||
../../convoar/bin/Debug/convoar.exe --exportFormat $format ../Region-3dworlds-20170604.oar
|
||||
|
||||
rsync -r ../convoar basil@nyxx:basil-git/Basiljs/
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user