Code Monkey home page Code Monkey logo

filetovox's People

Contributors

benmclean avatar eisenwave avatar zarbuz 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

filetovox's Issues

.xyz file results in smaller voxelized model

Hello,

I'm trying to convert a simple 3D model from a .xyz file to a .vox to be visualized with MagicaVoxel, however the starting model has 1380 voxels but the converted one 348.
palm_island.txt

This is the terminal window, am I doing something wrong?

palmisland_problem

.

Delete empty Chunks

Hello,

i know iam ask this some time ago, but i very need a function to clear empty chunks out of the .vox file, do you know how to do this? I wish this will be possible.

you FileToVox Program ist so great, it should be more populare!

greetings from germany.

Cant run on linux

Salut Zarbuz,

I am trying to run FileToVox on Linux mint 20 and I am running into a libgdiplus problem that is not related to the DLL issue you mention on your wiki.
The libgdiplus library seems to be installed well.
libgdiplus.so exists and I have added its directory to PATH (this is one of the troubleshooting I found but still, I get what you see below)

System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information. at System.Drawing.LibraryResolver.EnsureRegistered() at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize() at System.Drawing.SafeNativeMethods.Gdip..cctor() --- End of inner exception stack trace --- at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromFile(String filename, IntPtr& bitmap) at System.Drawing.Bitmap..ctor(String filename, Boolean useIcm) at System.Drawing.Bitmap..ctor(String filename) at FileToVox.Converter.Image.PNGToSchematic.WriteSchematicMain() at FileToVox.Converter.Image.PNGToSchematic.WriteSchematic() at FileToVox.Program.SchematicToVox(AbstractToSchematic converter) at FileToVox.Program.ProcessFile()

Do you have an idea on what I could try next?

Thanks

PLY 2 VOXEL | For people having trouble with colors on macOS, this is how to solve the issue

For FileToVox 1.14 release
———

  1. Download the the source code zip from the release note
  2. Unzip
  3. Open the folder with Visual Studio Code
  4. Install missing dependencies and restore unresolved dependencies if asked :

Capture d’écran 2022-01-19 à 17 31 48

  1. Then in the Terminal menu section, click "Run build task..." :

Capture d’écran 2022-01-19 à 17 34 12

  1. If the build process ran properly, then you should be able to find that file, open it:

Capture d’écran 2022-01-19 à 17 36 19

  1. Replace this:
{
  "runtimeOptions": {
    "tfm": "net5.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "5.0.0"
    }
  }
}

by this :

{
  "runtimeOptions": {
    "tfm": "net5.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "5.0.0"
    },
    "configProperties": {
      "System.Drawing.EnableUnixSupport": true
   }
  }
}

and Save your changes.

  1. And it should be done, you can now run the FileToVox.dll in the console with these commands:
> cd Path/to/.../FileToVox-1.14/SchematicToVoxCore/bin/Debug/net5.0
> dotnet FileToVox.dll --i path/to/your_ply_file  --o path/to/your_output_vox --gs 256

CONSOLE OUTPUT PROOF WITHOUT ANY ERROR:

[INFO] FileToVox v1.14.0.0
[INFO] Author: @Zarbuz. Contact : https://twitter.com/Zarbuz
[INFO] Specified input path: /Path/TO/myply.ply
[INFO] Specified output path: outputtest
[INFO] Specified grid size: 256
[INFO] Specified output path: Path/TO/myoutput
[INFO] Start reading PLY data...
[INFO] Done.       
[INFO] Max X: 34,16353, Y: 22,1879, 25,34819
[INFO] Min X: 15,393215, Y: 0, 15,55219
[INFO] Size X: 18,770313, Y: 22,1879, 9,7960005
[INFO] Started to voxelize data...
[INFO] Done.       
[INFO] Started quantization of all colors ...
[INFO] Done.       
[INFO] Vox Width: 218
[INFO] Vox Length: 114
[INFO] Vox Height: 257
[INFO] Total blocks: 112347
[INFO] Started to write chunks ...
[INFO] Done.
[INFO] Check total blocks after conversion: 112347
[INFO] Done.

And Voilà !

Hope that will help you folks !

XYZ file format description

Hey, thanks for making this. The XYZ file format looks perfect for my uses but I'm failing to find any documentation/info on exactly what the format is. Where can I find this?

Sorry if it's obvious!

Bad voxel generation in MeshSampler

The voxels generated in MeshSampler look terrible compared to the ones you get when you just drag an .obj into MagicaVoxel, but MagicaVoxel doesn't read .mtl textures so you can't really do anything with it. If you could match the algorithm for MeshSampler to the current one of MagicaVoxel, that would be awesome.

The required library hostfxr.dll could not be found

Hi, I'm on Windows 10. When I run FileToVox version 1.8.2, I get this error:
A fatal error occurred. The required library hostfxr.dll could not be found. If this is a self-contained application, that library should exist in [C:\Logiciels\FileToVox-v1.8.2.win-x64\]. If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation]..
However, when I use the version 1.8.0 or FileToVox, it works fine.

Split input objects into multiple .vox files when maximum size is exceeded.

It would be useful to automatically segment a physically large input into several (max 2016^3) vox files so that the conversion does not simply fail, and will allow the creation of highly detailed voxel objects. Obviously this couldn't be loaded simultaneously into MagicaVoxel, but at least you could compose scenes in other tools (Unity, Unreal, etc.).

Bug Report on how the heightmap is generated

When you convert a heightmap that is close to the size limit of MV the outmost row of voxboxes tends to overlap with the ones next to it because the edge pieces (that are smaller than 126³ voxels at this point) are still generated as a 126³ box of voxels. That overlap requires some fixing up in MV to make the heightmap useful.

Here's an example of how that looks: https://imgur.com/a/lZpm8pU

Cannot compile on Ubuntu 20.10

I'm trying to compile FiletoVox on Ubuntu 20.10 but when I run dotnet build I'm presented with a lot of errors:

Click to expand

Welcome to .NET 5.0!

SDK Version: 5.0.201

Telemetry

The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry


Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https

Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli

Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
/usr/share/dotnet/sdk/5.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp3.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
Failed to restore /home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj (in 1.94 min).

Build FAILED.

/usr/share/dotnet/sdk/5.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp3.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.Win32.SystemEvents 4.5.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'System.Drawing.Common 4.5.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Ref 3.0.1' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Host.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Ref 3.0.0' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.osx-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.AspNetCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.win-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3037: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired. [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
/home/hellocatfood/Desktop/FileToVox/SchematicToVoxCore/FileToVox.csproj : error NU3028: Package 'Microsoft.NETCore.App.Runtime.linux-x64 3.0.3' from source 'https://api.nuget.org/v3/index.json': The repository countersignature's timestamp found a chain building issue: UntrustedRoot: self signed certificate in certificate chain [/home/hellocatfood/Desktop/FileToVox/FileToVox.sln]
1 Warning(s)
39 Error(s)

Time Elapsed 00:01:57.13

I'm using .NET 5.0

scale flag not working

it seems that the --scaleflag is not applied through the command :(
i get no difference for the blocks size with a value of 100 nor a value of 20

I mean: does the --gs flag has the same behavior than the --scale flag ?

dotnet FileToVox.dll --i rainbow\ 2.ply --o outputrainbowvox --scale 50 --gs 256

Note that in the the scale flag is not mentioned in the help section by the way :

> net5.0 % dotnet FileToVox.dll --h                           
[INFO] FileToVox v1.14.0.0
[INFO] Author: @Zarbuz. Contact : https://twitter.com/Zarbuz
Usage: FileToVox --i INPUT --o OUTPUT
Options: 
  -i, --input=VALUE          input path
  -o, --output=VALUE         output path
  -s, --shaders=VALUE        input shader path
  -c, --color                enable color when generating heightmap
      --cm, --color-from-file=VALUE
                             load colors from file
      --cl, --color-limit=VALUE
                             set the maximal number of colors for the palette
      --cs, --chunk-size=VALUE
                             set the chunk size
  -e, --excavate             delete all voxels which doesn't have at least 
                               one face connected with air
  -h, --help                 help informations
      --hm, --heightmap=VALUE
                             create voxels terrain from heightmap (only for 
                               PNG file)
      --msx, --mesh-segment-x=VALUE
                             set the number of segment in X axis (for 
                               MeshSampler)
      --msy, --mesh-segment-y=VALUE
                             set the number of segment in Y axis (for 
                               MeshSampler)
      --msub, --mesh-subsample=VALUE
                             set the number of subsample (for MeshSampler)
      --mskip                skip the capturing points part and load the 
                               previous PLY (for MeshSampler)
  -p, --palette=VALUE        set the palette
      --gs, --grid-size=VALUE
                             set the grid-size
  -d, --debug                enable the debug mode

Feature request: Multiple pngs as input

Hi, first of all thanks for this awesome software!
I do algorithmic art so I automatize and experiment with things. For my needs, I would love to enter multiple png files in prompt and convert them into a vox file, rather than pointing to a folder (I have to move random/remove images in folders every time right now).

something like: --i path/to/file.png path/to/file2.png path/to/file3.png --o outfile.vox

Thanks!

p.s. also if this color optimization method at #43 (comment) would be a command flag like --optimization=false, would be awesome!

Schematic export crash

After getting missing .dll files installing some .net stuff:

D:\Downloads\FileToVox-v1.9.3>filetovox --i test.schematic --o hoppa.vox
[INFO] Specified input path: test.schematic
[INFO] Specified output path: hoppa.vox
[INFO] Specified increase size: 1
[INFO] Specified output path: D:\Downloads\FileToVox-v1.9.3\hoppa.vox
[LOG] Started to read config.txt for loading blocks colors
[INFO] Loaded blocks: 452
[LOG] Done.
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at fNbt.NbtByteArray.ReadTag(NbtBinaryReader readStream)
at fNbt.NbtCompound.ReadTag(NbtBinaryReader readStream)
at fNbt.NbtFile.LoadFromStreamInternal(Stream stream, TagSelector tagSelector)
at fNbt.NbtFile.LoadFromStream(Stream stream, NbtCompression compression, TagSelector selector)
at fNbt.NbtFile.LoadFromFile(String fileName, NbtCompression compression, TagSelector selector)
at fNbt.NbtFile..ctor(String fileName)
at FileToVox.Converter.SchematicToSchematic.WriteSchematic() in E:\Documents\FileToVox\SchematicToVoxCore\Converter\SchematicToSchematic.cs:line 33
at FileToVox.Program.SchematicToVox(AbstractToSchematic converter, String outputPath) in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 292
at FileToVox.Program.ProcessFile() in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 245

Turn off color quantization

Hi,

I'm importing a bunch of png that represent slices of a .vox model.
All the pngs combined have a specific set of e.g. 20 colors.
However, the colors are getting quantized and some colors are getting squashed.

Is there an option to turn off color quantization?

OBJ converting problem

Hi. I recently tried to convert OBJ with pretty dense mesh, to vox, and it converted successfully.
I used --gs 1995, and it covered all world, as i wanted. I don't remember which version i used.

Now i made another OBJ with less dense mesh, and for some reason it just throw bunch of exceptions, and begin converting with gs about 1000.
I don't think it something with latest version, i tried few previous, and also previous large OBJ still start converting ok.
I don't get, whats exactly wrong.

At first it gave me just bunch of info about index of array out of bound and stuff.
r:\FileToVox>filetovox --i "r:\landscape2.obj" --o "r:\landscape_voxels" --gs 1995 --e [INFO] Specified input file: r:\landscape2.obj [INFO] Specified output file: r:\landscape_voxels [INFO] Specified increase size: 1 [INFO] Specified grid size: 1995 [INFO] Enabled option: excavate [INFO] Specified output path: r:\landscape_voxels System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) (Index was outside the bounds of the array.) ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at g3.MeshSignedDistanceGrid.<>c__DisplayClass41_0.<make_level_set3_parallel>b__0(Int32 tid) at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) at System.Threading.Tasks.TaskReplicator.Replica.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action1 simpleBody, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action1 simpleBody, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body)
at g3.MeshSignedDistanceGrid.make_level_set3_parallel(Vector3f origin, Single dx, Int32 ni, Int32 nj, Int32 nk, DenseGrid3f distances, Int32 exact_band)
at g3.MeshSignedDistanceGrid.Compute()
at FileToVox.Converter.OBJToSchematic.WriteSchematic() in E:\Documents\FileToVox\SchematicToVoxCore\Converter\ObjToSchematic.cs:line 34
at FileToVox.Program.ProcessFile() in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 254
---> (Inner Exception #1) System.IndexOutOfRangeException: Index was outside the bounds of the array.
at g3.MeshSignedDistanceGrid.<>c__DisplayClass41_0.<make_level_set3_parallel>b__0(Int32 tid)
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

---> (Inner Exception #2) System.IndexOutOfRangeException: Index was outside the bounds of the array.
at g3.MeshSignedDistanceGrid.<>c__DisplayClass41_0.<make_level_set3_parallel>b__0(Int32 tid)
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) at System.Threading.Tasks.Parallel.<>c__DisplayClass44_02.b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---

[LOG] Done.`

And then, when i just scaled down obj to size of "working" obj, it begin giving me much less exceptions, but still won't convert.

`r:\FileToVox>filetovox --i "r:\landscape3.obj" --o "r:\landscape_voxels" --gs 1995 --e
[INFO] Specified input path: r:\landscape3.obj
[INFO] Specified output path: r:\landscape_voxels
[INFO] Specified increase size: 1
[INFO] Specified grid size: 1995
[INFO] Enabled option: excavate
[INFO] Specified output path: r:\landscape_voxels
System.OverflowException: Arithmetic operation resulted in an overflow.
at g3.DenseGrid3f.resize(Int32 ni, Int32 nj, Int32 nk)
at g3.MeshSignedDistanceGrid.make_level_set3_parallel(Vector3f origin, Single dx, Int32 ni, Int32 nj, Int32 nk, DenseGrid3f distances, Int32 exact_band)
at g3.MeshSignedDistanceGrid.Compute()
at FileToVox.Converter.OBJToSchematic.WriteSchematic() in E:\Documents\FileToVox\SchematicToVoxCore\Converter\ObjToSchematic.cs:line 34
at FileToVox.Program.SchematicToVox(AbstractToSchematic converter, String outputPath) in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 292
at FileToVox.Program.ProcessFile() in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 245

[LOG] Done.`

I'm really don't understand what am i missing.

New files objects are z-offset to 256

Hi, thanks for the tool.

Whenever I apply a shader, my objects are transformed to z=256.
It would be cool if they stayed at their original position. If I use the fill tool, chances are I run out of memory.

Example:

FileToVox-v1.13-linux/FileToVox \
    --i MagicaVoxel-0.99.6.4-win64/vox/map_1.vox \
    --o MagicaVoxel-0.99.6.4-win64/vox/wmap_1 \
    --s shaders/flood.json

Split input objects into multiple .vox files when maximum size is exceeded.

It would be useful to automatically segment a physically large input into several (max 2016^3) vox files so that the conversion does not simply fail, and will allow the creation of highly detailed voxel objects. Obviously this couldn't be loaded simultaneously into MagicaVoxel, but at least you could compose scenes in other tools (Unity, Unreal, etc.).

--cm work for obj?

Greetings,

is it possible to generate a colored vox file from a obj and a png/mtl file or something other??

thanks for this great project :)

Missing required option: --i

I was trying to convert a .tiff file using the converter, but the moment I ran the .exe it denied the conversion, stating that it was "Missing required option: --i". I tried to type FileToVox --help and it immediately shut down the command prompt window. Is there any way to fix this?
image

Feature Request: .schem / Sponge Powered Minecraft new Schematic compatibility

A note on schematic formats

Before WorldEdit version 7 (corresponding to Minecraft 1.13), the files were saved with a “.schematic” file extension in a format that was compatible with many other software such as MCEdit, Redstone Simulator, and more. Unfortunately, the format wasn’t suited for the new block format Mojang was migrating to, so a new format was devised - named the Sponge schematic format, using the extension “.schem”.

Note that WorldEdit can still import old “.schematic” files saved in older versions (or third party programs) through a legacy compatibility layer, but they can no longer be written to.

See:
https://github.com/SpongePowered/Schematic-Specification
and https://worldedit.enginehub.org/en/latest/usage/clipboard/#loading-and-saving where this was quoted.

Be nice to be able to import the newer file formats as MCedit has stopped updating.

System.UnauthorizedAccessException

When running FiletoVoxGUI v0.4 on Windows 11 for the first time I get the error:

System.UnauthorizedAccessException: Access to the path 'D:\MagicaVoxel-0.99.6.4-win64\export\test.vox' is denied.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
at FileToVoxCore.Vox.VoxWriter.WriteModel(String absolutePath, List`1 palette, Schematic schematic, Rotation rotation)
at FileToVox.Program.SchematicToVox(AbstractToSchematic converter)
at FileToVox.Program.ProcessFile()

I'm a user with administrator privileges and the directories I'm trying to write to have Full Control set in Properties / Security.

None of my other apps have had trouble writing to the directories in question.

Any help much appreciated.

How to install it on Mac

Hi,
Thanks for your great work! I wanna know how to install FileToVox on macOS.
After unzipping the lastest release I got an .exe file which cannot directly be executed in macOS's terminal. Any solution?

the generated blocks are very few and voxel is very tiny • SOLVED

hello @Zarbuz ,

i am on macOs 10.15.7, and used the lastest release of FileToVox with this command:
./FileToVox --i /Users/sylvainfiloni/Downloads/rainbow\ 2.ply --o testvox3

I wonder why the vox file generated is very small, with a very low value for blocks.
Here is the console output with the "rainbow 2.ply" file

[INFO] FileToVox v1.14.0.0
[INFO] Author: @Zarbuz. Contact : https://twitter.com/Zarbuz
[INFO] Specified input path: /Users/sylvainfiloni/Downloads/rainbow 2.ply
[INFO] Specified output path: testvox3
[INFO] Specified output path: /Users/sylvainfiloni/Downloads/FileToVox-v1.14-osx/testvox3
[INFO] Start reading PLY data...
[INFO] Done.       
[INFO] Max X: 9,7875805, Y: 7,557913, 6,8279366
[INFO] Min X: 3,1533642, Y: 5,5825043, 0
[INFO] Size X: 6,6342163, Y: 1,9754086, 6,8279366
[INFO] Started to voxelize data...
[INFO] Done.       
[INFO] Started quantization of all colors ...
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
  at System.Drawing.LibraryResolver.EnsureRegistered()
  at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
  at System.Drawing.SafeNativeMethods.Gdip..cctor()
  --- End of inner exception stack trace ---
  at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, IntPtr scan0, IntPtr& bitmap)
  at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
  at FileToVox.Extensions.Quantization.CreateBitmapFromColors(List`1 blocks)
  at FileToVox.Extensions.Quantization.ApplyQuantization(List`1 blocks, Int32 colorLimit)
[INFO] Vox Width: 11
[INFO] Vox Length: 11
[INFO] Vox Height: 4
[INFO] Total blocks: 104
[INFO] Started to write chunks ...
[INFO] Done.
[INFO] Check total blocks after conversion: 104
[INFO] Done.

What did i do wrong ?

A fatal error occurred. The required library hostfxr.dll could not be found.

If this is a self-contained application, that library should exist in [\path\to\MagicaVoxel\FileToVox-v1.10].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].

Not running on macOS Big Sur ( x86_64 ) - solved

i had the same issue as here https://github.com/Zarbuz/FileToVox/issues/40

Creating a FileToFox.runtimeconfig.json did not help.

It works for me when i compile from source

dotnet build

and then after editing FileToVox.runtimeconfig .json in the Release build folder

Adding
{ "runtimeOptions": { "configProperties": { "System.Drawing.EnableUnixSupport": true } } }

to the runtimeOptions and then running dotnet publish

dotnet publish -r osx-x64 -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true

That leaves me with a published folder like in the release download "WITH" a FileToVox.runtimeconfig.json file
and all works flawless.

For anyone interested you can download a working version here.http://q3de.com/research/magicavoxel/

I'm sure there is a better place for disscussion -- let me know.

Link to issue on MS
https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

Converting a FBX / OBJ, resulting VOX file is too small to use.

I am trying my best to figure out how to fix this. I downloaded the latest release of FileToVox and the GUI. Copied everything to the required paths:

FileToVoxGUI-v0.2
FileToVoxGUI-v0.2\FileToVox
FileToVoxGUI-v0.2\FileToVox\MeshSampler

Here are my settings:
FileToVoxGUI

Here is MeshSampler doing its thing:

MeshSampler

And here is the output file:
test.zip

Screenshot:
MagicaVoxel_ZIfhiV5Ir0

As you can see in the screenshot, the result is just a tiny little spot on the 256x256 grid.

Here is my input obj file, zipped:
input.zip

How can I get this working properly? Would really, really appreciate any help!

J

.ply reader

Hi,

I would like to use your software in a c# project as a library without cmd.exe

Could you show how to import .ply file format and get an array of mesh vertices and faces?

This is the file I am trying to import in c#:
Poisson.zip

How to install and run on Mac OS Catalina

Good afternoon I have read previous threads whom held the same issue as mine. Unfortuntely, none of the solution listed have helped so far. Every time I download the ".osx" zip file, I do not get a ".exe" file. I just get a file named "FileToVox", which when I try to open it, it just opens in the "text/Edit" app on Mac. Any advice on this matter would truly be appreciated. Thank you.

Wrong Rotation

Hello,

sry but iam must say it.
When iam convert any .ply / .png or .obj with FileToVox to a vox file,
then open it in MagicaVoxel or IsoVoxel and export them as Iso Sprite,
in both programs is the rotation wrong.

sry for my bad english.

Greetings from germany.

and a little bug, since the new --fix-lonely is here, the empty chunks still exists.

Grid scale cap

You have written an amazing tool, but the current grid scale cap is between 128 and 2000.

Please increase the upper limit. I need it for a project.
Make it unlimited or just much higher.

Problem with converting OBJ on mac os 10.13

Orkhans-MacBook-Pro:FileToVox-v1.12.6-osx orkhanhuseynov$ ./FileToVox --i /Users/orkhanhuseynov/Desktop/sphere.obj --o spherevoxel
[INFO] FileToVox v1.12.6.0
[INFO] Author: @Zarbuz. Contact : https://twitter.com/Zarbuz
[INFO] Specified input path: /Users/orkhanhuseynov/Desktop/sphere.obj
[INFO] Specified output path: spherevoxel
[INFO] Specified output path: /Users/orkhanhuseynov/Desktop/FileToVox-v1.12.6-osx/spherevoxel
[INFO] External program 'MeshSampler' needed! Check location of the program ...
[INFO] Check at: /Users/orkhanhuseynov/Desktop/FileToVox-v1.12.6-osx/MeshSampler/MeshSampler.exe
[INFO] MeshSampler/MeshSampler.exe found!
System.ComponentModel.Win32Exception (8): Exec format error
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at FileToVox.Converter.MeshToSchematic..ctor(String path, Single scale, Int32 colorLimit, Int32 segmentX, Int32 segmentY, Int32 subsample, Boolean skipCapture)
at FileToVox.Program.GetConverter(String path)
at FileToVox.Program.ProcessFile()

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.