This looks really helpful. That Slab6 thing was awful. It locked up my mouse so that I couldnt even use it outside of the program. I kind of expected better from the father of the Build engine.
But anyway, this is really nice. I just need to get my butt back into 3d modeling again.
this looks awesome.
being mostly computer illiterate though, i cannot get the cmd to work. when i try to go to my binvox folder
C:\Users\Aaron\Desktop\Binvox, it comes back with a " Desktop\Binvox is not a recognized folder, batch, executable"....etc etc. anyone willing to help with that?
this looks awesome.
being mostly computer illiterate though, i cannot get the cmd to work. when i try to go to my binvox folder
C:\Users\Aaron\Desktop\Binvox, it comes back with a " Desktop\Binvox is not a recognized folder, batch, executable"....etc etc. anyone willing to help with that?
Maybe just put in the full path? You should just need to type:
cd C:\Users\Aaron\Desktop\Binvox
If there are spaces in the name of the path, like if the folder was off of "My Documents", you need to put quotes:
cd "C:\Users\Eric\My Documents\minecraft\vox_package"
Perhaps Patrick could consider making counting a bit easier in these cases? Perhaps, like Photoshop, having a grid you can turn on and off, with thick lines every 10 blocks and thin lines every 1 block. I'm imagining an empty 3D grid across the whole selected slice, 100% wide and 1 block high.
Yes, I'd like something like this, too. You can get close to this by turning on orthographic viewing with "p" and then look down the Y axis with "y". I tend to start up viewvox and immediately type "1aspy", which turns on numbers, the slice with alternating colors, and orthographic looking down Y. Orthographic aligns the grid with the voxels. Here's what it looks like with the chevalier model, for example:
Different grid line colors would be a plus, say light gray for most and white for every 10th or 5th column and row.
Hey... that's not fair... how do you get a grid like that?
I've got *some* grid... but not one per block/pixel.
Is this a PC option that the Mac Viewvox doesn't have?
I'm using Version 0.32, build #179
Get the latest viewvox and you too shall have this feature (maybe - I'm not sure if Patrick updated the Mac version; you can beg him if he hasn't). My version is 0.33.
Soo, i need some help here. I just created an awesome fish (lol) in Blender, and now i want to convert it into Binvox format. Is there any way i can do this?
Easy-peasy: In Blender you want to export your object to something binvox likes. I suggest Wavefront OBJ, since it's a simple format and plenty fine for binvox. So in Blender, File | Export | Wavefront (.obj)... Just save to some file, preferably in the directory where you put binvox, and then in CMD, once you're in the same directory:
binvox yourfile.obj -down -down
should make a conversion of yourfile.obj to yourfile.binvox. There are a lot of options you can add to that line to make the conversion be more like what you want (I put the -down -down in there so at least the model will be 64 meters high at most). You can then view the binvox file by
I took screengrabs of every slice and then added in the colored grid so I could count easier. Before I did that, I had several failed starts where slices were not aligning properly. After doing this, it was easy to know I was at the intersection of blue and orange and things got a lot easier.
I've got some cool ideas in my head, but I'm still pretty burned out from doing Rushmore so I'm working on a much smaller level these days.
The colored grid is a lifesaver,... I could easily count blocks in groups of 4, and it got rid of all my mis-alignments. made it really nice when there were long rows since I didn't have to count every block.
However, if your project is long, and not tall (such as my ant) you can get away with only inserting '-down' once. Just double check it wont break the height limit first!
also, erich, or anyone really. I found a really cool image of a shopping trolley, but even though I have tried inserting -c and -dc to thicken up the layers, I still get a lot of the thin bars missing. Is there any other way around it. Also, how did the image of the upside down warrior work? was it simply done by laying the top layer on the floor and working down through the layers whilst building up (if that makes sense) lol. top layer becomes bottom layer. I just didn't know if there was a way of rotating. for example, I can rotate my image to look at it from any angle, however the bottom of the image, will always be the bottom.
It's worth going through the arguments here, as they address some of your concerns. "-aw -dc" helps catch those voxels that don't flag. "-dmin 1" also helps considerably: it says "whenever -down is applied, if any voxel is filled in the 2x2x2 area checked, then make the new voxel filled." So "-down" both downsamples (lowers size by a factor of 2) and lets you decide how much each 2x2x2 volume that is downsampled should be "counted".
Finally, -d 536 is important in helping to catch features, because of "-dmin 1". The default resolution is 256. Patrick says the max resolution is 1024 (on modern GPUs this could be considerably larger and offscreen buffers could be used, but the program would take a good long while). Anyway, by starting with a high resolution and doing more -down's, you'll catch more features. It's still not perfect, but will catch a fair bit more. Why 536? Because I found the output model was then 64 voxels tall - Patrick puts in an "empty zone" around the model (I think he may change this), so I needed a number larger than 8*64 (512) to get output that was 64 voxels high.
edit: I forgot to mention that "-rotx -rotx" turns the model upside down.
Me, I'm probably going to add a method to binvox to brute force it on the CPU-side and get the exact answer, vs. the lossy (but fast) GPU solutions - this should be good for a "final run" where I'd be willing to wait. In case I get hit by a bus before I do it, my plan is to use Akenine-Moeller's triangle/box test, going through each triangle. Speed ups:
Check only voxels in the triangle's bounding box (duh).
If the voxel is already filled, don't test the triangle against it (double duh).
If the triangle is 2x1 or smaller, simply mark the voxels for its three vertices (semi-clever, and faster).
There are some more elaborate speedups for large triangles, I may write a paper... Anyway, we'll see.
Like Patrick says, you can probably most easily rotate your model(s) by simply using Blender. Me, because I love writing Perl programs, I wrote a little customized script to rotate the teapot model by 45 degrees. It's a total hack, but I might as well include it here for the heck of it, since there's a tiny chance someone might find it useful.
#!/usr/contrib/bin/perl
# rotate_obj.pl: script to read in OBJ file and put out a rotated file.
# Eric Haines, [email protected]
# usage:
# perl modFile.pl infile.obj outfile.obj
&PROCESS_ARGS() ;
# rotate along X axis 45 degrees.
$rotationX = 45/180*3.1415926353;
$mtx[0*3+0] = cos($rotationX);
$mtx[0*3+1] = -sin($rotationX);
$mtx[0*3+2] = 0;
$mtx[1*3+0] = sin($rotationX);
$mtx[1*3+1] = cos($rotationX);
$mtx[1*3+2] = 0;
$mtx[2*3+0] = 0;
$mtx[2*3+1] = 0;
$mtx[2*3+2] = 1;
&READDATA() ;
exit 0 ;
sub USAGE {
print STDERR "usage: rotate_obj.pl infile.obj outfile.obj\n" ;
exit 1 ;
}
sub PROCESS_ARGS {
local($arg) ;
$have_infile = 0;
$have_outfile = 0;
while(@ARGV) {
$arg = shift(@ARGV) ;
# minus sign at start of argument? Then handle it specially
if ( substr($arg,0,1) eq '-' ) {
# $arg will hold the argument without the leading '-'
$arg = substr($arg,1);
# do whatever you want to do with the rest of the argument(s)
} elsif ( $have_infile == 0 ) {
$infile = $arg ;
$have_infile = 1;
} elsif ( $have_outfile == 0 ) {
$outfile = $arg ;
$have_outfile = 1;
} else {
printf STDERR "error: extra argument $arg\n" ;
&USAGE();
}
}
if ( $have_outfile == 0 ) {
printf STDERR "error: too few arguments\n" ;
&USAGE() ;
}
}
sub READDATA {
unless (open(INFILE,$infile)) {
printf "Can't open $infile: $!\n";
exit 1 ;
}
unless (open(OUTFILE,'>'.$outfile)) {
printf "Can't open $outfile: $!\n";
exit 1 ;
}
# select output file for print operations
select(OUTFILE) ;
while (<INFILE>) {
chop; # strip record separator
my @fld = split(' ',$_);
if ( $fld[0] eq 'v' ) {
# vertex, so rotate it.
# do 90 degree adjustments here
$point[0] = $fld[0+1];
$point[1] = $fld[2+1];
$point[2] = -$fld[1+1];
for ( $pos = 0; $pos < 3; $pos++ ) {
$respoint[$pos] = 0;
}
for ( $coord = 0; $coord < 3; $coord++ ) {
for ( $pos = 0; $pos < 3; $pos++ ) {
$respoint[$pos] += $point[$coord] * $mtx[$coord*3+$pos];
}
}
printf "v $respoint[0] $respoint[1] $respoint[2]\n";
}
else {
printf "$_\n" ;
}
}
}
This is awesome. I put some star trek models in thanks to this program and im pretty happy with them. I did use the binvox to schematic converter though.
Uploaded with ImageShack.us
One of the ships has a Bridge on it, and I'm working on hollowing out the others.
Is there an idiot version? You know... like 'yeah, you just put this doohicky in this thing-a-majig and bob's your uncle'. But then again, I did just read it again and it made a little more sense. Where would I be able to access the code in order to make these alterations?
The part "-d 536 -aw -c -dc -dmin 1 -down -down -down" does all that binvox possibly can to mark as many voxels as possible. Change the 536 to whatever you want in order to change the size of the model. Oh, and I forgot in my original post to mention that "-rotx -rotx" rotates the model so that it's upside down; that's how I flipped the knight model.
As far as getting the code goes, Patrick has his "pre-Minecraft" version for download at his site. However, he's been changing the code frequently (while also adminning our private server, Link Removed, and setting up mapping utilities, and actually playing) so hasn't had the time to bundle up the latest source code, despite my nagging :Pig:.
BTW, shout outs to groovybanana for his great knot model, nice idea. Fritzalo's Star Trek parking lot is also amusing, though I have to admit that the thrill factor is lower than others' efforts, since it's a .schematic import. Still, fun to see. For some sick reason ("I like knowing people spent hours and hours of time placing blocks") I find the bespoke models more impressive - please do mention in your posts whether they're hand-made or imports.
HC = Handcrafted / IM = Imported
MR = Mined resources / IR = Infinite resources
M = Mods / NM = No mods
Mine would all be HC-IR-M
I've yet to see someone go the whole way... the absolute most impressive for me would be CM-HC-MR-NM -- created model themselves rather than downloaded, hand-crafted build, with mined resources and no mods (on single-player survival, hard mode) :smile.gif:
Well, the teapot and knight models were HC-MR-NM, FWIW - yes, I smelted 3160 stone for the knight model, making an ecology-friendly tree farm to harvest fuel was a fun challenge. No CM (created model); I did write a program to tessellate the spline surfaces for the teapot, but the teapot itself is an iconic computer graphics model. Also, it doesn't help that I suck at modeling, even though my company (Autodesk) makes some of the most popular modeling programs out there (3DS Max, Maya, SoftImage, Mudbox, etc.).
But anyway, this is really nice. I just need to get my butt back into 3d modeling again.
being mostly computer illiterate though, i cannot get the cmd to work. when i try to go to my binvox folder
C:\Users\Aaron\Desktop\Binvox, it comes back with a " Desktop\Binvox is not a recognized folder, batch, executable"....etc etc. anyone willing to help with that?
What would be the easiest way to get the blocks/spaces between two legs?
Dress like your favourite mob with Mob Armor!!
Funny Minecraft JOKES & PICS!!
Knock Knock
Who's there?
Interrupting Creeper
Interrupting Cre. . .
Ssss
Oohh Crap. . .
Maybe just put in the full path? You should just need to type:
cd C:\Users\Aaron\Desktop\Binvox
If there are spaces in the name of the path, like if the folder was off of "My Documents", you need to put quotes:
cd "C:\Users\Eric\My Documents\minecraft\vox_package"
Yes, I'd like something like this, too. You can get close to this by turning on orthographic viewing with "p" and then look down the Y axis with "y". I tend to start up viewvox and immediately type "1aspy", which turns on numbers, the slice with alternating colors, and orthographic looking down Y. Orthographic aligns the grid with the voxels. Here's what it looks like with the chevalier model, for example:
Different grid line colors would be a plus, say light gray for most and white for every 10th or 5th column and row.
Get the latest viewvox and you too shall have this feature (maybe - I'm not sure if Patrick updated the Mac version; you can beg him if he hasn't). My version is 0.33.
Easy-peasy: In Blender you want to export your object to something binvox likes. I suggest Wavefront OBJ, since it's a simple format and plenty fine for binvox. So in Blender, File | Export | Wavefront (.obj)... Just save to some file, preferably in the directory where you put binvox, and then in CMD, once you're in the same directory:
binvox yourfile.obj -down -down
should make a conversion of yourfile.obj to yourfile.binvox. There are a lot of options you can add to that line to make the conversion be more like what you want (I put the -down -down in there so at least the model will be 64 meters high at most). You can then view the binvox file by
viewvox yourfile.binvox
viewtopic.php?f=35&t=65950&p=1037310#p1037310
Has anyone else uploaded anything, or is there a better place for placing these for download?
Oh,... and here is what I ended up doing to help align things.
http://i.imgur.com/xCaPG.jpg
I took screengrabs of every slice and then added in the colored grid so I could count easier. Before I did that, I had several failed starts where slices were not aligning properly. After doing this, it was easy to know I was at the intersection of blue and orange and things got a lot easier.
LOL, I can't believe I didn't think about that
THANK YOU
Dress like your favourite mob with Mob Armor!!
Funny Minecraft JOKES & PICS!!
Knock Knock
Who's there?
Interrupting Creeper
Interrupting Cre. . .
Ssss
Oohh Crap. . .
The colored grid is a lifesaver,... I could easily count blocks in groups of 4, and it got rid of all my mis-alignments. made it really nice when there were long rows since I didn't have to count every block.
For the knight I did this:
binvox chevalier.obj -d 536 -aw -c -dc -cb -dmin 1 -down -down -down -rotx -rotx
It's worth going through the arguments here, as they address some of your concerns. "-aw -dc" helps catch those voxels that don't flag. "-dmin 1" also helps considerably: it says "whenever -down is applied, if any voxel is filled in the 2x2x2 area checked, then make the new voxel filled." So "-down" both downsamples (lowers size by a factor of 2) and lets you decide how much each 2x2x2 volume that is downsampled should be "counted".
Finally, -d 536 is important in helping to catch features, because of "-dmin 1". The default resolution is 256. Patrick says the max resolution is 1024 (on modern GPUs this could be considerably larger and offscreen buffers could be used, but the program would take a good long while). Anyway, by starting with a high resolution and doing more -down's, you'll catch more features. It's still not perfect, but will catch a fair bit more. Why 536? Because I found the output model was then 64 voxels tall - Patrick puts in an "empty zone" around the model (I think he may change this), so I needed a number larger than 8*64 (512) to get output that was 64 voxels high.
edit: I forgot to mention that "-rotx -rotx" turns the model upside down.
Me, I'm probably going to add a method to binvox to brute force it on the CPU-side and get the exact answer, vs. the lossy (but fast) GPU solutions - this should be good for a "final run" where I'd be willing to wait. In case I get hit by a bus before I do it, my plan is to use Akenine-Moeller's triangle/box test, going through each triangle. Speed ups:
Check only voxels in the triangle's bounding box (duh).
There are some more elaborate speedups for large triangles, I may write a paper... Anyway, we'll see.If the voxel is already filled, don't test the triangle against it (double duh).
If the triangle is 2x1 or smaller, simply mark the voxels for its three vertices (semi-clever, and faster).
Like Patrick says, you can probably most easily rotate your model(s) by simply using Blender. Me, because I love writing Perl programs, I wrote a little customized script to rotate the teapot model by 45 degrees. It's a total hack, but I might as well include it here for the heck of it, since there's a tiny chance someone might find it useful.
It's a hand holding a torch. It's also my top secret base. Nobody will ever spot it there.
Clever! Beats my Perl script by a fair bit, and it's definitely not programming.
Uploaded with ImageShack.us
One of the ships has a Bridge on it, and I'm working on hollowing out the others.
Right, the idiot version is:
binvox chevalier.obj -d 536 -aw -c -dc -cb -dmin 1 -down -down -down -rotx -rotx
The part "-d 536 -aw -c -dc -dmin 1 -down -down -down" does all that binvox possibly can to mark as many voxels as possible. Change the 536 to whatever you want in order to change the size of the model. Oh, and I forgot in my original post to mention that "-rotx -rotx" rotates the model so that it's upside down; that's how I flipped the knight model.
As far as getting the code goes, Patrick has his "pre-Minecraft" version for download at his site. However, he's been changing the code frequently (while also adminning our private server, Link Removed, and setting up mapping utilities, and actually playing) so hasn't had the time to bundle up the latest source code, despite my nagging :Pig:.
BTW, shout outs to groovybanana for his great knot model, nice idea. Fritzalo's Star Trek parking lot is also amusing, though I have to admit that the thrill factor is lower than others' efforts, since it's a .schematic import. Still, fun to see. For some sick reason ("I like knowing people spent hours and hours of time placing blocks") I find the bespoke models more impressive - please do mention in your posts whether they're hand-made or imports.
:'(
Well, the teapot and knight models were HC-MR-NM, FWIW - yes, I smelted 3160 stone for the knight model, making an ecology-friendly tree farm to harvest fuel was a fun challenge. No CM (created model); I did write a program to tessellate the spline surfaces for the teapot, but the teapot itself is an iconic computer graphics model. Also, it doesn't help that I suck at modeling, even though my company (Autodesk) makes some of the most popular modeling programs out there (3DS Max, Maya, SoftImage, Mudbox, etc.).
In http://www.patrickmin.com/minecraft/ , the binvox is only for Leopard.
Maybe I should use the tutorial inthe forum?