Author Topic: Modding Expeditions (KF)  (Read 45955 times)

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #180 on: May 24, 2020, 02:01:05 am »
 :eek:



Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #181 on: June 22, 2020, 04:22:17 am »
CORRECTION: For the record, back in this thread I made a lot of posts as I was trying to figure out how to map the texture's color to match the PlayStation in an emulator. Well, last week I began to notice that a lot of different formulas with different exponents could be made to approximate the same color, so even though I had matched 90% of the pixels in the screenshots to exact color values to the RGB 8-bit color codes, there were still some things I could not reproduce. And honestly, the color always seemed a little bit wrong to me.

And I knew the formula had too many terms in it to likely be the real formula, since so many others could be made to work.

So I went back to the drawing board and was able to determine that the real exponent was 1.25, or that's extremely close anyway, and it also happens to match the black fog's curve. I also realized that the curve could be moved to the center of the texture values and still look good, so I figured the real formula would do this, and so I think I now have an exact formula that is in the general ballpark. I'm no longer interested in exact matching because I don't necessarily like the PlayStation color I think, although the following formula must be extremely close to it, and it looks very nice, so I don't expect I will be tinkering with it any further. The reason I was so interested in matching is I had no other way to determine the lighting conditions. If the color was wrong I couldn't accurately say my lighting was right, but I know it's close enough now.

gamma_y = (pow(y+0.5,1.25)-0.42)*1.575

The 0.42 part is exactly 0.5^1.25 so the final 1.575 part is the only interesting part of the formula. If it was 1.66 it would be less interesting, perhaps that's what the PlayStation is using. It seems brighter. 1.66 is 1.5^1.25. In hindsight this is the simplest formula I can imagine and I'm sure the first formulas I must have tried were nearly identical. But I never thought the exponent was as low as 1.25, so I never tried it. And I just went with the first formula I tried that was a close match.

That was a mistake and a lot of my troubles I had with trying to make the color better (not necessarily accurate) would run into trouble with the contrast being too great, so I was relieved to find out 1.25 was the exponent, since that's much lower than anything I'd tried up to that point, so I was under the impression it would be low contrast. It actually took me a while to think to try it, but I had by that point realized the exponent had to be lower and I was pretty confident it would be right.

My project is going very, very well, much better than I'd expected it to, so I'm pretty confident it's going to work out without a hitch. I do fear it might ultimately prove unable to even satisfy myself, but so many things have been going super lately my attitude is one of anticipation as opposed to reservation.
« Last Edit: June 22, 2020, 04:27:46 am by Holy_Diver »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #182 on: July 18, 2020, 04:44:37 pm »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #183 on: July 23, 2020, 07:25:34 am »
This screenshot is inside MM3D editing software (as we discussed earlier in this topic.)


Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #184 on: September 09, 2020, 11:20:03 am »


This is with new settings that doubles the size of the textures in game combined with a new dither mode that makes the dither dots 2x2 so they're visible to the naked eye, like on the PlayStation.
« Last Edit: September 09, 2020, 12:49:43 pm by Holy_Diver »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #185 on: September 27, 2020, 08:51:44 am »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #186 on: October 05, 2020, 01:16:30 pm »
Here is an image of the dark stairwell discussed near the beginning of this conversation, reproduced in a SOM project with a new variable lighting system. Interestingly the lighting changes seem to affect contrast also, which is also reproduced in this image.

P.S. For some reason this image seems very dark for KF2 images. It's strange how KF2 can feel so vibrant usually, but also so dark simultaneously sometimes. I suppose they balance each other out. Playing on a dark background or dark environment helps a lot to make the dark feel visible.

Filtering tends to make it feel darker than in the original. That's because the bright colors get mushed into the darker ones at a distance. The green caves feel much more green and much less gray because the green and gray mix together. (Edited: this has since been fixed by adding an "sRGB" blending model that converts between pixel values and the "energy content of wavelengths of light". I'm not quoting anything but it sounds more complicated than it seems like it ought to :rainbow:)

« Last Edit: October 14, 2020, 04:13:54 am by Holy_Diver »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #187 on: October 29, 2020, 06:00:26 pm »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #188 on: March 01, 2021, 09:15:05 am »
Update: The demo (previous post) (https://swordofmoonlight.itch.io/k) now showcases a supersampling mode (F1) and almost perfect controls.

With supersampling the visuals are perfected combined with the novel 3D anti-aliasing techniques. ATM I'm pretty deep into adding shields (finally) and some new kinds of inputs for the attack buttons. I've also begun an Exselector project. Today I realized in Latin "ex" means "from" in the same sense I think the "From Software" company name is intended to be understood, i.e. like "creatio ex nihilo" or "deus ex machina". My first goal for this Exselector project is to use the accelerometers in Sony's PS4 and PS5 controllers. It's kind of an extension of SomEx in the form of a new "DLL" file and simple EXE that will let it be used by itself to manage game settings and extensions which will supersede the in-game System menu.

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: Modding Expeditions (KF)
« Reply #189 on: May 02, 2021, 10:38:14 pm »
This week I've tried to upgrade NPCs (incl. monsters) to move smoothly (not glitch out) when rounding corners, smoothly climb stairs, and fall, including gravity based falling velocity. This is the first time I've addressed NPC movement, which is pretty big deal, moving down my long list of priorities. Note, I'm not sure I got the final mix right, I've since seen it sometimes glitch some. I had to find a mix that would let the NPCs not slide into a stop but also be smooth when on the move, and it's very difficult to account for the variable movement speed that is based on how the control-point (CP) moves in the character models on any given frame. It will get better over time and I think there's still a serious bug in the clipper that will be addressed eventually, that's the main culprit in these glitches, but smoothing things over will remain important even after it's gone.