Sprite to voxel(for real)

Previous topic - Next topic

Scott_AW

It can produce a DDD, in fact my version prior to this did just that.  However that was limited to 16x16x16 at the time, larger models are kind of pushing the limits though.  I'll do a few test and I can reenable to part that exports a DDD file.  I have a way to optimize the model by expanding faces to adjacent like colors, but this ruins normal values.

There's really good example of voxels for the DS on a game called Flipper by Goodbye Galaxy(blog site)
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/

Scott_AW

Download s2v_wDDD040510.zip

This version will now create a DDD file after it creates the display model.  You'll be prompted to choose if you wish to reduce the faces, doing this can reduce file size up to half in the best case but will cause issues with normals so be weary if you light the model.

Keep in mind, the larger the dimensions of the image, 128+ may hangup when creating models.  Models are 20times larger than the vox files on average and likewise are just as slow.  Of course there is no current way to display vox files without Ken Silverman's programs: Voxlap, Slab6, Build Engine, and EvalDraw.

I've been emailing someone who had been working on an OpenGL voxel engine, but haven't heard back yet as of my last message.
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/

Kitty Hello

use AUTONORMALS 0 before X_OBJSTART - makes nice "hard" edges.

Scott_AW

I've used it, the normals get weird because it links up a strip of like faces and just makes one long one.  This results in oddities or imperfect normals at intersections of faces, like a T or such shapes.  Since the face is extended beyond the connection point there is no vectors to properly set the normals there.  At least that's my theory.  That and my method is kind of cheap and easy.

Want to see the code?
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/

Kitty Hello

No. ;)
Try AUTONORMALS 1 (0 was stupid) and then render the thing with X_CULLMODE 1. If you have holes now, the triangles are in wrong order (outside facing inwards).
Once you have the faces correct with X_CULLMODE 1, the AUTONOMRALS 1 should make really blocky blocks.

Scott_AW

I have both of those set, you'll see what I'm talking about if you load one of the models and apply lighting.  Make two versions of the model, one without the face combination and one with.  Sometimes its not that noticeable if the object shape is simple, but you'll see a difference.  If its not that big a difference, great, because the reduce  mode is much smaller and faster.  Of course if your not using lighting always do the reduce.
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/