News:

SimuTranslator
Make Simutrans speak your language.

Transparency in comic paksets

Started by Václav, December 28, 2019, 11:11:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Václav

Hi, to all,
may it be that this topic could be opened elsewhere...

I don't know for how long time, I have prepared (and almost finished) quite new project of building(s) for head (?deadlock) railway station - for pak96.comic. That building complex is really large - now it has seven buildings large 5*4 tiles. Also, it has own platforms (of two types - ). You can see it in attachment.

But I have one problem. I am not sure how to solve transparent windows. They (but hard to say if calling them windows is correct) are only on two parts
- central waiting hall (part with clocks)
- middle part of right wing (currently there are 10 pillars, but I plan to decrease their number to 6)

Currently, they are solved by old (8-bit) way of transparency. And it may look very strange, mostly as they are split into many small tiles. However, those small tiles may be very good for some planned decorations.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Leartin

If I see that correctly, your platforms have a window in the ceiling with a blue tint. That needs to be see-through in order to see the trains on the platform, and you went with something like "blue, 30% opacity". P96C probably has no transparency yet, so the exact color and opacity is for you to decide, but you pretty much need it there.

And that means you can use the very same idea of transparent glass for all those windows that don't actually have to be transparent, since the inside is on the same tile anyway. Just paint what's inside, then slap the semi-transparent glass on top. If you want patterns in the glass, you can do that by changing opacity, eg 60% opacity for some vertical strips where different glass panels join. You need a program with layers to do that. IIRC you work with vector tools, so it might be best to just ignore all transparencies for now and add them with a cleanup step.

EDIT: You can utilize frontimages for the transparent glass. In that case, you can use the special colors for windows. Using them semitransparent means you can look inside during the day, but it's illuminated during the night. It's also much easier to edit the building at a later point even if you don't have the sources.

Vladki

Simutrans supports transparency using full 8bit aplha channel. So you do not need special colors, just make the roof a front image and windows any color with some % of transparency.

Václav

Quote from: Leartin on December 29, 2019, 09:48:42 AM
If I see that correctly, your platforms have a window in the ceiling with a blue tint. That needs to be see-through in order to see the trains on the platform, and you went with something like "blue, 30% opacity".
It is main player colour 136,171,211 with 50% opacity.

Unintended joke is, that shelters (on both versions of platforms) are so high that it will be a problem to see trains through those shelters.

Quote
If you want patterns in the glass, you can do that by changing opacity, eg 60% opacity for some vertical strips where different glass panels join. You need a program with layers to do that.
Layers handing is no problem.

Quote
IIRC you work with vector tools, so it might be best to just ignore all transparencies for now and add them with a cleanup step.
You remember correctly.  :) But that cleanup step is probably now.

Quote
EDIT: You can utilize frontimages for the transparent glass.

In that case, you can use the special colors for windows. Using them semitransparent means you can look inside during the day, but it's illuminated during the night.
Currently there are used night colours 77,77,77 for dark side and 87,101,111 for light side.
But I think about changing into 193,177,209 for dark side and 227,227,255 for light side.
This would differ transparent glasses from common glasses.

One problem is in frontimages - I have no experience with them on buildings that are processed with TileCutter, if it is what you thought.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Vladki

Back image is behind the train (train is visible)
Front image is in front of the train (train is invisible), unless the front image is transparent.

Václav

Quote from: Vladki on December 29, 2019, 11:43:04 AM
Back image is behind the train (train is visible)
Front image is in front of the train (train is invisible), unless the front image is transparent.
Backimages and frontimages on platforms are clear and simple.


I thought frontimages on extensions, not platforms.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Vladki

You don't need front image on extensions (or buildings in general). It is useful for animations, like KFC in pak128. The animated part is front image.

Leartin

Vladki, the point is that frontimages allow you to have your transparent glass on a seperate layer, such that the game does the mixing. This has the following advantages:
1) It will always be correct - the game mixes slightly different from a graphics tool, so 50%opacity in Simutrans would be different from 50% opacity in Photoshop.
2) You can edit whatever is behind the glass and the glass itself without requiring sources. It's much harder if it's already mixed
3) You can use special colors for the glass.

That's why I suggest using frontimages here, even though they are indeed not strictly required.

QuoteIt is main player colour 136,171,211 with 50% opacity.

Don't. While player colors are supposed to work and do work in some cases, depending on the color they glitch out horrendously. As far as I am aware, that was never fixed (see here=https://forum.simutrans.com/index.php/topic,17641.msg168086.html#msg168086)

Václav

Quote from: Leartin on December 29, 2019, 02:49:42 PM
Don't. While player colors are supposed to work and do work in some cases, depending on the color they glitch out horrendously. As far as I am aware, that was never fixed (see here)
I wanted to place player colour on place where it will be visible even if platforms will be surrounded from east, south and west.  And player coloured glass seemed to me as reasonable place, even if it may be a bit strange.


I hope that night-lighting colours are not affected by that bug.  ;D


Quote
1) It will always be correct - the game mixes slightly different from a graphics tool, so 50%opacity in Simutrans would be different from 50% opacity in Photoshop.
Let's see what result will be given by my tools.  :)

Quote
2) You can edit whatever is behind the glass and the glass itself without requiring sources. It's much harder if it's already mixed
Hmm, when all will be exported per one layer (from origin) and then re-assembled (in GIMP), frontimages will be useless. And by the way, I am worried about that this extension building is not compatible with frontimages (for its shape). May be that next building will be - but I would need *.dat for it, and some examples, if they exist.

Quote
3) You can use special colors for the glass.
Only night colours.  :-[

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Vladki

Yes, semitransparent night color work well. I tried to use them for streetlamps. It looked nice in night, but not so good during the day - the lamp was casting a shadow.