Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 113 114 [115] 116 117 ... 185

Author Topic: Text Will Be Text - dfhack plugin  (Read 800980 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1710 on: June 02, 2015, 08:05:07 pm »

But once there's real transparency, how do we distinguish what pixels are transparent and what should show background colour?

Easy. Pure black is background and pure magenta is transparency. This could have a lot of applications, like letting you change the background color of a barrel based on what liquid is in it while still having transparency:



The only downside is that you cannot have alpha blending for the background color. But it's a worthy tradeoff since you'll have your barrel sitting on a nice floor tile or grass tile.

And also you can't use this colours if you need them in the actual image (especially black). But wait, there's still the alpha channel and it's not used at all your proposal. So maybe transparent pixels for transparency and magenta for bg colour?

Also, do tell. My current method of overwriting plants is changing them in the raws and then creating new overrides to reflect that. I'd be interested to see what you have in mind.

Isn't this very limited because you can't specify tile numbers >255 in raws, so you won't be able to use different images for different plants? I was thinking I could make use of the colours that are specified for growth/plant tiles as well in raws to expand the tile number range. It becomes more difficult to configure so just in case people really want different tiles for different plants.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #1711 on: June 02, 2015, 10:13:15 pm »

Please use transparent pixels instead of magenta. Because if you use magenta it's like an on/off switch, while transparent pixels can have a gradient and allow shading.

For example you make a bucket, background of the bucket is transparent, but slightly darker where the shadow of the bucket falls.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

DragonDePlatino

  • Bay Watcher
  • [HABIT:COLLECT_WEALTH]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1712 on: June 02, 2015, 10:20:37 pm »

And also you can't use this colours if you need them in the actual image (especially black). But wait, there's still the alpha channel and it's not used at all your proposal. So maybe transparent pixels for transparency and magenta for bg colour?

That would work just fine too. The reason I suggested pure black (#000000) is because many pixel artists avoid that color. It is discouraged because it looks much better if you use other colors. So...how about magenta for the background and transparency for the transparency? I think that would fix the problem Meph is describing.



That, or we could just ditch the background color entirely like you said.

Isn't this very limited because you can't specify tile numbers >255 in raws, so you won't be able to use different images for different plants? I was thinking I could make use of the colours that are specified for growth/plant tiles as well in raws to expand the tile number range. It becomes more difficult to configure so just in case people really want different tiles for different plants.

Let's see here.....Yup. There are about 455 instances of [GROWTH:PRINT] in the vanilla raws, so it would be impossible to fit everything in one tileset. Another idea would be to have a new set of overrides. You could specify a plant override like this:

[OVERRIDE:P:Plant:Subtype:Tileset:NewTile]

Plant would be something like ARTICHOKE and the subtypes would be the growths (in order). If you want to override a growth on the plant, you would just give a number. If you wanted to override a picked growth, you would add 100 to that number. So to override the picked flowers of an artichoke, you would try:

[OVERRIDE:P:ARTICHOKE:102:Tileset:NewTile]

If you leave the Subtype parameter blank it would override the [PICKED_TILE], how the plant looks if there are no visible growths on it.
« Last Edit: June 02, 2015, 10:37:32 pm by DragonDePlatino »
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1713 on: June 02, 2015, 10:40:10 pm »

And also you can't use this colours if you need them in the actual image (especially black). But wait, there's still the alpha channel and it's not used at all your proposal. So maybe transparent pixels for transparency and magenta for bg colour?

That would work just fine too. The reason I suggested pure black (#000000) is because many pixel artists avoid that color. It is discouraged because it looks much better if you use other colors. So...how about magenta for the background and transparency for the transparency? I think that would fix the problem Meph is describing. That, or we could just ditch the background color entirely like you said.

Ok, I'll try to make a test implementation of this, add transparency to some tileset (Spacefox since I use it myself) and we'll see how it looks.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1714 on: June 03, 2015, 05:18:51 am »

Using either superblack or magenta for transparency is a hack to approximate an alpha channel and they both suffer from the same on/off nature.

Right now, is the fg color mixed into the whole image, or just in areas where the red, green and blue values are equal (ie, grayscale)?  If the fg is mixed into everything, it may be necessary to ditch bg colors entirely or use a completely different tile set as a mask.  If the fg is just mapped into x:x:x pixels, then the background can be mapped into x:0:x pixels.  An artist who wants to use purple just needs to include at least a smidge of green in it.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1715 on: June 04, 2015, 07:34:01 pm »

One completely over-engineered solution would be to stack overrides, each one with an alpha channel, and each one with a declared color source (foreground, background, profession, as-is).
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1716 on: June 04, 2015, 08:51:55 pm »

One completely over-engineered solution would be to stack overrides, each one with an alpha channel, and each one with a declared color source (foreground, background, profession, as-is).

The question is, do we really need both background and foreground colours? They were useful when we had 16 colours only and limited number of tiles, so we could employ tile magic to use the same tile for different objects/materials and so on. But now that we can have as many tiles and colours as we want (and use different tiles for different "material types" like constructed wall/soil wall/stone wall/...), maybe one colour will suffice?

On the other hand, the configuration is getting too complicated now anyway (look at the number of overrides in the new GemSet). So I'm thinking about a GUI where you could easily assign images to all available game features with preview, not caring about whether it will internally be tiletype override, item/building override, or will require changing tile numbers in raws. In this case, it could have a way to assign several images and stack them as you're suggesting. It would be not as terrible as if you had to configure such stacks in config files, that's what I'm saying.

DragonDePlatino

  • Bay Watcher
  • [HABIT:COLLECT_WEALTH]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1717 on: June 04, 2015, 10:02:54 pm »

The question is, do we really need both background and foreground colours?

I vote to remove the background colors and simplify things for artists. Like you said, background colors are only useful from an ASCII perspective because they let you include more information in a tile. With SDL graphics and multi-colored tiles, background colors are not needed. I never used them, and sometimes disabled them entirely to make things visually cleaner (e.g. GemSet's rails). If anything, they keep graphics from being WYSIWYG and introduce more technical hurdles for artists (Huh, I drew a barrel but it's invisible in-game?!?)

Also, I think a GUI would be great. Have a little program for artists that lets them organize all of their graphics and see what they have drawn at a glance. There could be a file menu on the left and a bunch of image previews on the right. You know, like the BYOND Dream Editor. I don't even care if each image only has a single tile. It would be much simpler than the current system we have.
« Last Edit: June 04, 2015, 10:06:21 pm by DragonDePlatino »
Logged

Antsan

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1718 on: June 05, 2015, 10:07:31 am »

Am I missing something or isn't background color dynamic, as in "determined by stuff happening in the game"?
Wouldn't removing background color from TWBT mean losing the information that is conveyed by the background color?

I'm not an artist or anything, I've just wondered since this discussion started.
Logged
Taste my Paci-Fist

scamtank

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1719 on: June 05, 2015, 11:01:00 am »

This has been bothering me for a little while, so it could've been settled a year ago for all I know: Whenever the tilesets are a different size, the green X-cursor from mousequery that's supposed to follow the mouse pointer uses the X from the text tileset. This makes it either drag behind or overshoot the cursor more and more the further it gets from the top left corner.

It's a bother. Could it be fixed or, seeing it's not really vital, just disabled?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #1720 on: June 05, 2015, 12:09:30 pm »

Am I missing something or isn't background color dynamic, as in "determined by stuff happening in the game"?
Wouldn't removing background color from TWBT mean losing the information that is conveyed by the background color?

I'm not an artist or anything, I've just wondered since this discussion started.
Yes, that would happen.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

DragonDePlatino

  • Bay Watcher
  • [HABIT:COLLECT_WEALTH]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1721 on: June 05, 2015, 12:51:58 pm »

Am I missing something or isn't background color dynamic, as in "determined by stuff happening in the game"?
Wouldn't removing background color from TWBT mean losing the information that is conveyed by the background color?

I'm not an artist or anything, I've just wondered since this discussion started.

Yes, but if transparency were added to sprites right after background colors were removed, it would result in little information loss. Take underwater creatures, for example. They have a blue background to communicate that they're in the water, but if they could be overlaid over a water tile with transparency, that would not be an issue.



This has been bothering me for a little while, so it could've been settled a year ago for all I know: Whenever the tilesets are a different size, the green X-cursor from mousequery that's supposed to follow the mouse pointer uses the X from the text tileset. This makes it either drag behind or overshoot the cursor more and more the further it gets from the top left corner.

It's a bother. Could it be fixed or, seeing it's not really vital, just disabled?

I've never experienced that issue but it sounds like it would be incredibly aggravating. Taking the X from the from the map tileset could be a problem, though, because some TWBT tilesets might use that. It would be nice if the mouse.png could be used for your cursor.

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1722 on: June 05, 2015, 02:47:24 pm »

Incidentally, mfiki, how fixable do you think the zooming problem would be? Do you know what exactly causes it?

It's keeping me from switching over to GemSet :(
« Last Edit: June 05, 2015, 03:51:52 pm by Button »
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1723 on: June 05, 2015, 03:33:27 pm »

Which zooming problem do you mean?

I'd love if the one that causes this was gone because I could use the gemset 48 without it happening:
Spoiler (click to show/hide)

Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1724 on: June 05, 2015, 03:35:57 pm »

Hahaha, wow. It's like Wolverine slashed up the UI and it's bleeding tiles.
Logged
Pages: 1 ... 113 114 [115] 116 117 ... 185