Page 1 of 1

"Classic" shading/lighting (without the plastic feel).

Posted: Wed Jun 12, 2019 6:51 am
by MaxiM
OK, so now that my primary gripe with DFU will be gone soon (lack of resolution/pixel scaling), there's only one more thing that I would like to request/suggest. I couldn't find any mention of it on the forums, but perhaps used wrong terminology/search terms, in which case I'm sorry in advance.

So my other major gripe with DFU in it's current state is how it handles shading of all the materials. It makes everything (including sprites) look like it's made of semi-shiny plastic. Kinda like Legos. Maybe I am missing something in the settings/ini (in which case by all means, correct me!), but I cannot achieve the classic "matte" sort of shading in the game. I've tried custom shaders but that didn't help either.

In case you're not sure what I'm talking about for whatever reason, check out these screenshots:

Image

Image

Thanks to my Wraiths being bugged like that, you can see how the sprite is being shaded. Sometimes entire enemy sprites become almost milky-white because of this, making them stick out like sore thumbs. But I would argue that the game geometry suffers the most because ot it (check out that poor table!). It just makes the entire world, especially interiors look... weird. And plastic.

I work in unity a bit, so I'm guessing it's the default material's Metallic/Smoothness value? Would be nice to somehow tweak this on the user's end - or change it globally for all I care. Now I'm sure that in near future playing @ 320/640 with sharp, chunky pixels will help quite a bit with this issue, but it will only mask it somewhat.

Thanks for reading!

Re: "Classic" shading/lighing (without the plastic feel).

Posted: Wed Jun 12, 2019 7:58 am
by Interkarma
I'm happy to look into improving this down the track. I have a lighting review scheduled, including a switch to linear colour space. By itself, that would actually makes the problem you mention a whole lot worse, so I'm kind of already thinking about solutions for this.

I don't have a time-frame right now, but I think somewhere during the alpha cycle.

Re: "Classic" shading/lighting (without the plastic feel).

Posted: Wed Jun 12, 2019 8:11 am
by MaxiM
Thanks for the heads up. It looks like my (pretty much only) two main gripes with the engine will soon be addressed and I won't have anything to complain about as a chunky pixel lover ;)

Re: "Classic" shading/lighting (without the plastic feel).

Posted: Thu Jun 13, 2019 2:15 am
by chtujo
What about a mip-map adjust option?

As you can see in this image with the door to the left, I think it might look a bit better if the texture filtering was "turned down". But maybe that's just me?
Image

Re: "Classic" shading/lighting (without the plastic feel).

Posted: Thu Jun 13, 2019 9:55 pm
by Interkarma
CHAPPJO wrote: Thu Jun 13, 2019 2:15 am What about a mip-map adjust option?
This isn't really related to lighting (probably a better fit in the 320x200 topic) but you are correct that default mipmaps cause textures to look more blurry than they should.

What I can do is add a negative mip bias to textures on import when retro mode is enabled. Compare the upper image with -0.5 mipmap bias to the lower image with no mipmap bias. The upper image is definitely sharper in the door and stone wall next to building, even at 320x200 resolution. This was a simple enough change that I've added this now.

negative-mipmap-bias.png
negative-mipmap-bias.png (306.4 KiB) Viewed 1792 times
no-mipmap-bias.png
no-mipmap-bias.png (290.23 KiB) Viewed 1792 times

Re: "Classic" shading/lighting (without the plastic feel).

Posted: Thu Jun 13, 2019 10:01 pm
by MaxiM
Oh yes, that looks splendid! I see that the Retro Mode is quickly becoming more than just an unfiltered resolution change. Awesome stuff.

Re: "Classic" shading/lighting (without the plastic feel).

Posted: Fri Jun 14, 2019 3:38 am
by chtujo
Interkarma wrote: Thu Jun 13, 2019 9:55 pm
CHAPPJO wrote: Thu Jun 13, 2019 2:15 am What about a mip-map adjust option?
This isn't really related to lighting (probably a better fit in the 320x200 topic) but you are correct that default mipmaps cause textures to look more blurry than they should.

What I can do is add a negative mip bias to textures on import when retro mode is enabled. Compare the upper image with -0.5 mipmap bias to the lower image with no mipmap bias. The upper image is definitely sharper in the door and stone wall next to building, even at 320x200 resolution. This was a simple enough change that I've added this now.


negative-mipmap-bias.png

no-mipmap-bias.png
Thank you very much! It really does look a lot sharper. And also sorry, you're right this probably wasn't the best place to post this.