[Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Discuss Daggerfall Workshop news articles.
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Interkarma »

King of Worms wrote: Sun Nov 07, 2021 7:56 am That would explain what happened, but I dont think this is what you mean. I dont run DFU from editor.
You need to build .dfmod from editor though, and it sounds like your source project is out of date. The easy way to check is look at "defaults.ini" in Assets/Resources of your source project and confirm the [Effects] section is present. This is the master list of settings your settings.ini is synced against.

I only tagged the new source two days ago. Unless you've updated source project since then, it's a version behind.

Other than that, not sure what else I can say. These are just .ini settings like all the others, and it doesn't sound like any other settings are affected. So it stands to reason something is a version behind. That's the only interaction that resets entries in settings.ini (other than deleting/overwriting settings.ini of course).

Sorry mate, I just don't have anything else right now. :)

User avatar
King of Worms
Posts: 4751
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by King of Worms »

Got it, I have not updated in last 2 days so my source is not up to date. That might be it. If thats the case, mods which are older than 2 days can trigger this issue Im afraid. Maybe only when they are overwritten - maybe if they are kept "still" it will be ok.

I understand its just a text in the ini :) So its strange to me as well why it keeps resetting occasionally. Anyway, I will DL the latest source.

User avatar
King of Worms
Posts: 4751
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by King of Worms »

Just want to say Im now 100% sure that the mod overwrite resets the effects settings, I can reproduce it in every case.
Yes, the mods I build are made on a version released around 0.13 so its not the latest. Still its a strange behavior. I build a mod and copy it to "streaming../mods". Set the effects. Build the same mod 10 minutes later with one texture changed. Copy this mod to the "streaming../mods" , overwrite the old one and effect settings get reverted to default (all off and default settings) Its strange, but thats what is happening.
Last edited by King of Worms on Mon Nov 08, 2021 9:23 pm, edited 1 time in total.

User avatar
Gravitus
Posts: 26
Joined: Thu Jun 25, 2020 3:42 pm

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Gravitus »

Currently every 2D flat like a tree will be "caught" by the depth of field even if the distance is set to not blur at that distance. The effect seems to cut off at the edge of the terrain. I'm guessing this is due to the implementation, and making 2D flats in front not blurry would complicate things?

Example, tree stumps are sharp, rest of the trees are blurry:
Spoiler!
Clipboard-1.png
Clipboard-1.png (1.1 MiB) Viewed 3337 times

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

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Interkarma »

Likely caused by tree batch render queue not writing to depth buffer. I'll see if I can resolve without creating other problems.

Edit: That's right - the reason tree batch is in transparent queue is to prevent self-shadowing artifacts on trees. Other than disabling tree shadows completely, there's no way to fix this in deferred rendering due to the way Unity's shadow maps work. This does limit the useful range of settings for depth of field, but that's preferable to creating visual artifacts on trees at all times. As a workaround, lowering Focal Length setting will minimize effect. I'd consider this a hard technical trade-off between depth of field and tree batch shadowing.

User avatar
King of Worms
Posts: 4751
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by King of Worms »

I tend to disable things which do not work 100% - they usually become a distraction and are immersion breaking.
So in this case Id vote for removing the DOF effect as it seems theres currently no way it will function consistently all-around the game. (ive noted the above mentioned issue as well)
Just my POV, up to you and others to decide.

User avatar
Gravitus
Posts: 26
Joined: Thu Jun 25, 2020 3:42 pm

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Gravitus »

Plenty of situations where you don't notice the tree issue, and on principle I would say keep DoF in there. For screenshots, too.

And of course tree shadows don't always look right either. You have a player-facing 2D sprite and then a 2D shadow on a different plane. If you're lucky, they match up. If not...

If it were up to me, I'd experiment. I'd even consider something like simple circular shadows under trees (that always look right) if that meant having a better DoF. But I'm just a player and all this is work, so anyway. ;)

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

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Interkarma »

Yep, shadow alignment on trees is another compromise. Though it looks much worse if shadow twists around as billboard rotates. Billboards just aren't great for large, stationary, nearby objects and Daggerfall's trees are all of those things. :)

Blob (circular) shadows aren't cheap to implement for such a large number of objects either. They require either projectors or a quad under object, and either method doesn't scale well. OK for characters, but not forests.

Maybe just an option to disable tree shadows? Batch material can use opaque queue when tree shadows disabled and transparent queue when enabled to avoid self shadowing. This would also enable trees to work with AO - which in itself can create a grounded effect almost like a blob shadow.

I personally like the aesthetic of long tree shadows crawling over buildings at dawn/dusk, but I wonder if there was a setting how many people would disable tree shadows in preference for improved AO and DoF.

I'll keep chewing on the problem for a short while. No promises though. I'm nearly done with rendering review and won't sink much more time to support an optional postprocess effect that we can mostly config out this problem with sliders now.

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

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Interkarma »

I've decided to make billboard tree shadows optional and disabled by default.

https://twitter.com/gav_clayton/status/ ... 8786826242

With shadows disabled, tree billboards will operate in depth buffer like a normal object and work consistently with depth-based postprocessing effects. Tree shadows can optionally be enabled just as they are now with the limitation they won't be fully compatible with some optional effects.

Some people just don't like the look of tree shadows, or how they don't always align with billboard facing, so giving everyone an option here is for the best overall.

User avatar
Jay_H
Posts: 4061
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: [Blog] Daggerfall Unity 0.13 Rendering Update - Part 2

Post by Jay_H »

I think that's a good decision. For lower-end machines, it'll already save on resources by default.

Post Reply