Voxel art sprite program.

Voxel art sprite program.

Postby ThirtyTwo » Fri Sep 23, 2016 2:34 pm

I don't have much programming experience (some c++, less python) but I feel I have an okay grasp on the concepts. So I was just thinking, to create a basic pixel art program, no color, with basic transparency, you need an object that stores an initial Boolean variable for each pixel. If true, that pixel is given a black color, if false, white. Then, to store a color value, you need a list variable for each pixel that contains 3 integers, 0-255, one for red, one for green and one for blue. To make this 3D, you use pyopengl to render a cube for each pixel. In order to take advantage of the 3d space, you would need to create another dimension within the pixel object. This is a voxel art program in a nutshell... I may also need to create an object for the users camera, IDK. I do pixel art, specifically, pixel cars. http://www.pixelcarart.com/index.php? Thought maybe voxel cars would be cool. Since I am still very new to programming, I don't know if my ideas are sound.

SOMEONE ELSE: "It is not so much a programming problem as it is a linear algebra problem.
Storing the voxels is as easy as you make you write (xyz+rgb) but rendering and rotating the view is what is difficult math-wise. If it is easy to render cubes with pyopengl, then I suppose that takes care of your biggest hurdle."

I remember watching tutorials on rendering cubes, it wasn't hard I don't think. Also, this seems helpful; https://pythonhosted.org/pypng/png.html
Plan to make add-ons that can then convert to png will be a programming challenge, then maybe an anti-aliasing addon too. if I can figure out how to make it choose from a set of shades, oh boy, that sounds golden. Maybe I can make different "layers" or basically entities within a voxel scene. So like, when thinking about cars, you have each door that would go on it's own layer, each tire, each light, basically every object in the scene.
Another challenge I think about would be displaying only certain sides of the cube, so when creating scenes and rotating the voxels, less processing power is used. I also think I might try to sell it as a sprite creation tool with basic shapes 3d shapes you can rotate around a 3d scene, converted to voxels. it's not hard really, make a 3d grid, make shapes. if grid space is 50% filled with a shape, that grid space gets a voxel. color is stored in a list variable for each voxel as 3 integers, 0-255, (r, g, cool2.gif. Rotate voxel objects separately from scene. Orthographic projection, with 1 grid space = 1 pixel. repositionable, rotatable and editable 3d pixel cars. after doing this, I could create a rigging system for extremely smooth 2d game characters. antialiasing is done by asking what percentage of a grid space is filled with a shape of what color and rendering a 2d image with and alpha layer that darkens each pixel to that percentage.
Last edited by micseydel on Fri Sep 23, 2016 3:17 pm, edited 1 time in total.
Reason: Initial post lock.
Posts: 1
Joined: Fri Sep 23, 2016 2:28 pm

Return to Game Development

Who is online

Users browsing this forum: No registered users and 2 guests