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

0 Members and 1 Guest are viewing this topic.

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Posts: 660
  • Visionary modder and coder
    • 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)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline z64555

  • 210
  • Posts: 1,748
  • 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

EveningTea: Time to go Freeman on this cultist..
* EveningTea pulls crowbar off his shoulderstrap and charges screaming incoherently across the marsh *

z64555: bro. do you even salad

 

Offline ngld

  • 28
  • Posts: 259
Re: Physically-Based Rendering Builds
Hmmm, yt doesn't work on this one.


FTFY

 

Offline z64555

  • 210
  • Posts: 1,748
  • 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

EveningTea: Time to go Freeman on this cultist..
* EveningTea pulls crowbar off his shoulderstrap and charges screaming incoherently across the marsh *

z64555: bro. do you even salad

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Posts: 660
  • Visionary modder and coder
    • 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)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline Echelon9

  • Moderator
  • 210
  • Posts: 1,215
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
  • Posts: 1,193
  • 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
  • Posts: 3,122
  • Mister Subspace Strikes
    • 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
  • Global Moderator
  • 213
  • Posts: 12,498
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Yeah, now all that's needed is support for a -ao map.
**** 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 AdmiralRalwood

  • 211
  • Posts: 3,122
  • Mister Subspace Strikes
    • 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
  • Global Moderator
  • 213
  • Posts: 12,498
  • Nothing personal, just tech support.
    • 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.
**** 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 AdmiralRalwood

  • 211
  • Posts: 3,122
  • Mister Subspace Strikes
    • 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
  • Global Moderator
  • 213
  • Posts: 12,498
  • Nothing personal, just tech support.
    • 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)
**** 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 AdmiralRalwood

  • 211
  • Posts: 3,122
  • Mister Subspace Strikes
    • 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
  • Posts: 1,193
  • 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
  • Posts: 5,147
  • Anims: 418, Cutscenes: 8, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: Physically-Based Rendering Builds
Man... I'm going to have a lot to learn when this is complete in regards to creating textures.
Oddgrim: I AM PUSHING MY BELLY BUTTON AS HARD I CAN BUT NOTHING HAPPENS. NOTHING!
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Posts: 12,498
  • Nothing personal, just tech support.
    • Skype
    • 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 »
**** 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
  • Posts: 732
  • Violence is always the answer
    • 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

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

Twilit Sagittarius

 

Offline Swifty

  • 210
  • Posts: 1,193
  • 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
  • Posts: 5,147
  • Anims: 418, Cutscenes: 8, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
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.
Oddgrim: I AM PUSHING MY BELLY BUTTON AS HARD I CAN BUT NOTHING HAPPENS. NOTHING!
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!