Author Topic: Sprite to voxel(for real)  (Read 7219 times)

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Sprite to voxel(for real)
« on: 2010-Apr-30 »
New Post:
Almost have it down, some issues with tiny parts dissapearing.  You'll find out what I mean if you test the fridge.bmp file in the program, parts of the handle don't get read for some reason.  Was ignoring the first color picked...

Aside from that, it now creates a simple color palette so your VOX files will have color in Slab6.  However the color is limited to 255(last index is for an empty voxel) and if your image exceed that you'll see some weirdness I'm sure, haven't tested it.

Idealy the max (not tested) size of an image you can use is 255x255 with 255 frames.  This may take awhile so I've added some loading bars to show you its just being slow and not dead.  So far I've only tested a 32x32 image with 8 frames, the fridge.   I've added a doorframe sample too, but this one is just 16x16.
Download strip2voxel043010.zip Some bug in it...

Hopefully I'll get a chance to test some larger sprite strips.

Old Post:

A little while back I started playing with the idea of a fake voxel like dungeon game.  It would generate 3d models based on 16^3 array of cubes.  Then I thought, why couldn't I have it make real voxel files?  So I did!  But currently no color info is transfered yet, but it shouldn't be too difficult now that I've figured out the file format.

Make 16^3 voxels for VOXLAP, no color info yet...

Original topicLast released version, makes models

Download Cube16wVOX.zip

Find Slab6 here
« Last Edit: 2010-May-01 by Scott_AW »
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5073
  • O Rly?
    • View Profile
Re: Sprite to voxel(for real)
« Reply #1 on: 2010-Apr-30 »
I give it a try at home!
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Sprite to voxel(for real)
« Reply #2 on: 2010-Apr-30 »
Either this takes an absolute age to set up (more than two minutes on a pretty fast machine) or all I get is a blank screen.

If it is the former, then it would be nice to inform/warn the user of such. If it is the latter, then there's a problem somewhere.

I gave up in the end.

:(
I came. I saw. I played.

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Sprite to voxel(for real)
« Reply #3 on: 2010-Apr-30 »
My fault, I forgot the font file.  I'm replacing the zip.  Its looking for "sysfont.png" for a quick fix.
« Last Edit: 2010-Apr-30 by Scott_AW »
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10758
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Sprite to voxel(for real)
« Reply #4 on: 2010-Apr-30 »


Aces!!!!

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Sprite to voxel(for real)
« Reply #5 on: 2010-Apr-30 »
That is indeed neat (now that it's working!) :)
I came. I saw. I played.

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Sprite to voxel(for real)
« Reply #6 on: 2010-Apr-30 »
I'll try and get it finished soon, I want to play around with it myself.

I've started the project over and gutted a lot of now unneeded stuff.  It still will display the model though.  The main effort is going to be in the coloring and palette system.  I'm going to do it simple for now, just a palette based on image colors.  However this will mean that you can only use 256 color images.

There is one thing I learned about voxels is that you actually don't want too much variations in coloring, you can get a lot of it from basic shading and lighting.  I'll have some examples when its ready.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Sprite to voxel(for real)
« Reply #7 on: 2010-May-01 »
Small bug in the current release is actually very simple, its ignoring the first color grabbed and marking it as transparent!!!  Quick fix, use a color you'll never use on the top left corner pixel of the first frame.

But this more about a larger test for you guys to check out, it may stall a few times due to the size, I need to add two more progress bars, one for when the view model is created and one for when the vox file is written.

I wanted to make a model, and this was the first object I found.  No, I did not take it apart to get the look of the guts.


And here's it in Slab6, all voxely and a destroyed version.

Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5073
  • O Rly?
    • View Profile
Re: Sprite to voxel(for real)
« Reply #8 on: 2010-May-01 »
NICE!
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Sprite to voxel(for real)
« Reply #9 on: 2010-May-01 »
Rather good - get around 59FPS here

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Sprite2voxel, bug free...maybe.
« Reply #10 on: 2010-May-02 »
http://host-a.net/scott_aw/strip2voxel050210.zip

Should be working now.  There is four loading intensive phases now accompanied by loading bars.  Theres the prepping(clears out a 255^3 grid space), reading of the image, building and optimizing the display model, and finally creating the voxel file.

Included are an updated fridge.png, with a few more layers and junk inside.  Also the a large test model calculator displayed before.

I could reduce or negate the prepping time.  Although I will still need it for doing a batch of images, just it won't need to clear the whole area.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Fixed up some.
« Reply #11 on: 2010-May-05 »
Download strip2voxel050410.zip

A bunch of little changes.  Most important is that I moved the model creation part, which is not really needed, to the end of the program, and now its entirely optional to display the model.  This is good to skip if you're generating large models which will run horribly as a polygon based model.  Unless you have some beast of a system.

Also a quick fix for the getpixel error, a prompt at the beginning will as to set a black range, 0-20.  0 if you experience no rouge black pixels on your objects, 20 if you're not sure how to check how off they are from true black.

Some feedback on limits...256x256 with 10 frames is a bit sketchy.  I wouldn't show a model of it, just escape after the vox files is made.  I didn't include my latest test because they're kind of brutal to my systems.  But if you're super curious how well you machine can handle this, create a image thats 128*128 x 128 and just generate grayscale noise.  64^3 models I've tested, took forever to make the model on a netbook.  If you have a fast system you can pull it off.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10758
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Sprite to voxel(for real)
« Reply #12 on: 2010-May-05 »
http://kyucon.com/qblock/ can you make some editor like that and export to .ddd?
I'd really love to make such a game.
On that size, search by author "Minion" and view "zarch". That would be so cool....

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Sprite to voxel(for real)
« Reply #13 on: 2010-May-05 »

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4159
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: Sprite to voxel(for real)
« Reply #14 on: 2010-May-05 »
I can't help but think of Rittai Picross (Picross 3D) on Nintendo DS -





- that game has consumed vast quantities of my spare time!
I came. I saw. I played.