Author Topic: Distribution of color information sub-optimal for PBR right now  (Read 6810 times)

0 Members and 1 Guest are viewing this topic.

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Distribution of color information sub-optimal for PBR right now
I find that our PBR maps as they are right now have 2 problems, please let's discuss this while there are still extremely few PBR ships, and before it is to late and everything is set in stone :

1: For most of our ships, the "most important" map is going to be the -reflect map, as many spaceships are going to be a big part made out of metal, this is the map that is going to be the most "visible" in many cases + it holds the roughness information; BUT it's also going to be the one with the most .dds compression errors
it is the only map using 4 channels, 3 for color, 1 for roughness; This is very bad because of compression artefacts, maps with only 2 or 3 channels being used produce MUCH better results in my experience!
hence the following suggestion:
move the roughness somewhere else, my suggestion would be the blue channel of the AO map

advantages:
- less compression artefacts in the relfection map!
- roughness ALSO is going to have less artifacts
- reflection map can be compressed without alpha channel -> saving memory, more than 1/2 of the texture actually!
- ao map can still be compressed without alpha channel -> memory for ao does not increase -> net gain of memory!
- it is more intuative to work with the reflection map, as not the whole damn thing is transparent as soon as it has some roughness

disadvantages:
- slightly less intuative AO map; Roughness in AO, hugh? mostly just a problem the very first time however
- slightly more compression artefacts in the AO, but here they matter the least by far, they are going to be the least visible here!


2. normal maps using the green/alpha channel, instead of the traditional red and green. there are several reasons to not do this anymore, if we are changing the renderer anyway:

advantages:
- no more alpha channel needed in normal maps -> saving memory, again only half the size!
- normal maps are easier to create, less steps needed than to convert from red/green/blue to green/alpha
- it's more intuative, almost every other application out there uses these channels

disadvantages:
- legacy support, but this should be simple: if there is a -albedo map, read the old channels, otherwise, the new ones! something like this has to be in place already to read the old -spec maps anyway

overall i just don't see any valid reason not to make these changes, as long as we still can, the memory saving aspect alone should be enough for a start, and the ships are only going to look better for it!
i hope i didn't forget anything important  :confused:
« Last Edit: September 27, 2016, 04:59:14 am by fightermedic »
>>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 DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
I agree with the second point for the most part, so let's address the first point.

I highly doubt anyone is going to be willing to change the reflectance map now. The issue with compression artifacts in dds is something that's been addressed in the past and I believe the general concensus is to use either nvdxt or Paint.NET. The suggestion to put the gloss in the AO map is absolutely inadvisable as it has no relation to occlusion and is only going to confuse modders.

It is not appropriate to think that, because the information hasn't been fully compiled and released in an ordered way, the system should be partially rewritten to cater to one persons preference.
<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 fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Distribution of color information sub-optimal for PBR right now
well, changing the few reflectance maps that already exist would be a matter of minutes, and seeing how something like 90% of those are on ships i created, and would have to change, that kind of defeats the point
compression artifacts are a real problem on reflectance maps, the leviathan textures for example are full of ugly violet artifacts everywhere, and yes, i know how to compress those maps
yes, my solution might be a bit confusing, as i did write myself, but i think the technical advantages outweigh that by far - on larger maps thats more than 10 MB of video memory for each map! + the artifacts, that could be so easily dealt with by moving the roughness
>>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 DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
Relevant things STAY together, we're not going to change that ever. There also isn't really a technical advantage to this, you're going to get artifacts regardless and the way the reflectance and specular maps get loaded currently always loads the alpha(in fact several maps do, even if the alpha isn't filled) so you wouldn't actually get that memory back. The artifacts are going to be unavoidable with any sort of lossy compression you use unfortunately. You can get around this by using different save formats like 8888, especially for testing. Additionally, some of the textures you've made show signs of multiple compression procedures, so if you want to know why there are a lot of artifacts, probably take a look at what you're doing your work on before finalizing everything.

I understand that the artifacts are frustrating, but the pipeline was designed the way it is for a reason.
<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 Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Distribution of color information sub-optimal for PBR right now
Quote
well, changing the few reflectance maps that already exist would be a matter of minutes
Yeah. No.

Unless you are willing to go change all 95 reflect maps that I made for WoD for me, I'm going to say. No, too late. Should have brought this up with Swifty months ago. There has been a long period to test these things and suggest these things, but apparantly you didn't care to do it back then. I'm sure Swifty has better things to do than to make fundamental changes to his (probably massively complex) code after its effectively 99% done and in trunk and already in use by people.

And for what? A few artifacts? big woop. There are a lot of games out there that don't have pixel perfect graphics, and that don't run on an engine that was made in 1998.
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

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Distribution of color information sub-optimal for PBR right now
Quote
well, changing the few reflectance maps that already exist would be a matter of minutes
Yeah. No.

Unless you are willing to go change all 95 reflect maps that I made for WoD for me

just for the record: i would

as for the rest: for mostly grey metal ships the artifats are massive, and only in this one type of map, because of the 4 channels being actively used

furthermore i can not for the love of god believe that it should not make a difference in the memory usage which method the maps are compressed with
if that kind of change in the code would be anything but minor, it would massively surprise me - the complexity is in the rendering, not which channel gets loaded where

my opinion stays unchanged, a substantial potential for optimisation is wasted here, and the negative consequences would be extremely minor
« Last Edit: September 28, 2016, 02:30:09 am by fightermedic »
>>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

 
Re: Distribution of color information sub-optimal for PBR right now
Freespace has quite a few grey metallic ships - most of the Terran fleets in particular, with the Colossus, Orion and Hecate being the main exceptions to the rule.  If the compression artefacts are objectionable on those, that's a Problem which needs to be Solved.

Moving the roughness channel away from the colour channels seems like a logical thing to do in my book - and if 95+ ships need some texture rework done as a result, that's better than having ten times that number need it later, when someone finally decides enough is enough, by which time half the original, uncompressed texture files have been lost to bitrot.

The suggestion of putting it in with the AO channels is as good as any, especially if the resulting artefacts are not objectionable.  Are both maps using the same texture coordinates and resolution already?  I tend to agree that moving channels around isn't too difficult from a programming point of view, but I'll defer to Swifty (if he weighs in on the discussion), since he knows the code better.  It might be feasible to detect how many channels are defined in a texture, and distinguish the two cases that way - that would avoid the rework, but might increase the number of shaders in flight, which would be bad.

I have to ask, why was putting normals in green and alpha done in the first place?  It's definitely better to not do that.

 

Offline DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
Moving the roughness away from the reflectance maps alpha channel isn't going to help. From what I remember during discussion and research, DDS artifacts are due to the compression algorithm itself acting on 4x4 squares in the image in addition to sometimes dropping information from the red and blue channels during compression. The part about the information drop is probably why we chose to use the green alpha normals. Sometimes the algorithm goes awry, resulting in strangely colored areas on the texture or black/white lines around the regions of uniform color.
<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 Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Distribution of color information sub-optimal for PBR right now
Holy poo poo the recent nightlies have done something naughty with the pbr because everything is turbo black. This turned out to be a fortunate thing in this case actually, cause I can more easily show the artifacts.


This is with the normal map you put in the release


This is with a normal I quick and dirty made

I actually wrote a lot of very mean words, but I'll be nice.

Okay, I lied, I'll say something quick and mean anyway.
A lot of what you wrote in this thread is poo poo, and I think the fault lies with the user, ergo your maps. You are frustrated and are trying to blame it on code and stuff, looking stupid in the progress. Look, I understand. I've absolutely been there. The artifacting on normal maps actually ruined a whole day for me before I figured it out with the help of Dahblount. If there are artifacts on the reflect map, its user error. If there are artifacts on the normal maps, it's probably user error too. I found out that if you don't make the normals in a pretty specific way, it becomes ugly like in the first pic.

and if 95+ ships need some texture rework done as a result, that's bet-
No. Bugger off.

Okay, got that off my chest.

When I was first trying out reflect maps, I had this little issue

Turns out that was completely my fault for not painting inside the uv islands properly. The levi's reflect map is uh, well. I'd use 'dirty' as word to describe it.
A reflect map just has to be a simple "this is gloss, this is matte" map really.
like:

It minimizes the odds of light reflecting in weird ways.

Meanwhile the levi's map looks like:

And with the uvunwarp overlayed on it, it didn't exactly look like everything was painted nice and cleanly inside the island. THEN AGAIN, I have no idea where on the ship those islands actually are. So that very well might not matter at all.

But I don't actually think the reflect map is the issue. It's the normal.

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

 

Offline Kobrar44

  • On Suspended Sentence
  • 29
  • Let me tilerape it for you!
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
The specific textures/channels are sampled in the shaders, so if you need to rearrange the channels to meet your needs you can have your own version of shaders distributed with your mod. That said, you probably don't have such needs.
Oh guys, use that [ url ][ img ][ /img ][ /url ] :/

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Distribution of color information sub-optimal for PBR right now
The specific textures/channels are sampled in the shaders, so if you need to rearrange the channels to meet your needs you can have your own version of shaders distributed with your mod. That said, you probably don't have such needs.

Woah woah woah. Hold on there, buddy... before we suddenly get model releases that only work on specific shader sets. That is -not- intuitive for modders, especially new modders, to just grab a bunch of ships and plop them in their mod. Suddenly we'd have to match up shader sets or start rearranging texture channels to get things to be compatible with one another.
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 DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
Yeah, custom shaders are at best used for debugging possible issues and testing new additions imho.
<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 m!m

  • 211
Re: Distribution of color information sub-optimal for PBR right now
Custom shaders are only there for testing purposes and are not officially supported by the SCP. We frequently change the code that uses the shaders so it's very likely that a custom shader will be broken at some point.

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Distribution of color information sub-optimal for PBR right now

Okay, I lied, I'll say something quick and mean anyway.
A lot of what you wrote in this thread is poo poo, and I think the fault lies with the user, ergo your maps. You are frustrated and are trying to blame it on code and stuff, looking stupid in the progress. Look, I understand. I've absolutely been there. The artifacting on normal maps actually ruined a whole day for me before I figured it out with the help of Dahblount. If there are artifacts on the reflect map, its user error. If there are artifacts on the normal maps, it's probably user error too. I found out that if you don't make the normals in a pretty specific way, it becomes ugly like in the first pic.


1) the problem are compression artifacts in areas with grey color in the reflection maps, because of violet or green spots - the roughness part of the map is fine, the artifacts are there too, but they almost never matter, since they are a lot less visible
2) if you compress the same map without the alpha channel, those artifacts are drastically less, because the information of one less chanel has to be considered
3) this problem also existed exactly in the same way with the old shine maps, we just have the chance to correct it now that we are switching rendering anyway

THIS is what i am talking about, and the reason is the setup of the map, and nothing else


it is ugly, and it's going to be there on every grey metal area on every ship, and a lot more visible than in the days of yore with the shine maps, as now almost ALL the color information for those areas comes from the map with the most artifacts - plain and simple  :shaking:

normal maps in the current PBR builds are perfectly fine result wise, the compression is just wasting a lot of memory without any reason to right now

i can not understand where all this furor is coming from, to fight against something that would lead to more efficient memory use, AND better results at the same time
« Last Edit: October 05, 2016, 06:42:41 am by fightermedic »
>>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 DahBlount

  • Moderator
  • 29
  • Alpine ☆ Cancer Tribulation
    • Minecraft
    • Skype
    • Steam
Re: Distribution of color information sub-optimal for PBR right now
That? That's not part of the reflectance map actually, that's from the diffuse map. Take a close look at your reflectnace map again at a very high zoom and you will find that those aren't present. In fact, the two maps with the biggest artifact issues in your Leviathan release are the diffuse and normal map. The reflectance map actually looks ok.

i can not understand where all this furor is coming from, to fight against something that would lead to more efficient memory use, AND better results at the same time
Maybe it's because what you're suggesting goes against SCP coding conventions and your assumptions about the issue are wrong?
<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 m!m

  • 211
Re: Distribution of color information sub-optimal for PBR right now
[...] goes against SCP coding conventions [...]
We only guarantee backwards compatibility for official releases, not nightly builds. Since PBR is not present in an official release it can still be changed. We usually don't do it since it may invalidate the work of someone (which is the case here) but if there are good technical reasons for changing something then now is the best time to do so. However, I am not suggesting that we actually change the way PBR currently works since I don't know enough about it to make such a statement.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Distribution of color information sub-optimal for PBR right now
I would be against such a change. In the end, if the issue is one of texture compression, artists are always free to distribute uncompressed textures (which is something I would encourage regardless to make sure that if someone wishes to alter a texture, they can start with the highest quality possible); The way I see it, it's the job of whoever assembles a modpack to make sure that whatever collection of assets is chosen stays within reasonable ressource use limits. It is the integrators who have to make the final decision on such issues, not the artists.
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 fightermedic

  • 29
  • quite a nice guy, no really, i am
Re: Distribution of color information sub-optimal for PBR right now
That? That's not part of the reflectance map actually, that's from the diffuse map. Take a close look at your reflectnace map again at a very high zoom and you will find that those aren't present. In fact, the two maps with the biggest artifact issues in your Leviathan release are the diffuse and normal map. The reflectance map actually looks ok.

i have tested it with an uncompressed diffuse, and it looks exactly the same, the compression errors are in the reflection map, that much at least is for sure
it wouldn't have made sense anyway if that had been the diffuse
>>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 Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Distribution of color information sub-optimal for PBR right now
[...] goes against SCP coding conventions [...]
We only guarantee backwards compatibility for official releases, not nightly builds. Since PBR is not present in an official release it can still be changed. We usually don't do it since it may invalidate the work of someone (which is the case here) but if there are good technical reasons for changing something then now is the best time to do so. However, I am not suggesting that we actually change the way PBR currently works since I don't know enough about it to make such a statement.
PBR has been available for testing a long long time before it came to nightlies. If there was a good technical reason for changing something, it was before Swifty finalized most of the PRB code and put it into trunk. Now we've got several people who already made maps in the not unreasonable assumption that their efforts aren't suddenly annulled.

I would be against such a change. In the end, if the issue is one of texture compression, artists are always free to distribute uncompressed textures (which is something I would encourage regardless to make sure that if someone wishes to alter a texture, they can start with the highest quality possible); The way I see it, it's the job of whoever assembles a modpack to make sure that whatever collection of assets is chosen stays within reasonable ressource use limits. It is the integrators who have to make the final decision on such issues, not the artists.
Agreed.
DXT is going to have compression artifacts no matter what channel you swap stuff to. Its the nature of the beast.

Then again, my ships don't have these ugly artifacts to begin with. So hey ¯\_(ツ)_/¯
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

 

Offline Oddgrim

  • 29
  • I like building stuff.
    • Art Thumblr
Re: Distribution of color information sub-optimal for PBR right now
Those artifacts very defiantly looks like a conversion error happened when going from psd to dds.( In my own humble opinon) I would reinstall gxf drivers and plugins used, that would usally fix the issue for me when that happened to me. Hopefully the problem would go away then.
[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