Jump to content
3DCoat Forums

Voxels SDK


Recommended Posts

This is simple Voxels IO SDK that allows to load, save and perform simple operations over 3b files that contain voxels.

This SDK may be used to make coversion between 3B files and other formats or for batching operations over 3B files.

Multiple objects in scene are supported.

VoxelsSDK.zip

This is 3B file specification:

3B_file_format_specification-changed1.doc

There are no restrictions on SDK files usage. It will be good if you will extend it by other useful examples.

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
  • Member

thanks andrew for this very useful SDK. I've successfully loaded and parsed the test.3b file that is in the SDK example zip; however, when I create my own 3d coat voxel file (for example, just create a voxel sphere, and save), I find that the saved .3b file does not contain the expected 'VOL3' chunk. instead, these are the chunks that I find using the loading code from the SDK:

MESH

-- RNDR

-- NSYZ

-- NBLN

-- MSSK

-- SYPL

-- SSPC

-- LR01

-- MTLS

-- MTEX

-- OBJS

-- RNTS

-- UVST

-- SUBD

-- VMAP

-- VMTP

-- POS0

-- UVS0

-- SAR7

I must be doing something wrong! How do I save a .3b file with a VOL3 chunk that can be read by the SDK?

thanks!

alex

Link to comment
Share on other sites

  • Member

VOL3 appears only if scene contains voxels. Are you sure that there was voxes?

yes. unfortunately I can't seem to attach .3b files to the forum, but if you load the .3b file from the voxel sdk (test.3b), then touch it once with eg the voxel grow brush, then save it to a new file, that file doesnt seem to have a 3VOL chunk (ie you get the result above). it loads fine in 3d coat fine tho!

I'm using 3d coat 3.5.19A(DX64).

I must be doing something really dumb...? or did you change the chunk format? is there some group/layer chunk that I need to 'look inside'?

Link to comment
Share on other sites

  • 2 weeks later...
  • Member

<bump>

sorry to bump this, still have no success loading voxel files from 3d coat.

I've uploaded an example .3b file here that contains a simple voxel shape made with voxel/sphere and voxel/grow tools:

http://dl.dropbox.com/u/1006238/testvoxels.3b

when I process it with the voxelsdk, I get a list of chunks as above, with no VOL3 chnuk.

I wonder what I am doing wrong?

thanks for your help.

Link to comment
Share on other sites

Excuse for late reply. If I am not answering too long it is good idea to drop me letter to support :)

I downloaded both SDK and your file. Opened project, set command line to direct to downloaded file, set breakpoint at line 28, VoxelReader.cpp

The signature VOL3 was found successfully. So all works as expected :)

Possibly you was seeking directly VOL3 in binary. All signatures are in reverse order - there will be 3LOV in binary image.

Link to comment
Share on other sites

I discovered a bit deeper. In newer version of 3b there is chunk of zero length and zero signature after SAR7. It should not be problem for reader, this block should be just skipped as other blocks. SDK reads file successfully. Probably it was source of your problems.

RDNR [8]

ZYSN [0]

NLBN [0]

KSSM [20]

HTPE [88]

LPYS [20]

CPSS [0]

10RL [626]

SLTM [360]

XETM [129]

SJBO [228]

STNR [367]

TSVU [386]

DBUS [0]

PAMV [4]

PTMV [49]

0SOP [0]

0SVU [8]

7RAS [32]

[0] <- this is block that you handled incorrectly

CSMC [61]

LITS [2236]

1PTR [240]

MMYS [8]

1MVU [232]

next one - 3LOV block

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...