-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OBJ converting problem #22
Comments
Can you upload the model which fail ? It's hard to replicate the problem. |
sure |
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 |
Well as i said, before this i made much denser mesh, which size 100mb instead of 20, and it converted ok. I rechecked, first obj i attached should be 252001 faces r:\FileToVox>filetovox --i "r:\ground.obj" --o "r:\ground_test" --gs 1995 --e
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. |
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)
[LOG] Done. 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. |
If fill holes suppose to fix holes in converted to voxels coud, it doesn't work for me at all. [LOG] Started to fill holes... maybe it need to be posted as separate issue? |
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 |
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) [LOG] Started to voxelize data... 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 |
Hello, can you test this future version and tell me if it correct the problems you had ? |
Hi! I've checked fill holes flag, no errors. '[INFO] Specified input path: D:\Stuff\Landscape.ply it says for some reason that total blocks after conversion is 0 i tried scale 0.95, result is same |
No, this one i was able to convert from obj, but then decided to make new one. i tested on this landscp.zip |
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_0
2.<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](Partitioner
1 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](Partitioner
1 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](IEnumerable
1 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](IEnumerable
1 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_0
2.<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_0
2.<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.
The text was updated successfully, but these errors were encountered: