Page 8 of 32

Re: Terrain Flats

Posted: Wed Apr 19, 2017 12:05 pm
by Biboran
You draw so awesome, that this threes looks like HD 3d models renders :D

Re: Terrain Flats

Posted: Fri Apr 21, 2017 2:08 am
by jman0war
work in progress at the moment.
Image

Re: Terrain Flats

Posted: Sat Apr 22, 2017 2:57 am
by jman0war
506_9-0
I've set this one against a neutral so it can be seen better.
I'm thinking i'll change the dark droopy parts at the back of the foliage. It just doesn't really fit the type of tree.
I also removed most of that ugly magenta colour, though left some traces.
It's as though something bad happened to the original tree, colours all over the place.
Image

Re: Terrain Flats

Posted: Sat Apr 22, 2017 6:39 am
by Jay_H
I think your changes and your proposed changes are spot-on :)

Re: Terrain Flats

Posted: Sat Apr 22, 2017 7:01 am
by Biboran
As usual, you are awesome!

Re: Terrain Flats

Posted: Sat Apr 22, 2017 11:05 am
by King of Worms
Very nice, I went to the page you mention in a signature, and now I know why the trees you produce look so great - the non-daggerfall related works presented there are of very high standards as well! Im glad you decided to work on Daggerfall, much appretiated!

Re: Terrain Flats

Posted: Mon Apr 24, 2017 12:17 am
by jman0war
What do you think is going on here?
2 circles, one that's been feathered.
But in game, the feathered pixels display with no transparency.

Image

In photoshop:

Image


Edit:
I think i'm finding the answer already:
https://forum.unity3d.com/threads/photo ... ines.2181/

Re: Terrain Flats

Posted: Mon Apr 24, 2017 2:17 am
by Interkarma
Daggerfall Unity renders billboards as alpha cutout. This means all partial or fully alpha pixels are discarded completely. This creates a nice crisp pixel edge on the classic sprites. I am very much not a fan of blurry soft edges on low-res sprites.

Your lovely hand-drawn sprites are another matter however. They would look great with soft edges.

The ability to do soft edges, including automatic dilation of sprites to prevent alpha bordering, was part of DFTFU in the early days, but I didn't preserve this when moving to the new Standard shader material system post-5.0. It might be possible to make this available again. I'll see what I can do.

Edit: OK, I've remembered one of the implementation details behind the batch shader now. The non-transparent parts and transparent fringes need to be rendered in separate passes. Because I preferred the crisp-edge look anyway, it made sense just to render in a single pass and save overhead. Considering the age of billboard batch shader (rooted in Unity 4.x), it might actually be best to find a new method of rendering nature flats, using instancing for example. I'll have a play with the shader anyway, it's probably the least impactful way of smoothing out edges for now.

Re: Terrain Flats

Posted: Mon Apr 24, 2017 6:21 am
by Interkarma
I've been playing with added support for softer edges for you. This requires bilinear filtering to be enabled and a two-stage batch shader to render both the opaque interior parts of billboard and the alpha fringes. This is how it looks in action.

First is the current behaviour. Point filtering, cutout alpha, no fringing. This is my preferred style for the retro look.
point-cutout-nofringe.jpg
point-cutout-nofringe.jpg (138.71 KiB) Viewed 3970 times
This is how it looks just by enabling bilinear filtering with the current batch shader. Note that Daggerfall Unity's image processing uses texture dilation to prevent a black edge being sampled around colour parts of image.
bilinear-cutout-nofringe.jpg
bilinear-cutout-nofringe.jpg (150.82 KiB) Viewed 3970 times
And this is the modified two-stage shader with bilinear filtering and fringe rendering.
bilinear-alpha-fringe.jpg
bilinear-alpha-fringe.jpg (144.46 KiB) Viewed 3970 times
The above screenshots are an extreme close-up. From a normal distance, nature flats just appear to be a bit softer like below. But to re-iterate, I dislike this look with Daggerfall's vanilla textures. I much prefer the chunky retro look.
softer-edges.jpg
softer-edges.jpg (171.08 KiB) Viewed 3970 times
I believe that for modding town sprites you aren't using batched billboards anyway. So whatever solution ends up being put in place, it would ideally work consistently in both wilderness and towns. My fringing method here is only really suitable for the batch setup and probably adds more challenges than solutions.

Since the non-batched billboards just use Daggerfall's Standard shader, it should be possible to use your source alpha settings as-is. But the shader type for standalone billboards will need to be changed from Cutout. I'm not sure if this is something I need to defer to TheLacus, as he's most heavily involved in the modding side of things.

Re: Terrain Flats

Posted: Mon Apr 24, 2017 12:08 pm
by jman0war
Ah I see.
Thanks for explaining.
I agree with you regarding vanilla textures, it's better to go with the chunky look.
So for your build, leave as is.

Maybe when we have enough sprites completed this could be revisited.
I don't know would there be a way to include new sprites in a mod that also modifies these settings, probably not I suspect.

I suppose at this point, I can continue to feather the edge of trees as I paint them even though the current settings of the engine are not going to display them that way. There's no real harm in doing that. It was really more a question of quality control : do the feathered edges look nice.