BASIC

Author Topic: Strip2Vox v3 beta  (Read 755 times)

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Strip2Vox v3 beta
« on: 2013-Feb-26 »
Use a image strip(series of images in one vertical or horizontal tile) to create a VOX file(a raw 3d voxel model) which can be converted in Slab6 to be used with build engine or whatever else.

Also exports a DDD file, glbasic model file and a OBJ w/ MTL files for use in other projects.

This is just a beta, so the OBJ doesn't have proper normals defined, nor is it optimized much.

It also creates a MTL file with the object which includes all the color info.

As a simple test, I ran a 16x16x3 strip, opened the obj in Anim8tor, export it as a 3ds, and then used poly2vox to convert it into a voxel again.  Its not worth the effort though as poly2vox creates some garbage pixels even if the models is made of cubes.  Still, a fun test, and the color data was retained in the 3ds.

However, my next step before I start to optimize the model building is to allow you to reverse a VOX file into a model.

The normal issue seems to be simple, and I just kind of threw empty ones in for now, just will take some tweaking.
« Last Edit: 2013-Mar-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 erico

  • Prof. Inline
  • *****
  • Posts: 2977
    • View Profile
    • Portfolio
Re: Strip2Vox v3 beta
« Reply #1 on: 2013-Feb-26 »
looks great!

I imported one result OBJ into lightwave.
Normals are flipped and the quads inside an object are not attached to neighbours, so you have overlapping points.
Both easily fixed inside the 3d editor.

I like this, I own VOXATRON and sometimes I think it would be cool to export its files to other programs.

Your app is doing great job, I will give a try on a more robust model later.  :good:

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Strip2Vox v3 beta
« Reply #2 on: 2013-Feb-26 »
Just be careful, as I don't have a loading phase for the obj creation like I do with the VOX, which means it crams all the processing together after doing the first model and could freeze on a highly detailed model...but if you're feeling daring, let me know where it craps out at.

As for the model, I'll just have to refine how it builds the structure, its sloppy, but functional.
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 erico

  • Prof. Inline
  • *****
  • Posts: 2977
    • View Profile
    • Portfolio
Re: Strip2Vox v3 beta
« Reply #3 on: 2013-Feb-27 »
VERY functional, one good thing about the detachable quads on a 3d package is that I can work them out from there.
If things were merged, there would more trouble to unmerge them.

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Strip2Vox v3 beta
« Reply #4 on: 2013-Feb-27 »
Taking that into consideration, I may just work on fixing normals and reducing the polygons.  You will still have the option between a full detail model and an optimize one.
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 matchy

  • Prof. Inline
  • *****
  • Posts: 1377
    • View Profile
Re: Strip2Vox v3 beta
« Reply #5 on: 2013-Feb-27 »
Sounds cool. Perhaps some screenshots please?

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Strip2Vox v3 beta
« Reply #6 on: 2013-Feb-27 »
<a href="http://www.youtube.com/watch?v=KSNyZjMSGxo" target="_blank">http://www.youtube.com/watch?v=KSNyZjMSGxo</a>
Here's a demo video. :)
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 erico

  • Prof. Inline
  • *****
  • Posts: 2977
    • View Profile
    • Portfolio
Re: Strip2Vox v3 beta
« Reply #7 on: 2013-Feb-27 »
How are you setting up the pivot point of the object (origin)? Is it centered by default?

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Strip2Vox v3 beta
« Reply #8 on: 2013-Feb-27 »
Currently not, but I can add that in too.
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 erico

  • Prof. Inline
  • *****
  • Posts: 2977
    • View Profile
    • Portfolio
Re: Strip2Vox v3 beta
« Reply #9 on: 2013-Feb-27 »
Tried the calculator test, took quite a while.
Windows reported ´stopped working´ a few times, and on the second part, there was a ´pause´ too, so I dedn´t know if I had to keep the windows in focus or not.

It took quite a while to do the OBJ file.

Here is a screen shot of it, you can see one pink quad garbage there on the lower left.
As for the pivot, X and Y are centered, Z is a bit off

EDIT: the obj is also about 10 megas
« Last Edit: 2013-Feb-27 by erico »

Offline erico

  • Prof. Inline
  • *****
  • Posts: 2977
    • View Profile
    • Portfolio
Re: Strip2Vox v3 beta
« Reply #10 on: 2013-Feb-27 »
Another little test with CUBerico, a 16x16 one.
It goes quick on 16x16!

I´m appending the result files and an image of it on lightwave 3d.

Here is what I noticed about materials as you can see on the surface panel.

- 11 surfaces according to each color (cool!)
- each surface has an UVmap (cool!) don´t know yet if they work as supposed.
- Diffuse is set to 5.8824% on all materials, I´d expect it to be 100%?
- specular is at 100%, I´d expect it to be 0%(no shining object)?
- They come with a Vertex normal map too, but I didn´t try it.

That is it for now, quite fun stuff you got going.
« Last Edit: 2013-Feb-28 by erico »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *****
  • Posts: 10438
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Strip2Vox v3 beta
« Reply #11 on: 2013-Feb-27 »
This screams for a DDGui interface ;)

Nice work.

Offline Scott_AW

  • Mr. Polyvector
  • ***
  • Posts: 214
    • View Profile
    • SAW Game Design
Re: Strip2Vox v3 beta
« Reply #12 on: 2013-Mar-01 »
@KH - Plan on adding an interface once I get a little further.  I have one laying around that I been meaning to use.

@erico - Thanks for the feed back.  You'll notice that when it makes the vox it has a loading screen, that's what's missing at the obj writing phase which can cause major lag on large objects

I think I left a pink pixel in the original calculator strip, that came out good though, I haven't tried that one yet.

Some material values aren't being set yet either, so maybe those values are being set to some kind of default.

OBJ files are pretty big, but then they're actually written out as script, so converting it to another model format should reduce the file size greatly.

I've replaced the file with one that has a little loading display as the obj is being written, won't seem like its hanging.
« Last Edit: 2013-Mar-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/