Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

"Cannot compute the log of zero."
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=23&t=592
Page 1 of 1

Author:  Armitage1982 [ Thu May 15, 2014 5:29 pm ]
Post subject:  "Cannot compute the log of zero."

Hi

When using ConvertToVDB to convert a vox file from MagicaVoxel 0.93 I get the following log error :
Code:
ConvertToVDB.exe -i adobe.vox -o adobe.vdb
Identified input as Magica Voxel file
[Log] MV_VoxelModel :: Chunk : MAIN : 0 1432
[Log] MV_VoxelModel :: Chunk : SIZE : 12 0
[Log] MV_VoxelModel :: Chunk : XYZI : 360 0
[Log] MV_VoxelModel :: Chunk : RGBA : 1024 0
[Log] MV_VoxelModel :: Model : 5 5 5 : 89
Failed to create new empty volume

Code:
[00:50:23, Info   ]: Creating VoxelDatabase from 'adobe.vdb'
[00:50:23, Info   ]: Attempting to create 'adobe.vdb'
[00:50:23, Info   ]: Successfully created'adobe.vdb'
[00:50:23, Debug  ]: The maximum number of uncompresed blocks has been set to 64, which is 8388608 bytes
[00:50:23, Error  ]: Cannot compute the log of zero.
[00:50:23, Error  ]: Caught 'invalid_argument' at C interface. Message reads: "Cannot compute the log of zero."


Which give me the following error message inside Unity3D :

Code:
CubiquityException: An exception has occured inside the Cubiquity native code library.
Error code 'CU_SQLITE_ERROR' with message "unable to open database file".
Please see the log file 'Cubiquity.log' for more details.

Cubiquity.Impl.CubiquityDLL.Validate (Int32 returnCode) (at Assets/Cubiquity/Scripts/Impl/CubiquityDLL.cs:51)
Cubiquity.Impl.CubiquityDLL.NewColoredCubesVolumeFromVDB (System.String datasetName, UInt32 baseNodeSize) (at Assets/Cubiquity/Scripts/Impl/CubiquityDLL.cs:117)
ColoredCubesVolumeData.InitializeExistingCubiquityVolume () (at Assets/Cubiquity/Scripts/ColoredCubesVolumeData.cs:92)
VolumeData.CreateFromVoxelDatabase[ColoredCubesVolumeData] (System.String relativePathToVoxelDatabase) (at Assets/Cubiquity/Scripts/VolumeData.cs:126)
Cubiquity.VolumeDataAsset.CreateFromVoxelDatabase[ColoredCubesVolumeData] (System.String relativePathToVoxelDatabase) (at Assets/Cubiquity/Editor/VolumeDataAsset.cs:13)
Cubiquity.MainMenuEntries.CreateColoredCubesVolumeDataAssetFromVoxelDatabase () (at Assets/Cubiquity/Editor/MainMenuEntries.cs:96)


When I try to convert a brand new vox file, your converter works without any issues but Creating from voxel database is still impossible :
Code:
Identified input as Magica Voxel file
[Log] MV_VoxelModel :: Chunk : MAIN : 0 9940
[Log] MV_VoxelModel :: Chunk : SIZE : 12 0
[Log] MV_VoxelModel :: Chunk : XYZI : 9904 0
[Log] MV_VoxelModel :: Model : 45 45 45 : 2475

Code:
[19:03:15, Info   ]: Creating VoxelDatabase from 'test.vdb'
[19:03:15, Info   ]: Attempting to create 'test.vdb'
[19:03:15, Info   ]: Successfully created'test.vdb'
[19:03:15, Debug  ]: The maximum number of uncompresed blocks has been set to 64, which is 8388608 bytes
[19:03:15, Debug  ]: Created new colored cubes volume in slot 0
[19:03:15, Info   ]: Resizing temp buffer to 32768bytes. This should only happen the first time the MinizBlockCompressor is used
[19:03:15, Debug  ]: In cuDeleteColoredCubesVolume() - deleting volume handle '0'


I wasn't able to go any further but if I may give you a feedback I think it would be wise to continue working with existing editors and focus on optimizations and features. It would be like trying to develop Photoshop inside a 2D game engine, nice but not necessary I think.

I'm much more interested in your Colored Cubes Volume Data than terrain volume and hope to display a fairly large amount of them. So every helper to manipulate, animate and transforms cubes are welcomes :)

----
i7-3770 @ 3.40Ghz | 16 Go DDR3 | GTX 670 2 Go
Windows 8.1 x64
http://www.arm42.com

Author:  Armitage1982 [ Thu May 15, 2014 6:15 pm ]
Post subject:  Re: "Cannot compute the log of zero."

I have new info for you guys :)
First of all it seem's ConvertToVDB.exe won't convert anything lower than 16x16x16 in term of sizes. Trying to import that broken generated vdb will crash unity3D so maybe it's a good idea to remove broken files or something...

Secondly I discover that you have to put the generated vdb file inside "Assets\StreamingAssets\Cubiquity\VoxelDatabases" to be able to import that database inside Unity3D (or then you get the CU_SQLITE_ERROR inside).

My bad, I've just read it was the last line of the "Importing From Magica Voxel" chapter.
At last, I hope the first error will help you to track down bugs or user errors :lol:

Would it not be possible to automate this via Unity3D?

Author:  David Williams [ Thu May 15, 2014 10:34 pm ]
Post subject:  Re: "Cannot compute the log of zero."

Thanks for your efforts - I was loosely aware of the small volumes issue though I hadn't seen details or looked at it myself: https://bitbucket.org/volumesoffun/cubi ... ll-volumes

I really should mentioned that bug in the docs (or just fixed it...).

There are indeed some rough edges in the import functionality... It would make a lot of sense for this converter (and other tools) to be called from Unity so there is less chance for user error. I wanted to polish it further but I also wanted to get the initial release out, so it will improve in the future :-)

Author:  duder5495 [ Tue Jun 10, 2014 10:36 pm ]
Post subject:  Re: "Cannot compute the log of zero."

a

Author:  David Williams [ Wed Jun 11, 2014 3:07 pm ]
Post subject:  Re: "Cannot compute the log of zero."

duder5495 wrote:
is the converter still able to convert .vxl files? i tried doing it but it failed to convert successfully.


Yep, this was indeed broken - sorry about that. I've now fixed it in the develop branch of the Git repository. If you want to switch to using the develop branch then be sure to backup you project first.

If you don't want to switch to the develop branch (i.e. you want to continue using the released version of Cubiquity) then you can still download the develop branch, run the new ConvertToVDB.exe, and copy the resulting .vdb files into you project. The file format hasn't changed so this should work.

Let me know if you want more information. If you have problems then please give the full output of the program so I can see what is going wrong.

Author:  duder5495 [ Wed Jun 11, 2014 10:54 pm ]
Post subject:  Re: "Cannot compute the log of zero."

David Williams wrote:
duder5495 wrote:
is the converter still able to convert .vxl files? i tried doing it but it failed to convert successfully.


Yep, this was indeed broken - sorry about that. I've now fixed it in the develop branch of the Git repository. If you want to switch to using the develop branch then be sure to backup you project first.

If you don't want to switch to the develop branch (i.e. you want to continue using the released version of Cubiquity) then you can still download the develop branch, run the new ConvertToVDB.exe, and copy the resulting .vdb files into you project. The file format hasn't changed so this should work.

Let me know if you want more information. If you have problems then please give the full output of the program so I can see what is going wrong.

thanks!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/