Author Topic: Physically-Based Rendering Builds  (Read 58793 times)

0 Members and 2 Guests are viewing this topic.

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Swifty, in addition to ambient occlusion maps, what about physically based diffuse albedo map?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Physically-Based Rendering Builds
you... referenced to a reference m8.

**z64555 applies operator *

[edit] Hmmm, yt doesn't work on this one.

https://www.youtube.com/watch?v=FQMbxzTUuSg
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Physically-Based Rendering Builds
Hmmm, yt doesn't work on this one.


FTFY

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Physically-Based Rendering Builds
Hmmm, yt doesn't work on this one.

[snip]

FTFY

oh, thats how it works, thx
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Anyway, are you going to commit this PBR along with support for ambient occlusion and physically based diffuse albedo maps into main git branch of FSOpen, or you are going to update these builds altogether. I think there are a lots of bugs you all need to address them before doing the former, so the latter is likely.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline Echelon9

  • Moderator
  • 210
Re: Physically-Based Rendering Builds
... I think there are a lots of bugs you all need to address them before doing the former, so the latter is likely.

Have these bugs been reported in Mantis or as GitHub issues? Can you please provide links or references.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
Work is starting to cool down. I have more time to work on side projects again! Therefore I made some improvements to the PBR builds.

  • Introduced "-albedo" textures. Any maps with "-albedo" suffixed to their filename will be used as the diffuse map when lit. The base map will only be used for un-lit rendering and fixed function rendering. If your diffuse map can be used in both PBR and un-lit/fixed function, don't bother with the albedo map and just define the base map. But since this is a space game engine and we have plenty of metallic objects flying around, those cases might be rare.
  • Fixed gamma correction involving clear and fog colors which caused nebula scenes to be an undiscernible soup of solid color. Nebula poofs should be visible now.
  • Added a bunch more rendered objects to the list of emissive objects. Most notable is lightning effects so "As Lightning Fall" is a bit more interesting to play now. Damaged ship lightning arcs now give a nice glow.
  • Bloom respects Cmdline_bloom_intensity. The engine will be expecting a value between 0-100.

Based off of commit 61f2e7851 from master on github. Eventually I'm going to merge the work I've done trying to get a more flexible internal material system working in the engine. I'm sick and tired of passing flags and setting global variables to set draw state.

Get yer PBR-enabled models from Shivan Hunter here: http://www.hard-light.net/forums/index.php?topic=89583.0

http://www.mediafire.com/download/4v54533fs33xibl/pbr_61f2e7851.zip
https://github.com/SamuelCho/fs2open.github.com/tree/pabst_bleu_ribbon
« Last Edit: October 28, 2015, 11:34:52 pm by Swifty »

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
  • Introduced "-albedo" textures. Any maps with "-albedo" suffixed to their filename will be used as the diffuse map when lit. The base map will only be used for un-lit rendering and fixed function rendering. If your diffuse map can be used in both PBR and un-lit/fixed function, don't bother with the albedo map and just define the base map. But since this is a space game engine and we have plenty of metallic objects flying around, those cases might be rare.
Is this proper support for baked AO? So you just add a new texture without the baked AO and add "-albedo" to the name?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Yeah, now all that's needed is support for a -ao map.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Yeah, now all that's needed is support for a -ao map.
...What would be the point of that? Just bake the AO into the normal diffuse, so it works with both PBR and non-PBR rendering.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
The albedo/diffuse maps set the color for a given area of the ship. AO says that an area is in shade; keeping AO on the albedo/diffuse would be interpreted by the renderer as that area of the ship being colored differently than it actually is supposed to be, which means that the response to dynamic lighting would be different for those areas than what we would actually expect.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
The albedo/diffuse maps set the color for a given area of the ship. AO says that an area is in shade; keeping AO on the albedo/diffuse would be interpreted by the renderer as that area of the ship being colored differently than it actually is supposed to be, which means that the response to dynamic lighting would be different for those areas than what we would actually expect.
Right, but you don't keep the AO on the albedo map, that's the point of the albedo map; it's used for when it's lit, so the fact that the base map has AO baked on doesn't matter to its response to light because if it's responding to light, it's using the albedo map...

...or, at least, that's how I interpreted what Swifty was saying, hence why I asked for clarification.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Ah, I got you. My point is that the renderer uses either the albedo or the diffuse, and so you'd lose AO information in cases where an albedo map exists, necessitating the addition of an ao map (or using a channel of a different map to hold this sort of info)
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Ah, I got you. My point is that the renderer uses either the albedo or the diffuse, and so you'd lose AO information in cases where an albedo map exists, necessitating the addition of an ao map (or using a channel of a different map to hold this sort of info)
Oh, I see. I was interpreting it as "when light shines on the ship, the bits that light is shining on use the -albedo map instead of the base map", not "if -albedo is present, it's used instead of the base map". Basically the inverse of an -ao map.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
In the shader, diffuse/albedo maps are the same thing. It's just, the engine will use diffuse maps for both unlit/fixed function and fragment shaded lighting while albedo maps will exclusively be used in fragment shaded lighting. So if you want to bake your AO into a diffuse/albedo map, you're more than welcome. However, that's negated by the fact that in PBR, metallic materials have a zero diffuse response. Meaning your diffuse/albedo will be black which will negate any baked AO.

So The_E is correct. We're going to have to have a separate AO map system. Perhaps with the red channel being an actual ambient occlusion map that only affects ambient light (And eventually image-based ambient lighting). While the green channel will be a cavity map which will only affect diffuse and specular light.
« Last Edit: October 29, 2015, 12:38:39 pm by Swifty »

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Man... I'm going to have a lot to learn when this is complete in regards to creating textures.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
A few things I've seen:

damage glowmap applied for no apparent reason:



cockpit glowmap applied to glas geometry for no apparent reason:



This latter issue is also visible in the F3 lab, and seems to be fairly universal for any model with transparencies.

None of these assets have been converted to PBR.

Also note how much time is spent in page_flip, I am not sure whether that's indicative of anything.

Finally, FXAA seems to not work anymore on my end.

EDIT:

There's also an issue where after playing a cutscene like Icarus, performance seems to tank absolutely. After exiting the cutscene, I got 8 FPS in the lab on something as simple as the MVP Ulysses model, this is clearly indicative of some rather heavy weirdness going on.

These issues can be reproduced using the 2014 MVPs. The Loki is an especially visible example.
« Last Edit: October 29, 2015, 02:13:42 pm by The E »
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Physically-Based Rendering Builds
I can confirm the texture application issue. As far as we can see, it does not appear to be driver related.

As for performance, I get better performance than on previous PBR builds. Ran through Icarus in 1440p at 60 fps most of the time, ending up with an average framerate of 56.4 fps.
<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 Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
Man... I'm going to have a lot to learn when this is complete in regards to creating textures.

I just hope this isn't an unreasonable work flow because I totally get where you're coming from. Let me know if you have any issues with how this will all be laid out. Please ask questions if you need me to clarify some stuff. If you're comfortable with PBR workflow in some other engine, whether it be Marmoset, Unreal, Unity, or CryEngine and aren't satisfied with how we're doing it, please let me know about it as well.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
I have no experience with a PBR work-flow and am really just waiting on a pretty straightforward list of texture types and what they do.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.