Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Lollie

Pages: [1]
I'm no expert on how the models/lighting etc. work but you mentioned that you were guessing that lighting wasn't being applied additively to Cloud's PC field model textures, and I think I can confirm that this is the case.
I ended up doing some more poking around, and the answer might be even simpler. On PC, textures on models appear to be rendered half as bright as they're supposed to be. Like, if a vertex color has a range of 0-100%, textures on models seemingly only reach 0-50%. Doubling how bright textures render could actually be the way to fix them. It could probably be done via the "pixel.hlsl" shader file, if someone can figure out what variable FF7-PC needs in order to specifically target textures on models. (otherwise, you end up with backgrounds, menu graphics, and world-map skies being rendered too bright as a result.)

I landed on this answer while having a quick peek at the World Map, it turns out this texture brightness rendering issue affects *all* textured models. It's not the only issue, but it makes a big difference.

[full-res screenshot comparison via this Imgur album]

I think it is more possible, that textures are unaffected by the light on the PSX to keep the stress on the hardware small. On PC they just didn't cared about this behavior and they probably didn't knew of it.
Naw, PS1 could handle both vertex lighting and vertex colors on textured models without any big issues - Crash Bandicoot, Tekken 2, and Tomb Raider are all examples.

Here's a quick shot from FF7-PS1 (using a very high internal resolution in DuckStation to get a clean screenshot). You can see that the same features are darker on the more shadowed side of Cloud's face. Textures are definitely affected by field lighting in FF7-PS1.

If I understand correctly this is like having 3 directional lights, each one having its direction along each of the X, Y, Z axis. I suppose that this is a very rough way to imitate global illumination instead of just having a constant ambient color that would look flat. This a very ad-hoc way of doing lighting so I am not really interested on replicating this way of doing lighting. This is not how lighting is done in modern games so I think we would do much better if we don't use this data at all.
You understand it correctly! And honestly, considering the way you're doing lighting with this mod, I think ignoring this data will probably be the right call overall.

That said, I can think of one way to use the data. If you look at the first field model in a scene, and only use that model's *first* lighting channel, you might be able to use the first channel's values as the lighting direction for the scene's global light. It could be good as a starting point at least, and then lighting direction could be fine-tuned later. I have a suspicion that the first lighting channel is the only one that's actually important in most scenes.

For indirect lighting, I am working on implementing Image Base Lighting( IBL) / environment maps.
That'll be very cool, that's exciting. Wishing you good luck!

Echoing the sentiments of everyone else here, this is a really cool mod. Very happy to see this. I hope FF7-PC can be configured/modded to take control of your lighting system, somehow!

Right now there is only one single directional light but it should not be too difficult to add support for point/spot lights. [...] I also read about the game already having some kind of lights (point lights?), so maybe we can use those because implementing a way to manually place lights would be a lot of work I think.
So.. I've asked about FF7's lighting before, and I ended up doing some testing over this weekend. What I found is that the way lighting works in FF7 isn't quite like you'd expect.

Here's a huge post with what I was able to figure out about lighting in FF7.

The short version is: Field models have one ambient color and three lighting channels, each with three axes. Each channel controls light intensity on a specific axis (it accepts positive and negative values, where "0" is the center of the range and represents zero strength), and then the actual light direction is determined based on the values of the three axes. Lights are local to each model. An NPC can move around, and their lighting will follow their position — but lighting on FF7-PC is affected by model rotation.

However, the way lighting is processed in FF7-PC is broken. The correct lighting data is still in the game, and it looks correct when the first lighting channel is isolated. But as far as I can tell, the PC version may be displaying *too much* lighting information, or maybe isn't blending the lighting correctly. (Model textures also don't receive lighting correctly. The most simple fix is for their brightness to be multiplied by 2 via shader.)

Unfortunately (or fortunately, if you want a clean slate to work with), there are no point lights in any of the scenes. There are foreground layers that are blended additively, but that's about it.

Here you can found the new mod soon to be available: Cosmos Lighting
This is ridiculously cool, very promising.. Hopefully it progresses so that it can be controlled per scene, somehow!

I ended up returning to FF7PC this weekend to do some testing, and I have a better understanding of how the lighting system works. My original assumptions were totally wrong. There's no coordinates mismatch between PS1 and PC, no automatic "lit from the camera's position", none of that.

So... The correct lighting data is technically still here in the PC version. But there's something weirder going on. Here's an example from "md1stin", the very first scene in the game.

The original lighting can be found in the first lighting channel, outlined here in Makou Reactor's Field Models editor.

By zeroing out the second and third lighting channels, the first channel can be isolated. And so we get this.

Notice how the vertex lighting pinches the same way down Cloud's forehead, and down the front of his pants. Or how the gradients in his hair travel in similar directions.

Now, the lighting on PC is still noticeably darker compared to PS1. Unfortunately, Makou Reactor currently lacks the ability to edit Field Models data for FF7-PS1, so I can't test how all the lighting channels function on PS1. I don't know if the other two light channels are contributing to the lighting on PS1, or if they're supposed to be disabled, or something else.

My suspicion is that there's a value on PS1 that says which channels are active (possibly the "Unknown" value in Makou Reactor's Field Editor?). If this value exists, it is being ignored on PC, meaning FF7-PC is using all of the lighting channels instead. I don't have a way to test this though, so I can only call this a big guess. Chances are I'm totally wrong!

Another part of the lighting that's currently broken is the textures on Field Models. They're all darker than they're supposed to be. My suspicion (big fat guess! probably wrong!) is that vertex lighting isn't being applied additively to textures, and is merely tinting the textures. This means model textures never get to be brightened, only darkened. I'm unable to test this theory, but as a proof of concept, I tried multiplying the brightness of textures by adding a dirty hack to "pixel.hlsl" in FF7-PC's "shaders" folder. You can already see how much of a difference this makes.

For prosperity, here's my dirty little shader hack for "pixel.hlsl". This affects literally every single texture in the game. Model textures look better, but every background becomes blindingly bright, so it's only good for curiosity's sake.
Code: [Select]
if(texture_flag != 0)
if(texture_color.a == 0.0) discard;

texture_color *= 2; // dirty hack!!

color *= texture_color;

Finally, here's how the Field Model lighting works.

Global light is an ambient tint. It tints the entire model with a flat color, with no additional lighting.
Black (#000000) causes the model's base brightness to be a flat black, while White (#FFFFFF) causes the model to appear fully unlit. Most scenes use a Dark Gray by default (eg: #404040, #595959).

Directional light has three channels, where each channel features a Vector3, X / Y / Z.
You might think these are "position" or "rotation" values. They're more like "Strength" values? They have a 16-bit range, from -32768 to +32767, where 0 is the "OFF" value.

Edit: It's been brought to my attention, it's possible that light direction is determined via a vector dot product, and then light intensity is calculated via vector length. I'll have to do more testing later to confirm this. (end edit)

To demonstrate the basics of how Directional Light works, here is a GIF. Please enjoy this animation of Tifa stuck in the Light Box.

On PS1, directional lighting is baked into field models on a per-scene basis. A model can rotate and move as much as they like, but directional lighting will stick to the model like paint.
On PC, directional lighting reacts to model rotation. A boost in lighting features! Note: Directional lighting is local to field models, and so a model's position does not affect lighting at all.

...And that's all I've got! I hope this information is useful to... someone who knows anything about altering the inner workings of FF7-PC.

Hi Satsuki, I've run into a weird issue. When I try to open Kimera, it immediately throws an error:
"Component 'mscomct2.ocx' or one of its dependencies not correctly registered: a file is missing or invalid"

"mscomct2.osx" is definitely in the folder. Is there another dependency that I might be missing?

edit: Found the answer! Reply #832 by Kaldarasha in the original Kimera thread.
For anybody who wants to install Kimera copy and paste these files (comes with Kimera) to sysWOW64 (on a 64bit OS).*
  - mscomct2.ocx

Open a CMD with admin privileges.
1. Changing the folder from System32 to SysWOW64
Spoiler: show
You will see that:
Code: [Select]

Write at first "cd.." and hit enter
and you gain this:
Code: [Select]
Now write "cd syswow64" and hit enter
to move to the folder with the files
Code: [Select]

2.Next we register the files. Write "regsvr32 COMDLG32.OCX" and hit enter.
Code: [Select]
C:\Windows\SysWOW64>regsvr32 COMDLG32.OCXContinue with
"regsvr32 mscomct2.ocx"
"regsvr32 MSSTDFMT.DLL"
If done correctly you will get every time a success report.

*Note: On a 32bit OS put the files into system32 and leave the command prompt as it is and start with the file registration.

And of course write everything without quotes.

Hi Myst6re, thank you for your work on Makou! I have a couple questions relating to the Field Map Models window:

1) Is there any way to edit the list of currently-loaded map models for FF7-PSX? (Either in the current version of Makou, or an earlier version if this used to be possible)
2) Would it be possible to preview the Global Light and Directional Light for map models?

Wow, 2005. This thread in particular gave some decent insight into FF7's field lighting, thank you for digging it up!

I have brought this up some years ago on the reunion thread. The problem is a bit difficult. The main problem is probably a difference in displaying coordinations. The PSX has some strange logic and doesn't follow the usual xyz. Though the PSX does also bake the light on the models and I can't say in what position it does that. On PC the light is applied in real time on the model.
Ah, I saw your name in Reunion's big spreadsheet about this bug! I never realized that FF7-PS1's lighting wasn't being updated on every frame, that's a funny quirk. Thanks for the info!

After a little poking around, I have a suspicion that lighting is baked into models based on what the first available animation is for each model per field (this usually ends up being a neutral standing pose). It seems though that Makou Reactor can't currently edit which models appear per field in FF7-PS1, so I don't know how to test this theory..

Ever since the '98 Eidos port (and right up to the most recent console ports), every room in FF7 has had broken lighting. The ports light everything from the camera's position (like a camera flash), instead of using each room's lighting information. Edit: See Reply #8!

Are there any mods that fix the lighting? Or any hard info on why the lighting is broken like this?

(Imgur album with full-res comparison images)

Pages: [1]