Search Unity

MagicaVoxel Tools

Discussion in 'Assets and Asset Store' started by bocs, Oct 18, 2018.

  1. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413


    Asset Store

    http://u3d.as/1kT5


    Quick and Easy way to export Models to MagicaVoxel
    *Meshes
    *Skin Meshes
    *Multi Selected
    *Auto Palette or Custom colors






    Version 1.2 - Import to Prefab Added



     
    Last edited: Oct 30, 2018
  2. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Now live on the store if anyone is interested....
     
  3. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Lots of requests for making prefabs...
    so I'm adding an import tool

    *Optimized Mesh
    *Support to import materials...

    Example...With and without materials
    *Note my programmer art, needed example with glass, metal, and emit

     
  4. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Submitted to Asset Store, waiting review.

    updated Manual:
    https://goo.gl/K8HNPo

    *Renamed Asset since it now does more then export.
     
  5. MessiasOF

    MessiasOF

    Joined:
    May 4, 2017
    Posts:
    27
    Question (or a Feature Request)
    Can i convert particles to voxel?
    e.g: a explosion to a voxel explosion, this could be VERY useful


    Anyway, Thanks
     
    Last edited: Dec 10, 2018
  6. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    This is a feature I have looked into....here is a quick example of what I got working:



    so it is a feature i'd like to add, but I don't know when.
     
    Last edited: Dec 10, 2018
  7. MessiasOF

    MessiasOF

    Joined:
    May 4, 2017
    Posts:
    27
    this will be so amazing when comes out!
    create a explosion particle simulation and convert to voxel (this will be AMAZING)

    what is in my head:
     
  8. MessiasOF

    MessiasOF

    Joined:
    May 4, 2017
    Posts:
    27
    good luck and do not rush to add new features to the asset
     
  9. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    submitted version 1.2a to fix 2018.3+ issues

    I don't get why people would spend time to give a 1 star review before asking for support...
     
    MessiasOF likes this.
  10. MessiasOF

    MessiasOF

    Joined:
    May 4, 2017
    Posts:
    27
    I have not bought it yet, so it's still impossible to do a review, but I still think your idea is incredible for all lovers of voxel art
     
  11. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Submitted Version 1.3 to asset store...

    Huge improvement to import quality:





    Example: import voxel, add post processing...looks nice :)

     
  12. MessiasOF

    MessiasOF

    Joined:
    May 4, 2017
    Posts:
    27
    Nice Update!
     
  13. K-Anator

    K-Anator

    Joined:
    Feb 25, 2017
    Posts:
    6
    I would love to know how your progress on the destruction is going. I can't for the life of me figure out how to make a voxel model disintegrate like you have there.
     
  14. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    @K-ANator

    it was just a standard unity particle system (Render Mode -> Mesh, Mesh = Cube) and each particle was just to a voxel position and color.

    you will be able to create a voxel particle system


    and assign the data from the importer..


    I'm still working on the details and polish...but it will be in the next update.
     
  15. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    I've been working on recoding the importer for the next version.

    It uses Unity scriptedImporter, so no need to open a window..just click on the .vox file in project.

    New features requested by customers...
    Preview Voxels
    Preview PivotPoint
    Import single, multi or Merge (large voxels) from MagicaVoxel files.
    Remove Hidden voxels
    Add Physics RigidyBody and Colliders
    Create Data for Particle systems
    Assign Shader for each type

    Current State:
     
  16. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    607
    Hello,
    great asset, it works quite well,
    is it possible to have access to the source code? (to fit my specific needs)
     
  17. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    @Wild-Factor
    it includes all source code except the voxel.dll (a few open source MIT projects I shoved into a single .dll)
    if you need that code, just email or PM and I'll upload the Visual Studio solution.


    Edit:
    Next update, I'll just include a zipped copy of the code with the asset.
     
    Last edited: May 3, 2019
  18. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
  19. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Submitted Free Version to assetstore (pending review)

     
    Last edited: Sep 11, 2019
  20. iMancha

    iMancha

    Joined:
    Sep 22, 2014
    Posts:
    25
    Hi bocs,

    This asset is what I am looking for, I am testing the free version and the import option does not seem to work in Unity 2019.2.3f.

    Says 'working' forever, and logs an error. See attached screenshot.

    Capture.PNG

    Thanks, let me know of any solutions.
     
  21. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    which version of MagicaVoxel are you using?
    I think the file format has slightly changed and I have not had a chance to verify all versions are imported correctly.

    Don't believe this a Unity version issue, but I'll test and update soon.
     
  22. iMancha

    iMancha

    Joined:
    Sep 22, 2014
    Posts:
    25
    Tried different versions, same result. In the demo there are .vox files(gunship, carrier, etc), they do the same thing when clicking on them - So I'm not sure what the issue is :(
     
  23. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    ok, I should have time this weekend to investigate more.
     
  24. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Hi, I would like to purchase this asset. Does it re-import the MV model to back into Unity with a whole texture i.e. so I could dissolve the model using Brackeys solution as currently MagicaVoxel textures are linked to each individual voxel thus making any applied dissolve effects pretty useless? Is the asset all up-to date and working with 2019.3.1f1 and the above issue resolved? (100% purchase if the above is correct).

    Dissolve issue:
    https://www.reddit.com/r/Unity3D/comments/5hswqv/magicavoxel_and_dissolve_shader_help_doesnt_work/

    Thanks, Cookie
     
  25. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Cookieg82 likes this.
  26. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Thank you for coming back to me! Really appreciate it - I am building an RPG and had a few requests to implement exlpoding voxels as a mechanic. I shall go with the Free version to test it out. Thanks again.

    Cookie
     
  27. BenWilles

    BenWilles

    Joined:
    Mar 9, 2018
    Posts:
    41
    Hi. just purchased your asset and wanted to test importing but the import window is simply not there in Tools!? Unity 2019.3
     
  28. K-Anator

    K-Anator

    Joined:
    Feb 25, 2017
    Posts:
    6
    If I read the most recent update correctly, you just click on the VOX file now, no need to open an import window.
     
    BenWilles likes this.
  29. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    I responded to your email, so feel free to continue here or emails.

    K-ANator is correct, no import window is needed, just copy the vox to your project and click on it.

     
    BenWilles likes this.
  30. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Is this still in development? Thanks!
     
  31. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    That was added 3 updates ago :)
     
    Cookieg82 likes this.
  32. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Oh you are joking! That is going to transform my game. Thank you!!!!!!!! I would kiss you but you know...
     
  33. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Quick Q: Is it optimised? Does it heap/garbage heavy?
     
  34. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Just purchased the full suite. Fantastic asset. Thank you!
     
  35. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    MagicaVoxel's limit is now 256, so is it possible to increase the size to 255?
     
    Last edited: Feb 1, 2021
  36. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Do you mean export?
    I just tested a 8 x 256 x 8 and was not a problem on import.
     
  37. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    This is the size when converting to voxels.
    Currently it is 125, but can you expand this?
     
  38. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Simple update, I'll add it after some more testing. I'll show you where you can change it for now.

    Example of 256 export... 256.png


    Just edit these lines in the code.....
    editfile.jpg
     
    Cookieg82 likes this.
  39. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    Thank you very much!
     
  40. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    Is there a function to know how many pixel * pixel * pixel the object is on the export screen?
     
  41. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    MagicaVoxel saves the voxels as Position (XYZ) + Color Index, currently the size is only calculated during save with this code.

    Code (CSharp):
    1.             Int32 sizeX = 0;
    2.             Int32 sizeY = 0;
    3.             Int32 sizeZ = 0;
    4.             for (int i = 0; i < selectedVoxelInfo.Count; i++)
    5.             {
    6.                 if (selectedVoxelInfo[i].pos.x > sizeX) sizeX = selectedVoxelInfo[i].pos.x;
    7.                 if (selectedVoxelInfo[i].pos.y > sizeY) sizeY = selectedVoxelInfo[i].pos.y;
    8.                 if (selectedVoxelInfo[i].pos.z > sizeZ) sizeZ = selectedVoxelInfo[i].pos.z;
    9.             }

    I'll look into adding that also since it is not a simple 1 line code change.
     
    Cookieg82 likes this.
  42. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    I appreciate your kindness.
     
  43. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    Is it possible to import materials such as metal and grass set by magicavoxel with unity?
     
  44. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Yes, just check the "Materials" box

    *Not in free version

    upload_2021-2-15_15-37-52.png
     
    Cookieg82 likes this.
  45. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
  46. kuromatu

    kuromatu

    Joined:
    Dec 27, 2019
    Posts:
    22
    Is it possible to export in obj format instead of vox format?
     
  47. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
    Not directly

    1. MagicaVoxel has OBJ exporter

    2. From Unity

    -Create the vox, import it as a prefab
    -Use mesh exporter

    Unity has an FBX package, and a free OBJ asset on the assert store (untested)
    https://assetstore.unity.com/packages/tools/utilities/scene-obj-exporter-22250

    I'll put it on the request list, but Priority is on re-coding the importer to handle lightmaps better currently.
     
  48. Circlenumber

    Circlenumber

    Joined:
    Aug 5, 2013
    Posts:
    23
    Can import model and color to VoxEdit?
     
  49. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    413
  50. cultmethod

    cultmethod

    Joined:
    Apr 23, 2020
    Posts:
    1
    Is there a way to use this tool to convert obj/fbx files to vox? It looks way better and more accurate than FileToVox. Would be happy to buy if this can be done independent of Unity.