Author Topic: HandOb maker  (Read 29299 times)

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: HandOb maker
« Reply #15 on: May 11, 2020, 09:42:17 am »
@FilmFan84
Hmm, I don't know anything about OpenApoc, so I'll have to look it up. The size of the source image and output images can be increased without much trouble, but I'm not so sure it will look good. I'll try it. There is also the minor problem of the speed of the program. For larger images, it will slow down even more than it already is. But I think I can still optimize it.

@osd_daedalus
I haven't really made it robust, as I was just using it for myself and knew what to do. If you have a bug report, I guess you can post it here?
I don't have it in a versioning system, but maybe I'll convince myself to put it there one of these days.

@Yankes
I've tried coming up with something for units, but it's complicated. They end up looking like gingerbread aliens. So I'm not so sure it would be useful. The input would basically have to be images from all sides and even so, it probably won't come out looking all that great.
But maybe it can still work as a fast prototyping tool? Just the basic rotations, maybe some cutting up. I haven't tried making any units myself, so the process is unknown to me. If there really is a demand for that I can try to make it.

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: HandOb maker
« Reply #16 on: May 11, 2020, 05:01:03 pm »
Is this video relevant for units? https://www.youtube.com/watch?v=bk0PXMgZgQg

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: HandOb maker
« Reply #17 on: May 11, 2020, 07:27:20 pm »
The fact that you can take a random sprite from a completely different game and make it work...

If this were to be expanded to units by someone else they would need to know Visual Basic.
Or C#, as both work on same framework you could easy "translate" logic from one to another, and write new code in preferred one.


@Yankes
I've tried coming up with something for units, but it's complicated. They end up looking like gingerbread aliens. So I'm not so sure it would be useful. The input would basically have to be images from all sides and even so, it probably won't come out looking all that great.
But maybe it can still work as a fast prototyping tool? Just the basic rotations, maybe some cutting up. I haven't tried making any units myself, so the process is unknown to me. If there really is a demand for that I can try to make it.


Yup, simple conversion from 2D image to "3D" is impossible because you do not have import data like "what is behind" or "thickness" of final unit.
But one way this could be done by creating "texture", (similar as in normal 3D games) and you map each pixel to final pixel in graphic.
This would need lot of work to create this mapping, ((x,y) of image to (x,y,z) then create render for each side in (x,y)).

Offline osd_daedalus

  • Sergeant
  • **
  • Posts: 31
    • View Profile
Re: HandOb maker
« Reply #18 on: May 11, 2020, 08:47:51 pm »
@bohemond
You should put it on Github/similar, so we can report bugs, fork it and do pull requests  ;D

I see a lot of potential on this program...

Maybe not yet units from paperdoll sprite (I see it quite complicated and maybe would require more variables i.e. define  skeleton nodes), and maybe not yet HWPs, but I bet it can  work for particles too. I am thinking about new projectiles, rockets, energy blobs ecc...

About sprite size, I'd like the program to allow larger sprites too.
Looking forward for updates! And very very thank you, you just made me willingly to create items and I have no experience on this!


Ooook... I promise if I do new things, they'll go on Resources.
But i have to do that... (maybe I got carried away with the Big...)

« Last Edit: May 11, 2020, 09:02:57 pm by osd_daedalus »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: HandOb maker
« Reply #19 on: May 11, 2020, 10:24:33 pm »
(maybe I got carried away with the Big...)

lol. Love the guy in the doorway :)

does he tip over when he shoots ...

Offline osd_daedalus

  • Sergeant
  • **
  • Posts: 31
    • View Profile
Re: HandOb maker
« Reply #20 on: May 12, 2020, 06:58:58 pm »
lol. Love the guy in the doorway :)

does he tip over when he shoots ...

lol, luckly (or sadly?) there isn't a knockback/recoil system that kicks your guys back as far as I know...


I tried to play a bit with the code, but just increasing the upper limits will return strange results, mainly handobs going out of boundaries. I guess many tweaks are needed for OpenApoc compatibility or anyway just to load bigger images which should be then auto-shrinked to fit the 32x48 box.

I have a question: there are buttons to flip/rotate the BigOb, could be possible to save these transform results on the BigOb image? I know it's out of purpose, but could save in some cases a step to return to image manipulation program to do the same thing there.

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: HandOb maker
« Reply #21 on: May 13, 2020, 02:40:30 am »
I haven't found any good examples of OpenApoc item sprites. So I haven't started on it yet. But there will be more differences than just image size I imagine. The whole drawing routine is probably quite different.

I could put a save button for the BigOb, but the problem is that it would screw up the palette. So I'm not sure it would be of much use.

Offline osd_daedalus

  • Sergeant
  • **
  • Posts: 31
    • View Profile
Re: HandOb maker
« Reply #22 on: May 13, 2020, 07:17:07 pm »

I could put a save button for the BigOb, but the problem is that it would screw up the palette. So I'm not sure it would be of much use.

Right, makes sense.

I still haven't understood the Advanced Options - 3d profile function, could you please explain me about?  :)

Going technical, instead:

- bugreport: if you click "Find Center" while you haven't still loaded a BigOb, the application will crash due to a null reference

- I have noticed in the code there is the assembly System.Deployment in References, which is not implemented in Mono, but the application will work flawlessly anyway: are there lines of code using it? I tried to remove it from the References and still works.


Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: HandOb maker
« Reply #23 on: May 15, 2020, 04:57:13 pm »
If you make an unit creation tool, then I'll make you a new shrine. Drawing the unit spritesheet is probably one of the most frustrating things of OpenXcom modding.

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: HandOb maker
« Reply #24 on: May 15, 2020, 05:50:15 pm »
I still think the video I posted was pretty relevant to this topic, because it shows you can take any 3d model and relatively easily convert it to OpenXCOM sprites. I didn't actually watch it, just skimmed through to see the images.

If that's true the only question that remains is: what's the easiest way to make a 3D model? And the community needs to agree on that to make a unit-maker everyone likes.

The images below are in blender and constructed  from a 3D sprite. It's not going to be as easy as items, of course, because units can't be rectangles that look the same on all sides. You probably do need to make a 3D model at some point in the process to make it obvious how it will turn out.
« Last Edit: May 15, 2020, 05:57:43 pm by Bobit »

Offline bohemond

  • Sergeant
  • **
  • Posts: 44
    • View Profile
Re: HandOb maker
« Reply #25 on: May 16, 2020, 04:09:25 pm »
@Bobit
I don't think most people here do 3d models. Even so, isn't creating animated humanoid 3d units really difficult? Maybe it would be possible for tanks and such, with few animating parts, but for humanoid aliens, I don't know.

@efrenespartano
I haven't done any units myself, but looking at unit sheets, it does look like a difficult task.
How do you actually go about creating a unit? For the x-com soldier drawing routine. Do you create the animated sprite and then cut it up into pieces?

@osd_daedalus
I'll fix that.
The dependency is probably just some default, that I did not bother to clean up.
New version is almost ready with some improvements. I'll write a quick guide to the advanced options when I post it.

Offline efrenespartano

  • Commander
  • *****
  • Posts: 765
  • I know a lot about the law and other lawyerings.
    • View Profile
Re: HandOb maker
« Reply #26 on: May 16, 2020, 10:56:18 pm »


@efrenespartano
I haven't done any units myself, but looking at unit sheets, it does look like a difficult task.
How do you actually go about creating a unit? For the x-com soldier drawing routine. Do you create the animated sprite and then cut it up into pieces?

I usually look for some pieces and bits of spritesheets of units that I like (specially The X-Com Files) to use it as reference. I work on the old Paint.NET (It is not suitable to make graphics for OXC, but i'm quite used to it and I like it), so I have an existent spritesheet as bottom layer and I draw pixel by pixel on top of it. Making the head and the torso is quite easy, I just resize the torso and head of the paperdoll (the inventory unit) I'm trying to make the spritesheet, but the hardest thing is making the many many arms and legs in all of the different positions.

xcomfan

  • Guest
Re: HandOb maker
« Reply #27 on: October 03, 2020, 05:12:23 pm »
Give this guy a Uber-Ethereal shroud and stick this thread!
Bravo, well appreciated! :-D

Just for the chronicles... sources will compile and run on Linux with mono, as long as mono-vbnc is installed, but will crash as you try to export FloorOb/HandOb.

EDIT: giving it a try again, it crashed while using resources from old UFO2000 assets (many of them are oversized according to your tool). I tried again on XComFiles resources and it works like a charm :D
So... yes, it works on Linux :D

Too bad sad, one again linux uners are cut out  :'( :'( :'( may i suggest some user of good will to compile it usin AppImage?. I've very little linux knoledge, otherwise i'd already gave a shot...please let us know :)

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: HandOb maker
« Reply #28 on: October 03, 2020, 05:41:34 pm »
This tool worked out-of-the box for me with a recent wine-staging on ubuntu 18.04. Have you tried using the wine version included in your repository and running the win .exe with it?

xcomfan

  • Guest
Re: HandOb maker
« Reply #29 on: October 07, 2020, 12:15:53 pm »
This tool worked out-of-the box for me with a recent wine-staging on ubuntu 18.04. Have you tried using the wine version included in your repository and running the win .exe with it?

Thanks, but i don' want to install/bloat my system with wine. Moreover It's a very tiny program, would be a pity install wine exclusively for this  :'(

Please note that sprite must be must necessailry be 32x48, otherwise the program will crash