Transparent ghosts

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

Transparent ghosts

Post by pango » Sun Nov 11, 2018 1:27 am

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
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Transparent ghosts

Post by Interkarma » Sun Nov 11, 2018 2:36 am

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: 285
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparent ghosts

Post by pango » Sun Nov 11, 2018 8:33 am

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...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Transparent ghosts

Post by Interkarma » Sun Nov 11, 2018 9:44 am

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

Magicono43
Posts: 24
Joined: Tue Nov 06, 2018 7:06 am

Re: Transparent ghosts

Post by Magicono43 » Fri Nov 16, 2018 6:48 am

Nearly impossible to see Ghosts, massive success!

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

Re: Transparent ghosts

Post by pango » Fri Nov 16, 2018 1:18 pm

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 :) )
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Transparent ghosts

Post by pango » Fri Nov 16, 2018 8:43 pm

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
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Transparent ghosts

Post by Interkarma » Fri Nov 16, 2018 10:13 pm

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

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

Re: Transparent ghosts

Post by pango » Fri Nov 16, 2018 10:23 pm

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...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply