Page 1 of 2

Question about lighting and melee control

Posted: Wed Jan 10, 2018 10:23 am
by Jammer
Very cool project, been watching it for a while and finally tried it out a few days ago. I know it is still under development but I had a couple questions from my first impressions:

- Is it possible to change the shader setting so that the sprites are not "glossy" material? I'm not sure the correct terminology, maybe it's a kind of 'specular highlight', but when light is close it creates a white "glow" that makes the texture look flat and "waxy" almost.

- The weapon swing controls feel very stiff compared to the original, or at least when playing through DosBox. I.e., it is very hard to swing the weapons, especially the "forward stab", i have to move the mouse accross the whole mouse pad to trigger the attack, while in the original it was much easier to trigger with a small movement. I've played around with such controls in my own game projects before, if I remember right i set some kind of delta limit such as 10pixels such that when a mouse movement is detected that goes past this limit it triggers the attack. Perhaps this could be configurable as well.

Anyway, great job! Thanks also for the daggerfall imaging tools which I have made use of!

Edit: Oh, another thing I noticed that other people have probably seen also is that some animations, specifically torches, seem to have some kind of alignment issue. What i mean is on frame 1 the torch is say 2 pixels wide, then as it animates it flickers between being 1 pixel wide. Is this a result of indexing texel coordinates in large atlases using floating point, causing rounding errors? Just a guess. I haven't had issues in my own projects yet, but in OpenGL there are "rectangle" textures that allow indexing UV coordinates with integers instead of floats. I guess Unity uses DirectX, but maybe there is an equivalent.

Re: Question about lighting and melee control

Posted: Fri Jan 12, 2018 12:26 am
by Narf the Mouse
Unity Engine uses the back-end that's most appropriate for whatever platform it's running on. On Windows, that probably is DirectX. However, Unity has its own shader language, and that gets translated into shader code for the platform. :)

Re: Question about lighting and melee control

Posted: Fri Jan 12, 2018 1:22 am
by Interkarma
Welcome to the forums, Jammer. Thank you for the kind words. :)
Jammer wrote:Is it possible to change the shader setting so that the sprites are not "glossy" material? I'm not sure the correct terminology, maybe it's a kind of 'specular highlight', but when light is close it creates a white "glow" that makes the texture look flat and "waxy" almost.
The unmodded game shouldn't be glossy. I'd need to a specific example and know system specs to understand which assets are affected this way. Most assets use the Standard shader without any specular or gloss attributes.
Jammer wrote: - The weapon swing controls feel very stiff compared to the original, or at least when playing through DosBox. I.e., it is very hard to swing the weapons, especially the "forward stab", i have to move the mouse accross the whole mouse pad to trigger the attack, while in the original it was much easier to trigger with a small movement. I've played around with such controls in my own game projects before, if I remember right i set some kind of delta limit such as 10pixels such that when a mouse movement is detected that goes past this limit it triggers the attack. Perhaps this could be configurable as well.
I find the opposite myself, DOSBox is very stuff and unresponsive compared to Daggerfall Unity where I barely have the move the mouse. The mouse attack uses a gesture system (vector-based, not pixel-based which is highly variable). If you find it a bit stuff, try adjusting down the WeaponAttackThreshold in INI to a lower value. Reduce in 0.005 increments until you find something more suitable.

Alternatively, try enabling ClickToAttack in INI to remove gesture attacks and just use clicks to issue a random attack.
Jammer wrote: Edit: Oh, another thing I noticed that other people have probably seen also is that some animations, specifically torches, seem to have some kind of alignment issue. What i mean is on frame 1 the torch is say 2 pixels wide, then as it animates it flickers between being 1 pixel wide. Is this a result of indexing texel coordinates in large atlases using floating point, causing rounding errors? Just a guess. I haven't had issues in my own projects yet, but in OpenGL there are "rectangle" textures that allow indexing UV coordinates with integers instead of floats. I guess Unity uses DirectX, but maybe there is an equivalent.
I haven't noticed this myself. Again, I'd need to see a specific example and know system specs. You're right it could be a precision problem in atlas, but it's not something I've seen before. I've just gone for a dungeon crawl in Privateer's Hold in latest build and can't see this effect on any of the torches.

Re: Question about lighting and melee control

Posted: Sat Jan 13, 2018 2:26 am
by Jammer
I guess what I am seeing is that the shading is on a sub-texel basis as you can see the circular bands in these screenshots.
Spoiler!
DaggerfallUnity 2018-01-12 18-02-39-68.png
DaggerfallUnity 2018-01-12 18-02-39-68.png (244.91 KiB) Viewed 1040 times
DaggerfallUnity 2018-01-12 18-02-26-43.png
DaggerfallUnity 2018-01-12 18-02-26-43.png (103.95 KiB) Viewed 1040 times
Here are some torches:

https://imgur.com/PuoH9uU

https://imgur.com/m6vpSiL

I notice some of the static sprites also look "off", here's a lamp post:
DaggerfallUnity 2018-01-12 18-01-05-03.png
DaggerfallUnity 2018-01-12 18-01-05-03.png (770.33 KiB) Viewed 1040 times

Re: Question about lighting and melee control

Posted: Sat Jan 13, 2018 2:58 am
by Interkarma
Thanks for getting back to me with those great screens. :)

For the first thing, that's just the player's personal light (your torch) shining on the model you're standing against. It's not glossy in terms of material properties, but there's not a lot of surface information either so you can see the light attenuation. Classic has the same thing happening but it's less noticeable at lower resolutions. Some of the high-res texture mods should minimise this if it bother you.

For the second issue, your quality settings or resolution are possibly too low. Make sure you have monitor native resolution (e.g. 1920x1080) and "Fantastic" quality selected on the setup screen, that issue should go away. The good news is that's definitely not how the game normally looks. :)

It would be great to know your full system specs as well, if possible. Cheers.
quality-settings.jpg
quality-settings.jpg (123.01 KiB) Viewed 1033 times

Re: Question about lighting and melee control

Posted: Sat Jan 13, 2018 6:37 pm
by Jammer
Interkarma wrote: For the second issue, your quality settings or resolution are possibly too low.
That was it, setting to anything except "Fastest" gives the full resolution textures.

I went to another crypt and found a surface that looks extra shiny compared to normal. You can see if I stand over the coffin the reflection is not nearly as bright.

DaggerfallUnity 2018-01-13 09-48-11-56.png
DaggerfallUnity 2018-01-13 09-48-11-56.png (511.08 KiB) Viewed 994 times
DaggerfallUnity 2018-01-13 09-48-02-35.png
DaggerfallUnity 2018-01-13 09-48-02-35.png (400.16 KiB) Viewed 994 times
DaggerfallUnity 2018-01-13 09-47-59-13.png
DaggerfallUnity 2018-01-13 09-47-59-13.png (442.06 KiB) Viewed 994 times

Re: Question about lighting and melee control

Posted: Sat Jan 13, 2018 10:41 pm
by Interkarma
That's good news on the flats problem.

Surfaces in the game are not that glossy by default. Do you have the realtime reflection mod installed?

You still haven't provided your system specs, either. Knowing that plus what mods you have installed makes this process a lot easier for me. :)

Re: Question about lighting and melee control

Posted: Sun Jan 14, 2018 3:20 am
by Jammer
I do have the real time reflections mod, but turning it off didn't make a difference. Other installed mods are the distant terrain and enhanced sky mods.

System is Windows 7 Professional 64-bit, Geforce GTS 250, NVIDIA driver version 342.01, DirectX runtime version 11.0, OpenGL 3.3

(yes it's old :)

Re: Question about lighting and melee control

Posted: Sun Jan 14, 2018 8:02 am
by ifkopifko
Hi. In order to remove the gloss, you also have to delete the corresponding MetallicGloss maps and .xml files from your textures directory. Disabling the mod is not enough.

Re: Question about lighting and melee control

Posted: Sun Jan 14, 2018 9:36 am
by TheLacus
Ifkopifko is correct. Alternatively, you can disable all mods globally from game settings and it shouldn't load textures anymore.

If you want to experiment, try to find the exact texture and change smoothness value in Xml, see if it makes any difference.