Author Topic: [WIP] FFVII and Godrays/Global Lighting?  (Read 9503 times)

Mako

  • *
  • Posts: 669
    • View Profile
[WIP] FFVII and Godrays/Global Lighting?
« on: 2017-01-11 10:40:07 »
Yup, I've been working a a shader using Nvidia's new SSDO algorithm http://kayru.org/articles/dssdo/ to approximate global illumination effects to simulate light and the new "Godray" shader. I've got it working to the point where Cloud is the global light can finally be controlled.

https://developer.nvidia.com/sites/default/files/akamai/gameworks/events/gdc14/GDC_14_From%20Terrain%20to%20Godrays%20-%20Better%20Use%20of%20DirectX11CantlayTatarinov.pdf

Now the global light can be assigned to any character even invisible ones that can be placed strategically. But that's not the hurdle I'm trying to clear. I'm trying to find the best way for the light to effect the 2D backgrounds - and I think I've got it. I can actually single out a very specific color key and tell it one of three things. Does it Absorb Light? Generate Light? or Reflect Light.

Hard to imagine from this crusty informative video but I'm imagining real shadows cast and sun glare on the world map. Glowing objects will now shade the character, so on and so fourth. Anyway progress is slow but I made some headway tonight.

https://youtu.be/BEjx0uiQavU

Sorry don't have much more to show y'all. The video depicts Cloud as a global light and you can see the light shifts with him, also the light peaks through the cracks in the vents. Now what this video unintentionally has is light beaming from everywhere that is because I assigned it to colors that are commonly found to test to see if the light was shifting. But with some tweaking to a scene maybe I can show you my overall vision better...

Using Sweet.fx to load a specific tone map when a scene loads seems like one possible way.

sithlord48

  • *
  • Posts: 1632
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #1 on: 2017-01-11 11:35:35 »
Welcome back !! Thats a really cool shader you have there !

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #2 on: 2017-01-11 17:43:43 »
So if we place some invisible objects and flag them with a name which does tell the shader it is a light emitter, we could create light sources? In theory, we could disable the fake global light of the models and let the shader do the light stuff. But Makoureaktor does need the update to place objects on the walk mesh with the background visible. It would be really cool if we could do that.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #3 on: 2017-01-11 18:02:57 »
That's not really likely to happen... and even if it did...  there is no way you can know for sure what it will look like in the game. For that you need to use Ochu and look at the coords. It's the only way to do it right.

Mako

  • *
  • Posts: 669
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #4 on: 2017-01-11 19:55:32 »
So if we place some invisible objects and flag them with a name which does tell the shader it is a light emitter, we could create light sources? In theory, we could disable the fake global light of the models and let the shader do the light stuff. But Makoureaktor does need the update to place objects on the walk mesh with the background visible. It would be really cool if we could do that.

That's one idea. the current method is to use a very hacky method of loading corresponding bitmaps to field maps like reshade me looking for anfrst_1 folder then loading that individual bitmap.

As for no way to know, just trial and error. Reshade me actually has an option to reload shaders on the spot so that saves going in and out of the game. Just like in this video you can reshade the surrounding area and the 3D model based on the texcoord. It's getting the shadows right that's the real tricky part.

Mako

  • *
  • Posts: 669
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #5 on: 2017-01-12 01:44:39 »
Small update here I was able to today work on how the light effects 2D backgrounds. I can already get the light to shade Clouds 3D model and interact with the light.

So in this scene I worked on just the metal walkway ignore the rest of the scene I was able to get the light to shine through complex shapes I chose this spot for that purpose. I was also able to add a light source not only under and over the layer but base it on the texcoord in that world scene.



I still need to find a way to make the light hit other objects easily. It can be done already but the current process takes way to long.
« Last Edit: 2017-01-12 01:46:52 by Mako »

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #6 on: 2017-01-12 02:00:46 »
This is awesome! I really hope you get this going fully. Makes the world seem that more real

Fischkopf

  • *
  • Posts: 217
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #7 on: 2017-01-14 02:19:12 »
I think it looks kind of over the top.

Mako

  • *
  • Posts: 669
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #8 on: 2017-01-16 20:55:54 »
I think it looks kind of over the top.
I don't think anything qualifies as over the top, if your talking about the demo I was just a video created to show light can be generated. My goal was to have more interaction with Cloud such as his model shading green if he's standing next to something that is supposed to be emitting green light. Not just a Character walking through a image...

Mako

  • *
  • Posts: 669
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #9 on: 2017-01-16 23:15:06 »
Taking a break from the field scene to work on the world map, day I've made pretty good progress. Please read the description of the video.

Also, the bloom effect was increased but it only comes into effect when staring directly at the sun.

https://youtu.be/fXBvsh6dOwI

Sega Chief

  • *
  • Posts: 4085
  • These guys is sick
    • View Profile
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #10 on: 2017-01-17 09:25:14 »
This is looking really cool.

Tsuna

  • Global moderator
  • *
  • Posts: 823
  • Working together to create awesome things!
    • View Profile
    • The home of Tsunamods
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #11 on: 2017-12-12 17:27:32 »
I hope this comes back eventually. It looked promising

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: [WIP] FFVII and Godrays/Global Lighting?
« Reply #12 on: 2017-12-30 17:43:59 »
This is a real beauty! I still remember the other shader that made everything look too bright but you got it working. Looking forward for the final result!