Author Topic: GGX Lighting Model  (Read 1036 times)

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Hi, it's me, the dude who introduced physically-based rendering to Freespace. FSO 3.8 shipped with the Blinn-Phong specular model which looks pretty good. I adopted it because it was cheap and easy to implement.

However, a lot of commercial games are shipping with more complex specular lighting models. One notably is GGX, popularized by Disney's engineers (https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf), now being used in Unity and Unreal.

GGX is a bit more expensive to calculate than Blinn-Phong but its specular reflectance behavior is closer to reality than that of Blinn-Phong.



Taken from http://www.neilblevins.com/cg_education/ggx/ggx.htm, the first image shows a highlight from real world chrome values. The second image is GGX. The third image is the Beckmann reflection model (which produces values close to Blinn-Phong)

Here's what it looks like in Freespace:









As you can see, Blinn-Phong has a bit of a stronger falloff than GGX, almost making reflections seem glossier than they really are. GGX allows the reflections a chance to relax a bit allowing for a bit more material expression.

Try it out yourself (Win32 Build Only): http://www.mediafire.com/file/ne7sxlks5v67j7k/ggx_test_win32.zip

 

Offline Oddgrim

  • 29
  • I like building stuff.
    • Art Thumblr
Great stuff, I'm gonna play around with this XD
[GhostOfMjn: I can provide hi res vasudan ass]
[Hades]: we have so much in common we should bang.
My models page:
http://p3d.in/u/Oddgrim

 

Offline Nyctaeus

  • Betrayal is his middle name
  • 211
  • Lazy, retarded and speaking polgrish.
    • Minecraft
    • Exile
Shiny! And this reflection model highlight all the scratches much more. I will try this with proper PBR stuff. Maybe it preserve all custom reflectivity settings better than current rendering engine. Good work, man :yes: !
Exile | Shadow Genesis | DA Profile | P3D Profile

MY RELEASED CONTENT SO FAR
Old Conversions | GTSD Anchorage | ORFg Tychicus | GTCa Sagittarius | SCv Scylla | EFC Evangelist | EFFg Solomon | GTL Latona | SC Raguel | PVD Atum | GTCv Eurynome | FractalSpace - Apophysis Skydome Pack | Updated Ancients Models
All of my stuff can be used ONLY in Freespace campaigns and missions.

Veteran modder and graphic designer of all kinds. 3D is my speciality. Feel free to PM me if you looking for a model or other GFX help.

 

Offline Axem

  • Administrator
  • 211
I have some more comparison pics!

First a very rocky asteroid.
Blinn Phong


GGX


Your first reaction may be "huh, not as vibrant" which... it is, but the specular highlight on the asteroid is much less prominent which I think helps sell the "rockiness" of the asteroid.

Next SF Asteroth (I was experimenting with making new PBR textures for some Shivan fighters)
Blinn Phong


GGX


Again your first reaction may be "huh, normal map doesn't pop as much" which.. it doesn't, but if you look at the two rear panels, in Blinn Phong, one is well lit, and the other is just totally dark, only the environment reflection is doing anything. In GGX, both are well lit, and I think gives a better contrast with the rest of the hull.

Basically intensity of the lighting is a little bit less, but you get something more visually pleasing in my opinion. Everything isn't as harsh.

(Also here's a worst case shot of the Asteroth
Blinn Phong


GGX

 
Hm, I get error 0xc000007b when launch this.  :(

Nvm, copied files from nightly win32.
« Last Edit: December 17, 2017, 05:54:47 pm by tomimaki »

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Yeah, you'll need the 32-bit dlls for the builds in the OP.

Alternatively, there are 64-bit builds here: http://www.mediafire.com/file/ndowfov7417s84h/fs2_open_64-bit_GGX_Builds.zip
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Would I be correct in assuming that an ATI 5770-based card would not support this?
The Trivial Psychic Strikes Again!

 
@DahBlount
I don't like mess both architectures on windows so, thanks to you, I still can stay at 64b only. And I have no idea how to compile builds on windows. :p

@Trivial Psychic
Why not? It doesn't require any new opengl extensions.

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Would I be correct in assuming that an ATI 5770-based card would not support this?

It should be able to support it, at least in so far as being able to execute the shaders.

That being said, I strongly recommend doing an update sometime soon, if that is at all possible.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
*snip*
That being said, I strongly recommend doing an update sometime soon, if that is at all possible.
This. Any card that supports OpenGL 3.2 or later can run FSO, but with the advent of Deferred Lighting, Soft Shadows, and PBR, newer gpus are highly recommended.
<Axem> yet still more insightful than #hard-light

<Axem> jad2.23 will just be cat videos

<DahBlount> So
<DahBlount> JAD2.2 is like that
<Axem> maybe
<Axem> it can be whatever you like!
<DahBlount> A Chocolate Sundae?
<Axem> sure

My models: GTF Gilgamesh - GTD Nuadha [Redesigning] - Ningirama [WIP] - GTG Zephyrus