Projecting Images on to Voxel Objects (A Suggestion)

Jun 29, 2014 at 6:28 PM
Edited Jun 29, 2014 at 7:15 PM
In an earlier post I asked about recolouring the sides of a medkit I was working on. Another user gave me a solution and it worked in that case. (Creating the other side seperately, then using pattern to add them to the medkit)

However ...

A major problem is when the voxel object is made by importing a 3D model, such as this barrel I imported from an OBJ file.

Image

The object is imported as all one single colour. I can not use the object as it is in my game. I would have to recolour it, but there are thousands of voxels on the surface of the barrel, and repainting them all manually would take an absurdly long time.

Second example (fictional):

Let's say I want to create a voxel version of the moon and I have a photo of the full moon.

At present it seems there are only a couple of options for making my voxel moon. I can either import a sphere and manually paint every voxel to match the photo (which would take a tediously long time), or I could import the photo and extrude to full depth, then manually erase all extra voxels in the squared off block until I have turned it into a sphere (which would also take a tediously long time).

Neither of these are good solutions.

Here is my (hopefully) simple solution:

Create the option to project an image onto the voxel object.

First, the user is asked for the filename of the image, and the image is loaded in.

Second, the user would be asked which of six possible directions (Front, Back, Left, Right, Top, or Bottom) he wishes to apply the image.

Third, a popup window showing the voxel object in a flattened version without perspective allows the user to align the image with the voxel object.

The graphics below are a 2D representation of the (hopefully) simple process. The mass of squares represents the voxels in a solid object. The coloured bars represent the individual pixels in the image. In the example the image is being projected from the front.

Image

Each voxel closest to the front takes on the colour of the pixel it is aligned with in the image.

Image

This leaves the front side of the object coloured to match the image.

Image

Notes:

If the image is smaller than the object, then voxels outside the bounds of the image would be unchanged.

If there are any transparent pixels in the image, then the voxels aligned with the transparent pixels will remain unchanged.

The user would be responsible for properly scaling the image and making sure it is using the correct palette.
Jun 29, 2014 at 10:39 PM
While your way works, a much more simple (for the user) solution would be adding pngs to possible patterns so we can Shape-> ">"->Pattern them just like we already do with lines, cubes and spheres
Jun 30, 2014 at 12:58 AM
Edited Jun 30, 2014 at 2:07 AM
How does that get an image on to an oddly shaped object?

I would like to know. There are several object I would like to have coloured.

{{EDIT: I would like you show me how it is done.

Download this voxel object I made by importing an OBJ head into Magicavoxel.

Head.vox

Please copy this render of the same OBJ model the voxel object was made from. I have already scaled it for you.

Image

Now show me how to put that face on to that head.

Please go into detail. Leave nothing out. Take screen shots. Let me know exactly how you do it so I can do it too.}}
Jul 26, 2014 at 4:59 PM
Edited Jul 26, 2014 at 7:36 PM
Sorry for the double post, but it has been a month since I posted my suggestion, and since the only response I got was basically "i iz 1337! ur idea sux!", I was wondering if there has been any consideration of my idea since I posted it.

{{EDIT: I just read the new features thread, and saw "PNG Image Brush". That sounds very promising.}}
Coordinator
Aug 19, 2014 at 8:46 AM
Hi Boingeo_the_Clown,

That's a good idea, and exactly what I was thinking of.

I have already put it on the todo list : https://voxel.codeplex.com/discussions/552199
Nov 10, 2014 at 1:05 AM
I am curious if there has been any progress on that. It is really a feature I am really in need of.

I put the barrel pictured at the beginning of this thread into my game mod yesterday to see how it looks.

Since I really can't do any more than a basic paint job, and since the game only has flat uniform lighting, this is the result I got.

Image

So you can see why I am anxious for this feature.
Coordinator
Nov 15, 2014 at 5:39 PM
Hi Boingo_the_Clown,

I think I need to solve two problems to make this feature available :
  1. how to import the image with the 256-color palette ( not all of the colors can be represented correctly )
  2. how to decide the project center of the image ( 6 planes basically )
but it will be a good feature, so I will put my effort into it. Thanks!
Mar 18, 2015 at 2:57 AM
Edited Mar 18, 2015 at 10:37 AM
I am bumping this thread to keep the subject from being forgotten.

:-)

It is a vitally important feature request for me.
Jun 23, 2015 at 2:07 AM
Hi.

It has been an entire year now.

Has there been any progress with this feature?