Button to export walkable areas, hot spots, etc. rather than 100-step plan

Started by bx83, Sat 07/04/2018 10:57:02

Previous topic - Next topic

bx83

We all know there is an easy way to *import* these masks, but no easy way to export them (which makes no sense to me, surely you'd just reverse the import porocess...?)
There is no clear way to *export* the masks.

After much pain, I manageed to:
-take a screenshot, on a white background (which you've had to cut to size and re-imported into the editor), of 0% transparency
-copy to clipboard, paste into Paint
-save as a .png file
-open in Photoshop CS6
-change mode to RGB/8bits
-save as a .jpg file
-enlarge the mask to a new screen size
-reimport the mask back into the editor

Here's what might have been easier:
-export the walkable areas/walk behinds etc. into one file
-...

That's it. This would be so, so, so much simpler. But yet there's only one post about this from 2009 with no editor change? I mean WTF? Wouldn't you just reverse the function of import and make it export? Please please tell me something cogent about this.

Snarky


Privateer Puddin'

Is this purely a feature request or, in the absence of the feature, do you want some recommendations on your process?

bx83

A feature request. If it's so obvious to go through minimum 3 things to save as a jpeg, why isn't as easy to export as a jpeg?

Snarky

I guess I wasn't clear before: Do not use a JPEG to store a mask! I don't see how it would even work, as there is no 256-color mode for JPEG.

JPEG is a lossy image format that introduces color distortion: some pixels that are all supposed to be the same color (especially around edges) will have slightly different shades. This means they won't be part of the mask. Using JPEG is therefore a certain way to screw up the mask.

You should use PNG or BMP format, which are the only file formats AGS officially supports for masks.

bx83

And neither of which actually works in paint and photoshop. :/
Could you just add an export function? Pretty please :p

Snarky

Quote from: bx83 on Sat 07/04/2018 12:55:28
And neither of which actually works in paint and photoshop. :/

What are you talking about? Of course PNG and BMP work in Paint and Photoshop!

QuoteCould you just add an export function? Pretty please :p

I don't think anyone is currently working on updating AGS, so probably not.

Crimson Wizard

Quote from: Snarky on Sat 07/04/2018 14:55:12
I don't think anyone is currently working on updating AGS, so probably not.

morganw was working on AGS Editor recently, so maybe he would like to, but I cannot say for him.

bx83

Cool.
Snarky I meant neither of these image formats have support in photoshop for saving as 8bit colour in a format that ags will accept. Only jpeg (ironically) seems to work. I'll give it another go and see if I can record exactly the steps I take.

Crimson Wizard

Quote from: bx83 on Sat 07/04/2018 19:56:41
Snarky I meant neither of these image formats have support in photoshop for saving as 8bit colour in a format that ags will accept. Only jpeg (ironically) seems to work. I'll give it another go and see if I can record exactly the steps I take.

8-bit BMPs saved with Paint or Paint.NET work 100%, PNGs are supposed to also, but I have not tried them in a while (then again, I don't make much games).

If they don't, then this may be a separate issue to fix also.

Gurok

In fact, if JPEG works for mask importing, that could be considered a bug.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Crimson Wizard

Quote from: Gurok on Sat 07/04/2018 22:06:21
In fact, if JPEG works for mask importing, that could be considered a bug.

You mean - that it is included in a file filter?
I think AGS uses same file filter for all image-related open/save operations.

Privateer Puddin'

8-bit BMPs and PNGs work in both Photoshop and to import into AGS (3.4.1) for me.

I'm not sure how to import a jpg, photoshop doesn't offer the format up when saving while in Indexed mode and a regular jpg won't be imported by AGS. Saving for web will let me do it, but not the regular save functionality. AGS won't import either version of jpg for me.

bx83

Okay, ignoring JPEG because I probably accidentallly imported image as background instead of mask, here's steps to do it on a BMP:
1. Take a screenshot, open it in Photoshop CS6:


2. Spend 5 minutes trying to cut it pixel perfect to the desired resolution:


3. Save as a BMP... but not be given any option to do 8bit. Hmm. Well, see how it goes:


4. Not great - AGS rejects it for having too many colours.
Okay, import it into Paint.exe:


5. Be warned that this will change colour quality (why?). Import into AGS, be given this error:


6. Be left with this. Bravo.


Okay - let's take photoshop out of it. Let's import the screenshot as a BMP, and save it in Paint.exe as an 8bit BMP:
1. Take a new screenshot, saved as BMP, open in Paint.exe


2. Grab the area of the actual background; I did it free hand, and did it pretty nice. This a 1024 background on a 1920 screen.
But there are some bad grey bits about 2 pixels out of the edge of the image. Since I didn't believe I could get the proper image, I zoomed in a bit to make it easier; and then when the select area didn't scroll for me, I was stuck:


3. I saved it as a BMP 8bit, preparing to open it in Photoshop, zoom and cut to exact size, then select the whole area and paste it back into Paint.exe.
Except then it said that "the colour quality will be reduced", and I was back where I started.
So then I drew on the image, expressing my anger, and threw the entire thing out.


This took 45 minutes.

So please explain to me: WHY not write the 25 lines of code to export the walkable areas/regions/hotspots/etc. as an 8bit BMP file? WHYYYYYY?
Also, this is ignoring what would happen if I had 1920x1080 backgrounds; which was what I was trying to do in the first place! There wouldn't be enough screen realestate to do a proper screenshot.

We could just get rid of all this mumbo-jumbo bs, and instead of trying an exact sequence of events, we could just ADD AN EXPORT BUTTON.

Gurok

Quote from: Crimson Wizard on Sat 07/04/2018 22:19:06
Quote from: Gurok on Sat 07/04/2018 22:06:21
In fact, if JPEG works for mask importing, that could be considered a bug.

You mean - that it is included in a file filter?
I think AGS uses same file filter for all image-related open/save operations.

I mean bx83's workflow seemed to suggest that. I'm not near AGS right now, so can't confirm.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Privateer Puddin'

As you said, there's been one post about it since 2009 so there's not a lot of demand. Now, you've requested it again and if there's someone working on the editor, maybe they will add it.

I don't think anyone here is arguing the feature wouldn't be useful, but as realistically looking at it there may not be any active development of the editor, trying to offer you help in improving your workflow (with photoshop alone you can speed that up and save to the correct format) but you already declined that support.

bx83

Quote from: Privateer Puddin' on Sun 08/04/2018 01:08:49
As you said, there's been one post about it since 2009 so there's not a lot of demand. Now, you've requested it again and if there's someone working on the editor, maybe they will add it.

Maybe. Great.

Quote from: Privateer Puddin' on Sun 08/04/2018 01:08:49
I don't think anyone here is arguing the feature wouldn't be useful, but as realistically looking at it there may not be any active development of the editor, trying to offer you help in improving your workflow (with photoshop alone you can speed that up and save to the correct format) but you already declined that support.

I did no such thing.
If anyone can show me:
1. How do I export a copy of the walkable areas via screenshot at 1024x768
2. then resize image to 1920x1080
3. and then reimport

Be my guest, please. As *8bit* PNG, or *8bit* BMP without changing colours. I cannot find a single way it can be done (perhaps in 320x200, but not anything larger with ease).
I've tried more ways than I've shown here in tutorials. None work.

What I don't understand is, if there's already an *import* function (for background image), why not an export (for walkable areas)? Why not take the background image import, reverse commands for a BMP/PNG/whatever, and so export it?

Crimson Wizard

Quote from: bx83 on Sun 08/04/2018 01:28:32
Quote from: Privateer Puddin' on Sun 08/04/2018 01:08:49
As you said, there's been one post about it since 2009 so there's not a lot of demand. Now, you've requested it again and if there's someone working on the editor, maybe they will add it.

Maybe. Great.

Seriously, you are becoming one of the most obnoxious people I've met on this forum. What's with all that making those large unnecessary hysterical posts?
We already got your request. No need to repeat same things over and over again.

No one was arguing that this feature is not necessary. The people above were simply discussing the workaround you were using.
BTW, The fact that AGS does not accept your 8-bit BMPs means only that you are not saving BMPs correctly.



Quote from: bx83 on Sun 08/04/2018 01:28:32
If anyone can show me:
1. How do I export a copy of the walkable areas via screenshot at 1024x768
2. then resize image to 1920x1080
3. and then reimport

I guess when people want to have a mask in a file, they don't create it inside AGS in the first place. Instead they make masks in the image editor, e.g. as a separate layer, and keep editing them there. This way you do not need to export/import, only reimport from file.
TBH the thing that you keep doing this tedious procedure made me very surprised. Personally, I'd never do such thing, as soon as I see how difficult and time consuming it is.


Quote from: bx83 on Sun 08/04/2018 01:28:32
What I don't understand is, if there's already an *import* function (for background image), why not an export (for walkable areas)? Why not take the background image import, reverse commands for a BMP/PNG/whatever, and so export it?

Why do you keep repeating this? It is obvious that there is no reason other than:
a) no one got to work on that;
b) people did not mention that much before, so contributors did not pay attention to this issue.


You must understand, that AGS is practically a dead project. Less and less people working on it. And when they do, they do it when they have spare time and interest. No one here is obliged to do things for you.
If you want something done now and fast, then hire a programmer and bug them instead.


Privateer Puddin'

Quote from: Privateer Puddin' on Sat 07/04/2018 11:30:47
Is this purely a feature request or, in the absence of the feature, do you want some recommendations on your process?

Quote from: bx83 on Sat 07/04/2018 12:05:53
A feature request. If it's so obvious to go through minimum 3 things to save as a jpeg, why isn't as easy to export as a jpeg?

Anyway.

This is based off my work flow. I do all my hotspots / regions / walkbehinds etc. in photoshop, including any later changes, and then import the masks. This allows me to do some of the functionality you were looking for before, in terms of seeing all the different options at the same time. In my photoshop file. I'll have each hotspot etc as a separate layer, and each type in a group. That way I can turn things off easily, quickly line up different walkareas/behinds. I will then save to 8 bit bmp and import.

These screenshots don't show hotspots etc. but it should make sense.

1. Take a screenshot on a white background as you currently are at 100% zoom. (Or, if you have a screenshot tool which has snipping built in when taking the screenshot, you can avoid some of the next steps).
2. In Photoshop, you can do a quick crop so you're just faced with something like this: (black box is the area i'm going to crop down to)



which gives me:



3. Use Trim to get rid of the two grey colours. (I have an action saved which does two trims, one based on the top left and one on the bottom right, trims it down instantly to just what I need)



4. Use Indexed Color to reduce to 8-bit



5. Use Image Size to do a Nearest Neighbour resize to 1920x1080

6. Save as BMP

Quote from: Crimson Wizard on Sun 08/04/2018 01:37:01
I guess when people want to have a mask in a file, they don't create it inside AGS in the first place. Instead they make masks in the image editor, e.g. as a separate layer, and keep editing them there. This way you do not need to export/import, only reimport from file.


Basically that.

bx83

Quote from: Crimson Wizard on Sun 08/04/2018 01:37:01
Seriously, you are becoming one of the most obnoxious people I've met on this forum. What's with all that making those large unnecessary hysterical posts?
We already got your request. No need to repeat same things over and over again.

Okay, I'm sorry. Please don't get mad or read my posts imagining a hysterical voice; I am only trying to learn the AGS system. I understand Rome wasn't built in a day.
I thought someone would respond with 'good idea, we'll get straight on that and have a release in MM, YYYY' or 'No, *@& off, too hard.'
I did not realise that simply making the post would put it in the feature request cue. Once again, I'm sorry.

Quote from: Crimson Wizard on Sun 08/04/2018 01:37:01
BTW, The fact that AGS does not accept your 8-bit BMPs means only that you are not saving BMPs correctly.

Alright, fair enough - but how *do* I save them properly?
I must change the image, in order at least to resize.
If I save in paint.exe as a 256-colour BMP, it reduces the quality of the colours, making them useless to re-import.
If I use Photoshop CS6, it does not offer the option to save it as 8-bit.
If I save it as a PNG, it doesn't offer colour changing, and remains 16/24/32 bit. Probably because it's a compressed image and I'm not using 8bit colour on my screen (which in fact, I'll try next)

Quote from: Crimson Wizard on Sun 08/04/2018 01:37:01
You must understand, that AGS is practically a dead project. Less and less people working on it. And when they do, they do it when they have spare time and interest. No one here is obliged to do things for you.
If you want something done now and fast, then hire a programmer and bug them instead.

True. I will try. But the last time I did offer $2,000, nobody took it up. I'll try another programmger hire site.

Quote from: Crimson Wizard on Sun 08/04/2018 01:37:01
Quote from: bx83 on Sun 08/04/2018 01:28:32
If anyone can show me:
1. How do I export a copy of the walkable areas via screenshot at 1024x768
2. then resize image to 1920x1080
3. and then reimport

I guess when people want to have a mask in a file, they don't create it inside AGS in the first place. Instead they make masks in the image editor, e.g. as a separate layer, and keep editing them there. This way you do not need to export/import, only reimport from file.
TBH the thing that you keep doing this tedious procedure made me very surprised. Personally, I'd never do such thing, as soon as I see how difficult and time consuming it is.

I will try to import a background image and work on the image in a separate layer. However, this doesn't take care of saving, what editor or format, etc.

I don't know, I'll leave the export till much later and hopefullly someone has figured something out in code.

SMF spam blocked by CleanTalk