Transparent ghosts

Show off your mod creations or just a work in progress.
User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Transparent ghosts

Post by pango »

Daggerfall Unity uses alpha cutoff for billboards... So Is there still some hope for transparent ghosts some day?
For fun I experimented with alpha dithering, but the result is weird at best...

Image
https://ufile.io/ajjwm
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Transparent ghosts

Post by Interkarma »

This is something I'd like to address also, it bothers me every time I see them. It shouldn't be too hard, just needs a little shader work.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango »

By the way, I had to go back to classic to double-check, but ghosts and wraiths do have "glow in the dark" red eyes that are not readily apparent in the textures:
Image Image
So in classic there must be some palette trickery going on, like what is used to make windows glow yellow at night...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Transparent ghosts

Post by Interkarma »

Yeah, I've not done a very good job with the ghosts and wraiths in DFU. Will definitely give them a pass sometime. :)

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: Transparent ghosts

Post by Magicono43 »

Nearly impossible to see Ghosts, massive success!

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango »

Yeah, maybe a little too transparent in retrospect.

Code: Select all

$ for i in 27[38]_*.png; do [ -f "$i.orig" ] || cp -av "$i" "$i.orig"; done
$ for i in *.orig; do convert "$i" -grayscale Rec601Luma -gamma 0.3 '(' +clone -alpha extract -evaluate multiply 0.371 -remap ~/Images/bw.png ')' '(' -compose copy_opacity -composite ')' "${i%.orig}"; done
Transparency comes from 0.371 above, so it can be tweaked. If I remember well the main thing to watch for is to not use simple ratios (0.5, etc.) because it generates regular dithering patterns, and that leads to moiré effects in game.

Some work on restoring glowing red eyes could help too, but I don't know if I'll be able to do that with just ImageMagick or if it'll need more manual work (there's a ton of... sprites :) )
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango »

Ok, increased opacity (0.497), and added red eyes, it really looks better now:
Image
Image
I added emission maps for the eyes too, but for some reason it doesn't work :( If you understand why, please tell me.

KnittedGhosts2
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Transparent ghosts

Post by Interkarma »

I don't believe billboards support emission maps yet. Still, looking good! :)

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango »

Ah, makes sense.
But yeah, I'm surprised by the result!
Specially under ambient (dungeon) light.; My hypothesis is that it works best when ghosts and what's behind them is about the same luminosity...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango »

Actually, the ghosts have lots of features that are not used by Daggerfall classic engine...
Different style, hand drawing more apparent:
Image
Image

Code: Select all

cd remaster3 || exit 1
for i in *.png; do
    convert "$i" \
            -background black -alpha background \
            -grayscale Rec601Luma \
            '(' +clone -gamma 0.4 -equalize -brightness-contrast -10x-10 -remap ../util/bw.png -alpha copy ')' \
            '(' -compose copy_opacity -composite ')' \
            -fill black -colorize 100,100,100 \
            ../knitted/"$i"
done

for i in *.png; do
    if [ -f ../eyes-8x/"$i" ]; then
        mv ../knitted/"$i" ../knitted/"temp.$i"
        convert ../knitted/"temp.$i" ../eyes-8x/$i -compose src-over -composite ../knitted/"$i" && rm ../knitted/"temp.$i"
    fi
done
CharcoalGhosts.zip
Last edited by pango on Mon Nov 19, 2018 5:54 pm, edited 1 time in total.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply