Comments (12)
Can you upload the model which fail ? It's hard to replicate the problem.
from filetovox.
sure
from filetovox.
Well I don't think there is a real bug, it's just that the grid size you set is very very big, so you probably have not enough ram to do this conversion (I sucessfully converted your model with a grid size of 1000 but I flirt with the limit of my ram (almost 16Go of RAM used).
The OBJ conversion is deprecated and I will remove this feature in the future. Try to convert your model in PLY (a cloud point) and the convert it with FileToVox. Much better results (colors are also supported). I've done a video tutorial about this : https://www.youtube.com/watch?v=sg3z2GaMJzM
from filetovox.
Well as i said, before this i made much denser mesh, which size 100mb instead of 20, and it converted ok.
I have 64gb RAM, i don't think it's issue.
I rechecked, first obj i attached should be 252001 faces
And this one ground.zip is 2011988
And it converted ok.
As i understand 2000 is limit, it's not crash when i set gs 2000, just throw error at the end.
But at 1995 it's converting ok
`
r:\FileToVox>filetovox --i "r:\ground.obj" --o "r:\ground_test" --gs 2000 --e
[INFO] Specified input path: r:\ground.obj
[INFO] Specified output path: r:\ground_test
[INFO] Specified increase size: 1
[INFO] Specified grid size: 2000
[INFO] Enabled option: excavate
[INFO] Specified output path: r:\ground_test
[INFO] Vox Width: 2005
[INFO] Vox Length: 2005
[INFO] Vox Height: 480
[ERROR] Voxel model is too big ! MagicaVoxel can't support model bigger than 2000^3
[LOG] Done.
r:\FileToVox>filetovox --i "r:\ground.obj" --o "r:\ground_test" --gs 1995 --e
[INFO] Specified input path: r:\ground.obj
[INFO] Specified output path: r:\ground_test
[INFO] Specified increase size: 1
[INFO] Specified grid size: 1995
[INFO] Enabled option: excavate
[INFO] Specified output path: r:\ground_test
[INFO] Vox Width: 2000
[INFO] Vox Length: 2000
[INFO] Vox Height: 479
[LOG] Started to compute the first block for each region
[LOG] Done.
[INFO] Total blocks: 11180147
[LOG] Started to write chunks ...
[####------] 45% -[LOG] Done.
[LOG] Check total blocks after conversion: 11180147
[LOG] Done.
`
And yes, in process it takes great amount of RAM, up to 50gb
but it starts...
I guess in this case i can achieve same result with just depthmap, but i thought adding some details with other objs and then merge them.
the only difference (except face count) between those two objects, that new is thicker
If it possible to convert classic mesh to PLY, i will try. I thought PLY is standard for 3d scanners, i remember getting hard time to convert PLY model to 3dsmax as classic mesh, long time ago.
from filetovox.
i was able to convert this landscape in to cloud of points, i also was able scale mesh to fit maximum size of world (almost of course, near maximum values)
but i there is need tremendous amount of points to fill whole mesh surface. PLY file grown to about 2gb
and it's still have holes
i think "fill holes" option should help, but it just throw error, even if use default amount of points (vox scene then also looks like cloud of points)
[INFO] Specified input path: R:\landscape_2000.ply [INFO] Specified output path: R:\landscape_2000 [INFO] Specified increase size: 1 [INFO] Enabled option: fix-holes [INFO] Specified output path: R:\landscape_2000 [LOG] Start reading PLY data... [LOG] Done. [LOG] Started to voxelize data... [LOG] Done. System.ArgumentException: Value of '-26' is not valid for 'alpha'. 'alpha' should be greater than or equal to 0 and less than or equal to 255. at System.Drawing.Color.<CheckByte>g__ThrowOutOfByteRange|325_0(Int32 v, String n) at System.Drawing.Color.FromArgb(Int32 alpha, Int32 red, Int32 green, Int32 blue) at FileToVox.Quantizer.Quantizer.GetQuantizedPalette(Int32 colorCount, ColorData data, IEnumerable
1 cubes, Int32 alphaThreshold) in E:\Documents\FileToVox\SchematicToVoxCore\Quantizer\Quantizer.cs:line 79
at FileToVox.Quantizer.QuantizerBase.QuantizeImage(Bitmap image, Int32 alphaThreshold, Int32 alphaFader, Int32 maxColorCount) in E:\Documents\FileToVox\SchematicToVoxCore\Quantizer\QuantizerBase.cs:line 33
at FileToVox.Extensions.Quantization.ApplyQuantization(List`1 blocks, Int32 colorLimit) in E:\Documents\FileToVox\SchematicToVoxCore\Extensions\Quantization.cs:line 15
[LOG] Started to fill holes...
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at FileToVox.Converter.PointCloud.PointCloudToSchematic.Check1X1X1Hole(UInt32[,,] blocks, UInt16 x, UInt16 y, UInt16 z) in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 273
at FileToVox.Converter.PointCloud.PointCloudToSchematic.FillHoles(UInt32[,,] blocks, Schematic schematic) in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 101
at FileToVox.Converter.PointCloud.PointCloudToSchematic.WriteSchematic() in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 248
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.
`
also regardless of "fill holes" option, there is some error about alpha being -26, I'm not sure, at first test this error not appear and when it appear afterwards it's don't interrupt program and result opens in MagicaVoxel ok.
My goal was make landscape that fill whole available world space, and i was able to do this with that 100mb obj, and it's seems i was just lucky or something.
from filetovox.
If fill holes suppose to fix holes in converted to voxels coud, it doesn't work for me at all.
Even on small mesh
it's everytime just throw error.
[LOG] Started to fill holes...
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at FileToVox.Converter.PointCloud.PointCloudToSchematic.Check1X1X1Hole(UInt32[,,] blocks, UInt16 x, UInt16 y, UInt16 z) in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 278
at FileToVox.Converter.PointCloud.PointCloudToSchematic.FillHoles(UInt32[,,] blocks, Schematic schematic) in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 106
at FileToVox.Converter.PointCloud.PointCloudToSchematic.WriteSchematic() in E:\Documents\FileToVox\SchematicToVoxCore\Converter\PointCloud\PointCloudToSchematic.cs:line 253
at FileToVox.Program.ProcessFile() in E:\Documents\FileToVox\SchematicToVoxCore\Program.cs:line 254
maybe it need to be posted as separate issue?
from filetovox.
I recommend to convert in a binary PLY instead of a ASCII PLY to reduce the file size (more compressed). I will check the fill-holes option but keep in mind it will fill hole of 1x1 or 2x1 (very small holes). If in your .vox file you have bigger holes, you need to increase the density of your points. If you use CloudCompare to do this with your model, I would say you need something like 40M of points. I don’t know how much you have set with your precedent result. But there’s definitely some errors to check in my side
from filetovox.
I'm used binary, it's first button, I'm actually didn't knew whats difference (askii it's text probably, as obj file, i dunno)
So mesh with size about 2000x2000, and amount of points is 100 000 000 (it's what i used, it's wont let you set bigger number, i guess, except if you use density ratio instead)
ply file is big, ~2gb, it's not problem,
it's also converts fast, and ok, except this
[LOG] Started to voxelize data...
[LOG] Done.
System.ArgumentException: Value of '-11' is not valid for 'alpha'. 'alpha' should be greater than or equal to 0 and less than or equal to 255.
at System.Drawing.Color.g__ThrowOutOfByteRange|325_0(Int32 v, String n)
at System.Drawing.Color.FromArgb(Int32 alpha, Int32 red, Int32 green, Int32 blue)
at FileToVox.Quantizer.Quantizer.GetQuantizedPalette(Int32 colorCount, ColorData data, IEnumerable1 cubes, Int32 alphaThreshold) in E:\Documents\FileToVox\SchematicToVoxCore\Quantizer\Quantizer.cs:line 79 at FileToVox.Quantizer.QuantizerBase.QuantizeImage(Bitmap image, Int32 alphaThreshold, Int32 alphaFader, Int32 maxColorCount) in E:\Documents\FileToVox\SchematicToVoxCore\Quantizer\QuantizerBase.cs:line 33 at FileToVox.Extensions.Quantization.ApplyQuantization(List
1 blocks, Int32 colorLimit) in E:\Documents\FileToVox\SchematicToVoxCore\Extensions\Quantization.cs:line 15
as i wrote before, i dunno why, program not throw this error if mesh is smaller.
and there is still holes, but small ones, as you told, 1-2 voxels
i guess fix holes exactly why i need in this situation
from filetovox.
Hello, can you test this future version and tell me if it correct the problems you had ?
FileToVox-v1.9.4.1.zip
from filetovox.
Hi! I've checked fill holes flag, no errors.
Then i decided to check if it actually fixes holes. Tried to convert that landscape from 2gb ply to voxels, it's converts with one error in log, and results is dummy file.
'[INFO] Specified input path: D:\Stuff\Landscape.ply
[INFO] Specified output path: D:\Stuff\Landscape
[INFO] Specified increase size: 1
[INFO] Specified output path: D:\Stuff\Landscape
[LOG] Start reading PLY data...
[LOG] Done.
[LOG] Started to voxelize data...
[LOG] Done.
[INFO] Vox Width: 1998
[INFO] Vox Length: 1998
[INFO] Vox Height: 873
[LOG] Started to compute the first block for each region
[LOG] Done.
[INFO] Total blocks: 11357369
[LOG] Started to write chunks ...
[LOG] Done.
[LOG] Check total blocks after conversion: 0
[ERROR] There is a difference between total blocks before and after conversion.
[LOG] Done.'
it says for some reason that total blocks after conversion is 0
i tried scale 0.95, result is same
from filetovox.
Do we still talk about this terrain ? I've manually converted your OBJ file into a PLY and made some test.
I converted with the same argument as you and I didn't have any errors. (The scale isn't the same tho)
I you can upload your 2Gb file I could probably better see the problem.
from filetovox.
No, this one i was able to convert from obj, but then decided to make new one.
We talking about new one, https://github.com/Zarbuz/FileToVox/files/4742619/landscape3.zip
But this file not scaled to whole world.
i tested on this landscp.zip
you can try yo convert to ply, i used 100 000 000 points,
or there is my conversion to ply https://mega.nz/file/zXZkUCiT#4GJ82Y0z_NZWglaBqb4ow2rqS_qTkuYBLkIC6oUtQj4
if this file still will be needed, in case you don't have mega account (it probably won't let you download it because it big, if they didn't changed this stupid rule) i will upload on something else
from filetovox.
Related Issues (20)
- textures are gonna be broken after voxelization process in mesh sampler HOT 5
- the generated blocks are very few and voxel is very tiny • SOLVED HOT 5
- scale flag not working HOT 1
- PLY 2 VOXEL | For people having trouble with colors on macOS, this is how to solve the issue HOT 5
- Useless
- Feature request: Multiple pngs as input HOT 4
- Problem converting files with MeshSampler HOT 5
- Support frame animation for MV v0.99.7
- System.UnauthorizedAccessException HOT 3
- GUI version doesn't have FBX compatibility HOT 1
- schematics/config.txt - what should be in it? HOT 2
- Problem displaying material in MeshToVox HOT 2
- converting files with MeshToVox HOT 2
- "no voxels to quantize - skipping this part" When I try to convert a ply model HOT 1
- Empty Model HOT 1
- Problem converting files with MeshToVox HOT 3
- MeshToVox: Support of SkinnedMeshRenderer HOT 3
- When I load the .fbx model this happens. HOT 1
- MeshToVox voxelization error HOT 2
- Consider BPM textures black as an alpha channel to generate transparency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filetovox.