Final Fantasy 7 > Releases

[FF7PC] Cosmos Lighting: a real-time lighting and shadow mod

(1/9) > >>




Cosmos Lighting is a FFNx mod that adds real-time lighting and shadows to the PC version of FFVII.


* Real-time physically-based lighting
* Real-time shadows through shadow maps
* Field character shadows
Current limitations

* Single directional light-> lights direction and other parameters can now be customized per-field through config.toml file on the lighting/ folder

* Constant ambient lighting-> lights direction and other parameters can now be customized per-field through config.toml file on the lighting/ folder

* Global material parameters -> parameters can now be customized with PBR textures

* Field Shadows only apply to floor surfaces (walkmesh)
* No lighting or shadows in world map mode

The first version of this mod has been integrated into FFNx. You can try it with the latest FFNx canary build.

Please enable lighting in the FFNx.toml settings file. Enable the FFNx DevTools if you want to play with parameters such as light direction and color.

For modders

Here is a script to convert PBR textures to the format expected by FFNx.


Thanks to everyone involved into making FFNx, specially its main contributors Aali and TrueOdin.
This mod would not be possible without their awesome work!


Spoiler: show

Dev Log


* Implemented support for PBR textures (normal map, roughness map, metalness map, AO map)
Spoiler: show


* Implemented deferred draw calls for most scene models
* Improved shadow map setup by setting frustum target to the scene AABB center
* Implemented character field shadows by projecting 3D models into the walkmesh
Walkmesh reference:
Field camera reference:
Spoiler: show
* Implemented method that extrudes the walkmesh to fade out sharp shadow discontinuities
Spoiler: show
* Implemented field shadow fade out with distance from occluder to the walkmesh floor
Spoiler: show
* Added ImGui window for adjusting parameters and debugging Spoiler: show
* Improved field shadows using the stencil buffer to assure that they are only drawn over the background

* Implemented vertex normal calculation by averaging adjacent triangle normals
* Implemented physically-based lighting with diffuse and Cook-Torrance specular BRDF
Battle camera matrix retrieved from ff7_game_obj::camera_matrix
* Implemented real-time shadows through shadow maps
* Implemented OptimizedPCF method to remove shadow aliasing / create soft shadows

Impressive work Cosmos! It gives a massive rejuvenation boost look to it especially combined with ninostyle's models.

 I'm a little concerned about the source of light but this will definitely be quite interesting to test. Thanks a lot for your contribution!

Luigi Brosse:
So inpressive!

Fantastic work.

It's really impressive how much of a difference it makes in battles.


[0] Message Index

[#] Next page

Go to full version