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

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Physically-Based Rendering Builds
UPDATE 2/12/2016:

- Increased the color threshold for the brightpass.
- Made specular maps render at all detail levels.

UPDATE 1/16/2016:

- Got rid of "-albedo" maps. Having two different types of diffuse maps just because they didn't look right under unlit environments seemed silly. It was also hard to process transparent vertices for both maps so I think getting rid of "-albedo" was the right call.
- Added support for "-unlit" maps. These maps will only be used if being rendered without lighting. Seemed like a better compromise.
- Added support for "-ao" maps. These maps will be used for ambient occlusion. The red channel is the ambient occlusion map and will only darken ambient lighting. The green channel is the cavity occlusion map and that will affect diffuse and specular.

ORIGINAL POST:

Physically-based rendering builds are ready for testing. Included in this package is a simple mod to use with the 2014 MediaVPs. Just extract and place the folder into a Freespace directory that has a MediaVPs 2014 folder and point the launcher to run the pbr_test mod.

The Ulysses is rendered differently now thanks to the two replacement maps in the mod. One is a simple diffuse map which is black which may seem confusing at first but is normal in a PBR workflow for rendering metallic materials. Another map is what I call a "reflectance map" denoted by -reflect.dds. This is an example of the new specular map format required to take advantage of physically-based rendering. RGB values in the -reflect map is the specular reflectance color. The alpha channel is the gloss map.

Setting the diffuse map to black allows the specular values in the reflectance map to exclusively drive the light response in the rendering of the model. Wear and fine details of the model better respond to light thanks to the gloss channel of the specular reflectance map. Go ahead and take a look at the Ulysses in the F3 Lab to see how it looks.



Also take a look at the Material Overrides button in the F3 Lab next to "Render Options". The Material Override window provides a bunch of sliders you can mess with to get a good idea how how certain parameters look in the new lighting model.



A more exhaustive guide about creating PBR assets has been posted.

PBR-enabled texture maps for the MediaVPs: http://www.hard-light.net/forums/index.php?topic=89583.0

http://www.mediafire.com/download/sa5kj9l84n81jzy/pbr_pbr_ed2bbc35_r2.zip
« Last Edit: February 12, 2016, 08:34:01 pm by Swifty »

 
Re: Physically-Based Rendering Builds
ban this sick filth
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline BritishShivans

  • Jolly good supernova
  • 29
Re: Physically-Based Rendering Builds
jesus christ it's an angry manta ray

get in the aeolus

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Physically-Based Rendering Builds
If you had a ship which is basically matte (only diffuse lighting), would the PBR method make it look any different? Or does this basically only concern specular lighting?

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
If your ship needs an instant metallic look but you only have a diffuse map, a quick conversion would be to import the diffuse colors into the reflectance map's RGB and set the entire diffuse map to black. You can either set a constant gloss on the reflectance map's alpha channel or copy-pasta the red or green channel of the old diffuse map into the gloss channel. Some parts of the model will look wrong but it's a nice quick and dirty workflow to get started.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Physically-Based Rendering Builds
No, I mean if I have a ship which is completely matte and I make it completely matte in the PBR setup, do they render exactly alike? Or, in other words, does the PBR method offer any visual benefits aside from better specular lighting?

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
Technically, all the changes are in the specular lighting but in reality, everything has some sort of specular. If you want to render a very matte object, you should have a specular color of zero (the engine will correct that to the minimum of (0.04, 0.04, 0.04)) and set the gloss to very low. The object will look very matte and rough. The PBR workflow gives you a lot more power over authoring both matte and shiny objects.

 
Re: Physically-Based Rendering Builds
Is that 0.04 minimum really necessary? Yes, I've read the blog post you mention in the code but this is a sci-fi game. I see no reason to restrict the artists like that when it could be put to interesting effect.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
yes, otherwise there's no point in having a gloss parameter if specular can be zero.

 
Re: Physically-Based Rendering Builds
What? Just because specular can be zero that doesn't change anything if the modeller doesn't decide to make it that way. Why would you deliberately remove that option?
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Spoon

  • 212
  • ♪ ♬ ヾ(´︶`♡)ノ ♬ 淫画
Re: Physically-Based Rendering Builds
Can you just let Swifty work his magic, instead of *****ing about tiny things you probably don't even fully understand?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Physically-Based Rendering Builds
'In reality' everything has some sort of specular, but it's not like there aren't exotic materials that you wouldn't find in, say, John Hable's living room, but you might want to render in a science fiction game.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Axem

  • Administrator
  • 211
Re: Physically-Based Rendering Builds
I was just playing around in the lab and with all overrides on and set to zero, I can't really perceive any sort of specular/gloss at all at that point. I don't think that minimum value is going to cause anyone who wants a completely matte object any real harm since its pretty much matte at that point.

 
Re: Physically-Based Rendering Builds
Artemis with material overrides all set to 0 with specular floor in place:


Same screenshot but with the 0.04 limit patched out:
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Axem

  • Administrator
  • 211
Re: Physically-Based Rendering Builds
Ok, I concede there is a difference.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Physically-Based Rendering Builds
 :confused:

You're joking, right?  They look identical to me...
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Re: Physically-Based Rendering Builds
Might be your screen contrast or something, for me the Artemis is clearly visible in the first shot but only shows up as a sliver of grey on the second.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Physically-Based Rendering Builds
Yeah, the fact that you can somewhat see the model in the first screenshot and not the second is why most if not all modern PBR engines set 0.04 as the minimum specular reflectance value. Thanks for posting the example.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Physically-Based Rendering Builds
Might be your screen contrast or something, for me the Artemis is clearly visible in the first shot but only shows up as a sliver of grey on the second.

I changed my contrast & brightness settings around but it didn't make any difference. Must be my eyes  :lol:

More seriously though, what's the point in having (parts of) a model you can't see?  After all FSO is a game, not a simulation engine.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Linux OBS Packages: FSO 3.7.0 | FSO BP Build | wxLauncher (?) | PCS2 (?) | wxVPView (?)
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Re: Physically-Based Rendering Builds
I dunno, it could be used to interesting effect in a few places. I don't really understand the attitude that the engine has to force modellers not to use very dark speculars in case they abuse them.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.