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_0
2.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](ReplicatableUserAction
1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action
1 simpleBody, Action2 bodyWithState, Action
3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func
5 bodyWithEverything, Func1 localInit, Action
1 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, Action
1 simpleBody, Action2 bodyWithState, Action
3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func
5 bodyWithEverything, Func1 localInit, Action
1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action
1 body, Action2 bodyWithState, Action
3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func
5 bodyWithEverything, Func1 localInit, Action
1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action
1 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_0
2.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_0
2.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.