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

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
I'm already aware of the issue.

And you reported it on the Git repo I'm no longer using.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Visionary modder and coder
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
I'm sorry, Swifty. I should have reported it on your working Git branch.

You might want to check this out:

Physically-Based HDR Rendering

There's an article on Physically-Based Camera Rendering. It depends on HDR rendering.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Physically-Based Rendering Builds
Interesting article, but if we are trying to achieve immersion in games, wouldn't that be better served by replicating what the human eye itself sees in real life, and not what a camera sees?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Indeed. It's a question of what kind of look you wish to achieve, whether you're going for something filmic or something naturalistic.
**** 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 Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Visionary modder and coder
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
We're going for both: filmic and naturalistic. These depend on what the shader designer wants.

The camera sees depth of field, motion blur, and lens effects.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
We're going for both: filmic and naturalistic. These depend on what the shader designer wants.

The camera sees depth of field, motion blur, and lens effects.
...But we don't have depth of field, motion blur, or lens effects...?
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.

 
Re: Physically-Based Rendering Builds
We totally have lens flares as a post-processing effect atm.

[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
We totally have lens flares as a post-processing effect atm.
Actually, turn off post-processing and you should still see it; it's just part of drawing the sun, with graphics defined in stars.tbl. The reason I missed it at first is because I was checking the post-processing code. ¯\_(ツ)_/¯
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 Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Visionary modder and coder
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
And what about lightshafts, which has been shown in the recent screenshot?



Actually, turn off post-processing and you should still see it; it's just part of drawing the sun, with graphics defined in stars.tbl. The reason I missed it at first is because I was checking the post-processing code. ¯\_(ツ)_/¯

Have you done? Are there changes needed to support physically-based HDR post-processing effects?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Wrong question to ask. There are always changes needed.

In PBR builds, post processing only happens after tonemapping. I don't think there are any post effects that actually benefit from working on HDR buffers.
**** 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 Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Visionary modder and coder
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Swifty, how is going on your PBR builds? Any progress on solving the glowmap applied to models for weird reason problem?
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 29
  • Visionary modder and coder
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
I've heard that you started committing your changes (including PBR) to the main branch.

http://www.hard-light.net/forums/index.php?topic=91220.0
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Campaigns:
FreeSpace: Reunited - Shattered Stars

Ships:
GTS Hygeia, GTT Argo, SC Raguel

 

Offline DahBlount

  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Physically-Based Rendering Builds
Those changes aren't related to the PBR branch at all. As far as I can tell, the PBR branch is nowhere near being ready to merge into master.
<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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
Yeah, team glow maps have nothing (or very little, anyway) to do with PBR.
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
Sorry about the late update guys. Being the lead programmer of a certain game takes up a lot of your time when you're trying to get it shipped. :P

Anyway, new build. Fixed all the weird issues with glow maps being accumulated on certain materials.

I got rid of "-albedo". I replaced it with "-unlit". It got really confusing in the code trying to keep track of two different diffuse maps that would be used in lieu of each other's presence, especially when it came to transparent surfaces. Keeping track of transparent vertices for different diffuse maps would have made a mess of the code. Unlit maps seem like a better solution. Basically it's a diffuse map that will be used when the model has no lighting applied. I don't keep track of transparent triangles for unlit maps since they're usually rendered in special situations and by the very nature of them being unlit, don't need deferred lighting applied to them.

This update also introduces "-ao" maps. "-ao" maps or ambient occlusion maps will darken certain components of lighting. The red channel of this map is ambient occlusion and will darken ambient lighting. The green channel is cavity occlusion and will darken diffuse and specular lighting. Try it out. Let me know if there are any issues or feedback.

http://www.mediafire.com/download/kiasjgzk5bwpsj0/pbr_ed2bbc35.zip

This build is based off of the latest revision on Github. (ed2bbc35ebefb4b91822fb2d267fefa55b136ff8)

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Physically-Based Rendering Builds
so, can i use traditional black and white ao maps too? will it automatically use the single channel for both?
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
A black and white AO map should work out of the box. I assume red, green, and blue channels are sharing the same values. So in that case, ambient and cavity, taken from the red and the green channels, will have apply the same amount of darkening on ambient, diffuse, and specular lighting.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Physically-Based Rendering Builds
I got rid of "-albedo". I replaced it with "-unlit". It got really confusing in the code trying to keep track of two different diffuse maps that would be used in lieu of each other's presence, especially when it came to transparent surfaces. Keeping track of transparent vertices for different diffuse maps would have made a mess of the code. Unlit maps seem like a better solution. Basically it's a diffuse map that will be used when the model has no lighting applied. I don't keep track of transparent triangles for unlit maps since they're usually rendered in special situations and by the very nature of them being unlit, don't need deferred lighting applied to them.
So... I'm not sure I understand how -unlit maps work. Also, I take it this means you can't use the same textures for PBR and non-PBR builds again?
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
So... I'm not sure I understand how -unlit maps work. Also, I take it this means you can't use the same textures for PBR and non-PBR builds again?

Any assets that worked on a previous build of Freespace Open should look generally okay in a build with PBR. But a texture that's specifically built for PBR won't look good in a previous build with Freespace Open with the old lighting model.

Unlit maps are optional and are used as the diffuse map of a model if the model is rendered without any lighting. AKA, if the model is being rendered in the targetbox or being rendered in the ship preview window in the mission briefing map.

So if you have base map that doesn't look good when being rendered with no lighting, probably because you chose to have a near black diffuse to simulate metallic materials, then you would have to use an unlit map with the desired colors.

But honestly, if this is all too cumbersome, I'd rather just indiscriminately enable lighting in the targetbox and briefing ship preview windows so we don't have to deal with this black diffuse problem.

 
Re: Physically-Based Rendering Builds
AFAIK you can switch between wireframe, no lighting, and normal lighting for the targetbox with Alt-shift-Q so that should be a non-issue.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded