Author Topic: I Need Somebody to Write a Utility For Me.  (Read 2422 times)

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 68
  • Posts: 2692
  • Losing my grip on reality since 1973.
    • DooM Legends
I Need Somebody to Write a Utility For Me.
« on: August 26, 2015, 10:57:20 AM »
I need a utility written for me.

First, a little background:

As you know, I have been making a few voxel objects for DeiMWolf using a program called Magicavoxel.

You may also recall that I imported a wooden barrel OBJ model into Magicavoxel.  The model was converted to voxels, but it was all a single colour.



Magicavoxel does not have the painting tools to repaint the barrel in the way I need it to.  It can paint individual voxels or paint areas with a single colour.  This is insufficient for the task.  With thousands of voxels to be painted individually, the amount of time and effort required to realistically repaint the barrel voxel by voxel would be absurd, and would really not be worth it.

It is also possible to import bitmaps into Magicavoxel and extrude them as shown here, ...



... then manually delete voxels until each extruded bitmap is the same shape as the object you want, but that is also time consuming and difficult.  Last week I did exactly this when I decided to redo the floorlamp shade.

It took me two days, several hours each day.

So it is not an acceptable solution either.
 
14 months ago, in June of last year, I asked the programmer in charge of Magicavoxel to add the ability to apply a bitmap to a voxel object.  He indicated on a few occasions that he was going to add the function, but it is now over a year later and I am still wishing and waiting.

The whole thing can be done in a very simple utility.  Unfortunately, the last program I ever wrote was in BASIC on a Commodore 64 back in 1992.  I do not have the programming knowledge needed.  I can not write it myself.

I need someone with programming experience to knock out a quick and dirty utility for me so I can apply the colours from an indexed (256 colour) bitmap to a voxel object in .VOX format, or else the barrels in DeiMWolf will continue to look like this:




What I need:

I am looking for a simple, bare bones utility that will load a voxel object from a Mogicavoxel .VOX file (file format here under "VOX Format") into a 3 dimensional array (X,Y,Z), then load an indexed 256 colour bitmap (whatever file format is easiest) into a 2 dimensional array (X,Y), then for each pixel X,Y check each of the coordinates of the voxel object X,Y,Z from front to back and and change the index number of the first (only) voxel it finds to the index number of the pixel of the bitmap, and finally save the voxel out to a new file, but replacing the old palette with the palette of the bitmap.



So the question is whether or not there is anyone with programming experience willing to help on this.

While the barrel is the only specific item I have to use the utility on at the moment, the lamp shade most certainly could have used it, and I am certain there are other items that will come up in the future, not just for me, but for other users.

Anybody interested?

Offline Awesomedude249

  • What am I supposed to put here?
  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 33
  • Posts: 2113
  • I'm not really sure.
Re: I Need Somebody to Write a Utility For Me.
« Reply #1 on: August 26, 2015, 12:55:43 PM »
Sorry. I don't have the programming knowledge. I am learning how, though, so I might be able to do it once I learn.
I used to be the new guy that no one talks to, now I'm just the vaguely familiar guy that no one talks to

Offline MajorSlime

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4308
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: I Need Somebody to Write a Utility For Me.
« Reply #2 on: August 26, 2015, 06:11:12 PM »
Hmm, this sounds like a fun small project that I might consider doing, but give me a week before I can even think about getting started. I'm moving back up to my college dorm in a week's time, and so will have better internet and everything setup to work with.
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 68
  • Posts: 2692
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: I Need Somebody to Write a Utility For Me.
« Reply #3 on: August 26, 2015, 08:26:14 PM »
I've waited over a year already.

Waiting another week won't kill me.   8)

Offline MajorSlime

  • Self-Proclaimed ACS Grandmaster
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 18
  • -Receive: 29
  • Posts: 4308
  • If life gives you lemons, give its lemons back!
    • Chex Quest: Reflections
Re: I Need Somebody to Write a Utility For Me.
« Reply #4 on: September 13, 2015, 07:45:14 PM »
Can you send me an example voxel file and bitmap to work with?
Shh!  I'm taking a break from reality.

John 3:16
For God so loved the world, that he gave his only son, that whoever believes in him shall not perish, but have eternal life!

Give God your life; You won't regret it!

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 68
  • Posts: 2692
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: I Need Somebody to Write a Utility For Me.
« Reply #5 on: September 14, 2015, 11:42:45 AM »
Yes.

PM me your email so I can send them to you.

Also, I recommend that you download Magicavoxel from https://ephtracy.github.io/ or https://voxel.codeplex.com/

One of the example files is a tiny 3 x 3 x 3 voxel that will probably be useful for practicing on, because the file is so small.

Offline 75

  • [IFOC] Server Admin
  • Multiplayer Team Leader
  • Chex Master
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 30
  • Posts: 4251
    • IFOCSERV
Re: I Need Somebody to Write a Utility For Me.
« Reply #6 on: September 19, 2015, 09:36:47 PM »
Can you send me an example voxel file and bitmap to work with?

Remember that voxels are hollow, you might like Ken's Slab6 editor, you can find it on this page http://advsys.net/ken/download.htm

Everything he does is open source, if you can read it there's some really good stuff there, there's voxel reference code in zDoom and Eduke32, too.

If you want some background stuff:

http://advsys.net/ken/voxlap.htm

http://zdoom.org/wiki/Voxel

I wish I could help Boingo out but I'm too busy with other coding projects at the moment, hopefully I can at least help you get started a little.

EDIT: whoops, I accidentally wrote "I wish I could Boingo out". That sounds kind of funny

EDIT 2: Oh and Slab6 and Magickavoxel show the voxels as being pixel shaded (i.e., you can see the shadows of voxels on the surface) but in zDoom/GzDoom it's all flat shaded, like the barrels in the screenshot (all pixels equal brightness, where that brightness is the (ambient) lighting of the sector, not the directional (specular) lighting Slab/Magicka uses).
« Last Edit: September 20, 2015, 07:54:09 PM by 75 »
"Give us those nice bright colors, give us the greens of summer, makes you think all the world's a sunny day."

You can find me on the CQFF discord: https://discord.gg/AgNhjem

Offline Boingo the Clown

  • Global Moderator
  • Flembrane
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 68
  • Posts: 2692
  • Losing my grip on reality since 1973.
    • DooM Legends
Re: I Need Somebody to Write a Utility For Me.
« Reply #7 on: October 09, 2015, 03:19:23 PM »
RE Edit 2: Yes. The voxels do not cast shadows or have any shading in GZDooM, which means having a way to recolour the voxels based on bitmaps is essential.

 


Web Hosting by InMotion Hosting