The DaggerXL Texture Project (NPC Portraits)

User avatar
Klasodeth
Site Staff
Site Staff
Posts: 456
Joined: Thu Apr 14, 2011 7:58 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Klasodeth » Tue Mar 26, 2013 12:54 pm

Brendan_ wrote:"Non-square pixels" is something I hadn't heard of before. For others in the same boat with me:
the lurker's guide to video wrote:A 100 pixel vertical line may be longer or shorter than a 100 pixel horizontal line on a video monitor, depending on the video system.

It sounds like a bad thing, even supposing we've been seeing Daggerfall non-square all these years (I don't know if that's so).

If this is something standard-definition original Daggerfall had, can't high-definition DaggerXL use properly square pixels?
Or were Daggerfall's mighty mighty pixels square and there's some reason Lucius has to unsquare them? I doubt it, but I'm not sure what the situation is.

Since this will affect each and every portrait, it does need to be nailed down so every artist knows how and if they need to compensate. Since the artwork is being done on (I assume) square-pixel displays of the image editor of their choice, it seems much much better if DaggerXL could also use square-pixels.

On modern systems, the vast majority of supported resolutions use square pixels, but way back in the days of DOS, the very popular 320x200 video mode was intended to to fit the common 4:3 CRT displays of the day, even though it sounds like it should be a 16:10 aspect ratio. This wasn't all that much of a problem back then, because artists were using that very same resolution to draw their artwork, meaning they were naturally taking the rectangular pixels into account. But as computers became more powerful and as they made the transition from DOS to Windows, resolutions started getting a lot higher, and the vast majority of those new resolutions were designed around square pixels. Once video accelerators hit the scene, the venerable 320x200 video mode was doomed. Everybody moved on to higher square-pixeled resolutions.

Cut to modern day. As a general rule, it's no longer possible to switch to 320x200, so emulators like DOSBox have to get clever about how they display that video mode. Unfortunately, the default in DOSBox is to use square pixels, so people who play DOS games in DOSBox tend to see an artificially stretched version of the game, because pixels that are supposed to be rectangular are being displayed as squares intead. It is possible to set DOSBox to display 320x200 DOS games correctly, but there's just enough hassle involved that I suspect most people don't bother, especially if they never saw the games running on the hardware they were designed for.

Anyway, this isn't really a technical problem, since Lucius already has a plan for this. He already knows what to do to get DaggerXL to display Daggerfall the way people would have seen it on old 4:3 aspect ratio monitors. The real trick is for artists. Any artist using modern software is working with square pixels, even though the final result needs to be optimized for rectangular pixels. This isn't a hard problem to fix though. It's just a matter of taking the final art and stretching it horizontally a fixed amount. If done properly, the asset will "shrink" back to its original width when displayed with rectangular pixels.
I'm frequently online in the #xlengine.projects channel at irc.freenode.net as Klasodeth, Klaso, or KLA.
User avatar
Phobos Anomaly
Senior-Member
Posts: 234
Joined: Sun Mar 24, 2013 10:56 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Phobos Anomaly » Tue Mar 26, 2013 2:20 pm

Brendan_ wrote:...it seems much much better if DaggerXL could also use square-pixels.



I'm Agree, It would be better for editing in practical ways.
Last edited by Phobos Anomaly on Tue Mar 26, 2013 9:43 pm, edited 1 time in total.
User avatar
Klasodeth
Site Staff
Site Staff
Posts: 456
Joined: Thu Apr 14, 2011 7:58 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Klasodeth » Tue Mar 26, 2013 2:29 pm

Phobos Anomaly wrote:
Brendan_ wrote:...it seems much much better if DaggerXL could also use square-pixels.



I'm Agree, I would be better for editing in practical ways.

DaggerXL (and pretty much every modern program) does use square pixels. The problem is that the original Daggerfall did not.
I'm frequently online in the #xlengine.projects channel at irc.freenode.net as Klasodeth, Klaso, or KLA.
User avatar
Brendan_
Senior-Member
Posts: 388
Joined: Sun Oct 09, 2011 1:08 am
Location: USA
Contact:

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Brendan_ » Tue Mar 26, 2013 9:02 pm

Thank you, Klasodeth. That was an excellent summary of it all.

For original assets, Lucius's plans should work more than fine.
This is really only an issue for artists making new assets, virtually all of which are too large for players running in venerable 320x200 resolution.

If DaggerXL uses square pixels for even quarterway modern resolutions, then the square pixels used with modern image editors should all work fine, I believe.
And if that's correct, then our portrait artists won't need to prestretch their works since they'll never even be able to cross over into the nonsquare realms of technical artifacts.

But, if that's incorrect, then will a general advisory need to be broadcast to all artists that they must pre-stretch all their works by some defined amount?
Gez
Senior-Member
Posts: 329
Joined: Fri Apr 15, 2011 2:54 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Gez » Thu Mar 28, 2013 2:42 am

Basically, 320x200 pixels where stretched into what would have been 320x240 pixels. That means a pixel is 1.2 units tall (200x1.2=240), so stretching things vertically to 120% of their size is a good estimation of how it'll look.

Here's a game-centered article on the issue. It's about Doom but it could be about any game that used mode 13h (that is to say, about any DOS game that wasn't in text mode).
Aliotroph?
Senior-Member
Posts: 293
Joined: Tue Jun 28, 2011 8:49 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Aliotroph? » Thu Mar 28, 2013 3:45 pm

Brendan_ wrote:Thank you, Klasodeth. That was an excellent summary of it all.

For original assets, Lucius's plans should work more than fine.
This is really only an issue for artists making new assets, virtually all of which are too large for players running in venerable 320x200 resolution.

If DaggerXL uses square pixels for even quarterway modern resolutions, then the square pixels used with modern image editors should all work fine, I believe.
And if that's correct, then our portrait artists won't need to prestretch their works since they'll never even be able to cross over into the nonsquare realms of technical artifacts.

But, if that's incorrect, then will a general advisory need to be broadcast to all artists that they must pre-stretch all their works by some defined amount?


DaggerXL can't just decide to render things as if they had square pixels unless 100% of the assets are converted (stretched 20% vertically) because then the game world and UI would be distorted.

For the UI Lucius could possibly provide some way for an artist to flag his asset as being intended to be drawn with square pixels instead of stretched, thus relying on the artist to ensure it fits with the rest of the graphics. It's more complicated for the world graphics the scaling applies to the math involved in rendering the world rather than just scaling the textures.

It seems for now artists will have to consider the 20% height difference in their assets compared with what appears in an editor. This should apply to things like meshes too. I don't know if any extant tools for displaying meshes from Daggerfall take that into account (if they don't then things should look squashed compared to their appearance in game).
luciusDXL
XL Engine Developer / Site Admin
XL Engine Developer / Site Admin
Posts: 778
Joined: Thu Apr 14, 2011 4:05 pm
Contact:

Re: The DaggerXL Texture Project (NPC Portraits)

Postby luciusDXL » Thu Mar 28, 2013 7:01 pm

3D geometry is different since vector data can be scaled as needed. In other words, Daggerfall geometry is not pre-scaled based on the aspect ratio - models are still built with 1:1 aspect ratio. Pre-scaling is needed for bitmap data since scaling causes distortion and slows down blitting (in software).
User avatar
Brendan_
Senior-Member
Posts: 388
Joined: Sun Oct 09, 2011 1:08 am
Location: USA
Contact:

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Brendan_ » Fri Mar 29, 2013 10:59 am

Gez, thanks for that informative link! It being a visual issue, pictures help a lot.
Image

Aliotroph? ( "?" ? ), you're right of course. It's an all-or-nothing situation, unless somehow XL Engine can render some pixels square and others not, which doesn't seem to be the case, and may be a significant performance drain if it were possible.

Having this conversion factor seems like a big weakness for the creative process. Scaling images almost always introduces artifacts, and "thinking" 20% taller while drawing is plenty weird.
Could the original bitmap assets be copied and prescaled on install? Or a pack of such assets downloaded?

The basic issue to my mind is enabling artists to make higher-res replacements, images too big for 320x200 or even 640x480 resolutions, without having to adjust for archaic technical flaws.
A true total conversion of all textures, icons, portraits, GUIs, pointers, and everything is a lot of work, but I'm optimistic it will get done.
Gez
Senior-Member
Posts: 329
Joined: Fri Apr 15, 2011 2:54 pm

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Gez » Fri Mar 29, 2013 1:57 pm

A good upscaling that will not introduce artifact is to make things 5 times wider and 6 times taller. A full-screen 320x200 picture becomes 1600x1200, with individual "metapixels" that are 5x6 pixels each.
Ceruulean
Lurker
Posts: 4
Joined: Fri Aug 08, 2014 12:06 am

Re: The DaggerXL Texture Project (NPC Portraits)

Postby Ceruulean » Fri Aug 08, 2014 12:21 am

Hey, I'm interested in tackling a few portraits but I'm not sure what is incomplete. Also, the whole pixel scaling issue is worrying to me, because I don't know if I should do a portrait normally or take into account the non-square pixels (which admittingly I've never done in any drawing before).

Return to “Texture Project”

Who is online

Users browsing this forum: No registered users and 0 guests