Sword of Moonlight > Devs

EXIT: Unleashing monsters

<< < (2/6) > >>

Holey Moley:
Feature

Strikeout: as fate would have it like one day after this patch I stumbled upon a mistake in the original do_aa formulation that made "do_sharp" immediately obsolete, so it's removed in future patches, and this patch is no longer available, so this post just serves (I guess) to document the course of events.

I've added a new extension (do_sharp) to a patch:

http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.2.zip

I think this is a groundbreaking development, I describe it in detail in a comment here  (https://www.reddit.com/r/KingsField/comments/gpkou9/early_image_of_kings_field_ii_converted_to_sword/) but the basic idea is by leveraging the do_aa and do_lap extensions it's possible to make the do_smooth extension only apply to the after-image composite of do_lap.

The do_smooth extension is nice, but it's a little too smooth. For my King's Field project I didn't like that it didn't feel sharp like a PlayStation game. Plus it's always kind of made things overly blurry.

But it always looked better and the do_aa/do_lap extensions don't really work without it.

What do_smooth does is it makes a half-tone image by sampling between pixels in the effects compositing stage. This is functionally no-cost effect.

I tend to only use no-cost effects. So I had an idea this morning how to sharpen the picture at no-cost. At first I thought of something elaborate to retain as much as the do_aa extension as I could.

But I decided that the results of just going half-and-half was good enough and that the potential side-effects of the more complicated approach were too risky.

I may experiment with adding a third composite image to do_lap, which could stabilize the bad side-effects, but each image is like an after-image and I have a feeling 3 will be too many when moving/turning, so it could get quite complicated if it were necessary to weight the dissolve according to movement to minimize blurring.

That's an interesting area of study, and could help make the images in the tools look nicer (I would rather wait until SOM_MAP has better visuals) but I think I'm happy with this result for now and won't spend time taking this further.

The default Ex.ini file in the /data/my/prof folder has been updated, but that's Japanese, so I recommend getting the latest English data pack (Default.zip) at http://www.swordofmoonlight.net/swordofmoonlight.com/text/English/ or redownloading it via your updater's translation settings.

This change just adds do_sharp to it like this (http://svn.swordofmoonlight.net/data/my/prof/Ex.ini) file's.

I need to add some extensions to the documentation, but for how do_sharp works, it enables do_smooth, do_aa, and do_lap in addition to itself, so going forward it may be thought of as a basket way to dispense with all of these extensions, but it can be confusing if you don't understand how it works.

The effect itself looks a lot like classic SOM, just with anti-aliasing, and no circa 2000 defects. Which is nice.

Edited: My favorite thing about this other than the sharper image is the stars in King's Field II tend to be only a pixel onscreen, so in the half-tone image they're dimmed by being blended into the sky. Now they're restored to their full brilliance. I think that the animated sky effect SOM has actually suits KFII and I will leave it alone. It looks like a kaleidoscope of spirits ascending and they appear to ascend more slowly the closer they're to the ground. It looks like motes of dust near the ground...

It's not how SOM's sky effect is intended to be used because the UV map for its sky dome is different from SOM's own sky domes. I think when you can see the stars indoors it's easier to see they're part of the sky if they're drifting upward, and it feels more magical. I'm feeling more confident for this project now. I could fix the indoor stars too, even without programming anything new, but I intend to leave them in as well.

Holey Moley:
Patch

http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.2.zip

I noticed when poisoned by a headeater bite the do_hit effect was getting stuck and preventing dashing.

I'm not sure why, but I've relaxed the condition that prevented it from going back to normal, that's based on how far you're ducking. It was set to recover as soon as you stop ducking, but it was stuck at like 96% ducking, so I made it stop at 95%.

Note, this isn't a part of SOM originally, it's a stagger effect for the PC like monsters have, and it actually makes poison a more interesting status because it causes you to stagger as the poison bites. I think this stagger is enforced even with do_red that makes it so staggering works like in KFIII, which is a much better system, but I think I made poison exempt to this, so even if it only hits for 1HP it is debilitating physically.

I think there is a way to adjust the poison HP loss too, but that it might be nice too to make the stagger more infrequent or irregular so it'd be unpredictable.

Edited: For the record, I'm going to leave the KFIII system in for my KFII project. I'm not overly fastidious about reproducing anything other than its audiovisual style and story. The rest, I'm just going to do whatever is expedient or seems for best. If anybody wants a completely faithful reproduction they have everything they need to make one.

Holey Moley:
CRITICAL PATCH

http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.2.zip

I think this is last layer system patch dealing with SOM_MAP integrity (knock on wood) that corrects a problem with the base layer elevations so that some things on layers would end up at the wrong elevation.

I think this release is the first official release that layers actually work in. After patching some other things, like the "checkpoint" system of course.

What happened in this case is I used the line number in the file to fill out the base layer, but didn't realize the number was only incremented when the line-ending was present, so when the line was partially buffered it put them in the previous tile row. It's a wonder something like this wasn't immediately apparent, but such is the nature of all bugs.

I couldn't have seen it unless it had hit some of my tests, which I guess it didn't. It took me a long time working with a map with a lot of monsters on the second layer to notice it. But I've only been doing that since this release was published 10 days ago. I've been looking over every single monster to try to understand some data on the discs as it relates to them, and I think I only found one monster with this problem in the whole time. Anyway, I'm glad I did!

I remember thinking I was clever to change the code to use the line number, since it's a much simpler calculation, just for readability sake, and to remove the dependency on the map height/width, which is historically fixed to 100x100 but may not always be the case.

Holey Moley:
MONUMENTAL PATCH

http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.2.zip

I knew I felt something special about this release. I had an accidental breakthrough yesterday described below that unleashed the true power of the "do_aa" extension. I describe it in the post quoted below, over on Reddit.

The power basically doubled overnight and now the visual fidelity is perfection. It just happened to come at the same time as the new "do_sharp" extension, but there is no relationship. The old way without do_sharp (strikeout: "do_sharp" was subsequently patched out) is now also perfectly sharp, without objection, and you might even prefer it less sharp since it's by no means smudgy and there are reasons it might be superior.

This is actually a big deal and it couldn't have come at a better time (before publishing by KFII project) even though it's a funny story that it was 5 years working with an inferior effect.

It would've been 5 more years, or who knows how long, except for the scenario I relate that allowed me to discover the error that made the difference. And it's very strange now that SOM is unique in the world for having this technique at its disposal, since it works absolutely flawlessly.

Anyway, I encourage you to see for yourself. This patch updates the fix.

It also includes (for the record) an obscure fix for the script editor that could ruin your day. I think last time I worked on it I broke the "meta" message ("" msgid) that isn't normally edited, but it would fail to save/read your script (and give you a 0 sized file) if you do edit it, without this fix.

I wish that I could patent and communicate this technique to people, but alas I'm not really up to the task and nobody listens. I think I would have to go on a big quest, like try to speak at conferences, to even get anyone to listen. And the whole patent thing, while it could be a solid foundation for making money for SOM and art, I'm afraid I'm not up to it, and I tried to approach Khronos to patent it for hardware, and got the webmaster to send a few letters to the president, but I never received a reply.


--- Quote from: https://www.reddit.com/r/KingsField/comments/gtcp6t/more_good_news_for_sword_of_moonlight_visuals/ ---Many years ago while I was working on SOM trying to make a system that works on every computer with a GPU I wanted to have clean lines because I feel geometry is essential to King's Field style and it's my personal preference, I like computerized images, but I don't like pixelated artifacts, though sometimes they have their charms (https://twitter.com/cuddigan/status/1068230670097338368/photo/1)

I had pretty good images but they weren't good enough in the hardest cases, so I had a eureka moment that actually worked, like in 2015, and I think I made the first synthetic images that don't have "aliasing" in them. Technically the process graphics companies call "antialiasing" and have been in an arms race over forever is a post-process that steals a lot of power and compute time from your games, and so can't work on affordable systems, and is fundamentally flawed because it's trying to clean up a mess that ideally shouldn't exist in the first place, and you can't clean it up perfectly, since information is lost that can't be reconstructed.

I think I discovered/invented a novel way to make images that don't have aliasing in the first place, and I started with a germ of an idea, and kept massaging the techniques that feed into that technique until I produced a working system.

At the time I couldn't give away or popularize that idea, I tried, and I probably can't now either. I think the only way to make people listen is to produce a game with SOM that gains attention. People are just stupid, pigheaded, like that. It's why this technique (and many others I'm certain) are never discovered in the first place. Because this technique is no-cost (computationally) I'm certain that it could have been deployed on the PlayStation had it been discovered earlier. And the history of video games would've been very different.

Well, lately, I have been worrying because part of the basket of techniques I used produced a kind of smudgy half-tone image, and I'm working on converting KFII to SOM and this isn't consonant with the PlayStation's hard-edge style. So in the last week I started to think about how I could sharpen it, and I came up with a way, that was very simple.

But yesterday, just by happenstance, I was working on adding KF style onscreen elements to SOM, and so I was testing if they would survive destroying the device context, and you do that by changing the resolution in the Options. So I was just changing to the next resolution, and I ended up on a very weird resolution that is 1152 x 864.

This resolution had anomalies in the frames around the menu elements using the technique that eliminates aliasing. I spent the back-half of my day trying to understand why, and I finally determined it was because of the colorkey system that clips out black pixels, because it's all or nothing, at a threshold, and that threshold just happened to be crossed.

That made me to think about how the technique works, and I realized that it's actually very good for this colorkey system too, because it locks the 3D points (vertices) onto pixels, which should mean the threshold can't be arbitrarily crossed like this, and should improve (optimize) that. That made me to question if so, why on earth was this resolution doing this. And then I realized maybe it wasn't on the pixel center, all of these years.

So I shifted it over by half a pixel, which never occurred to me to do, I guess because I assumed it was already so, and it's more instructions in the GPU shader program.

But this fixed the problem with the 1152 x 864 mode, and I knew I was onto something. And it turned out the image after this was better than ever, and now even the half-tone smudgy image was super sharp. So, now the removal of aliasing seems absolutely perfect.

And an extremely sharp option I tried the other day that flickered no longer flickers, so there are three degrees of sharpness, starting with the original "smooth" mode, that's now very sharp, so no complaints about being smudgy, and there is sharper still using the new technique, and there is extra sharp using an unpublished experimental technique.

In short, the image quality doubled overnight because I'm just muddling through this shit, and made a slight error 5 years ago that halved the quality even though it was still very good. It was just dumb luck (or timely miracle) that this odd resolution setting revealed my mistake. It makes me even more to question how nobody has ever discovered this, since it works quite literally perfectly. There's no downside. It's just something everyone who claims to be committed to showstopping visuals overlooked because they're really just following each other's leads.
--- End quote ---

Holey Moley:
CRITICAL PATCH

http://csv.swordofmoonlight.net/SomEx.dll/1.2.3.2.zip

This patch fixes a bug loading save files with the new system! That was fast :doh:

There was also a problem with showing the wrong file times in the save menus. I think it got introduced in one of these patches.

I'm planning to just keep adding patches to this release for a little while if nothing comes up.

There's a lot extra in this patch...

Just last minute I added an ability to use the controller to switch to vertical movement while flying with F4. I remember ensuring this didn't happen, but I'm not sure why. I know it's annoying if you're used to running with all three buttons down, but while flying you already move super fast, so you don't really need top speed run, and I may make it always top speed. To do it you just hold both attack buttons, which is how you do alt combos, but this was previously exempt. Note, "flying" is a developer/debug/cheat thing.

Mainly this patch "antialiases" cutout (colorkey) textures, which previously didn't get the full benefits of the do_aa extension. In these screens below the tree limbs and grass are getting this new effect. The second is a closeup on a single blade, although it looks better in person than in a screenshot.




The UI elements are also party to the effect, and speaking of that, there are two new Option extensions called "do_kf2" and "do_nwse" that enable a King's Field II style compass. The latter does so, whereas the former automatically enables the latter and also adds a KF2 style HP/MP display.

I'm more impressed by the compass than the display, which just uses the menu system, like KF2 does. But I wonder if there's a way to improve it, so it better complements the new compass. I think VR may require 3D menus, which is my first instinct on how to improve it.

To see the compass you'll have to SVN Update your data/menu folder to get the MDO and TXR file. Actually these displays are the first time I've added both menu and MDO elements to SOM. Slowly but surely I'm inching closer to more sexy extensions. I don't know why it's taken so long to get to model extensions, it just has. Ultimately it's not as high priority as it seems.

The compass is kind of cute. It tracks your movement in a lot of ways, not just to indicate where you're facing, but it acts like a little bobble head that's on your person. It doesn't really look up and down like in KF2 so that instead it stays readable. It's also angled down so it feels like you're looking up at it, which you are since it's on the the top edge of the screen.

The lettering on the compass is what inspired the new extension to do_aa. Technically I renamed the old extension to do_aa2, in a bit of an odd choice. It's relegated to being used to manually control effects, whereas the new do_aa automatically turns on its accessory effects that it requires to look nice, which includes do_aa2, do_smooth, and do_lap. Those all get packaged into do_aa now. But how this works is if you turn off do_aa they all remain on, so turning it on and off (weirdly) is what you might do to have everything except the new texture effect.

In theory these do_aa effects might be unpleasant for some, or not work with monitor settings or be incompatible with a monitor altogether. I haven't had enough feedback to know how many can use them happily. My monitor has a "Response Time" setting, which if I turn it on it makes motion in movies choppy (which is what it's for) and shows heavy black bands in games. So I'm thinking this option (it inserts black frames between real frames) is for people who see very differently from how I do. I think my eyes or brain are different in this regard.

EDITED: Ooh! I just spotted the compass in the second screenshot, so it's technically included. I wasn't going to include it. It's still early. Part of the problem it has right now is it's subject to the level's lighting. In Moratheia, and most games, it's not enough to light it properly. I have to add some extensions too to control its colors and opacity. In the final version (not seen here) I have colored each letter to be very white, but still technically different complementary colors. N is green, W is yellow/peach/tan color, and S is purple/pinkish, and E is bluish/greenish. There actually weren't more distinct hues than this. Luckily they bleed nicely into one another forming a kind of rainbow spectra, albeit not ROYGBIV. They are more like off-white.

Edited: For 2.5hrs I'd uploaded a debug build instead. I really doubt anyone downloaded, but just in case, maybe you will or won't see this.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version