Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Scooby_Doo on December 05, 2017, 03:34:26 am
-
Since I've been out of the loop for sometime now, what texture -blahblahblah do we now have?
I know about normal, glow and the old spec. Roughness aka -reflect is basically an inverse of glossy (or in Painter it is roughness). I've heard about -ao. Is -unlit basically -albedo?
Also what are the dds formats for these? The nvidia tool seems to be broken with photoshop CC and the intel version is a bit confusing. I can't seem to get the extra textures to display correctly.
-
Albedo is the diffuse texture without any AO baked into it, -ao is a baked map with a curviture map into the red alpha layer. -Reflect is the specular map with the glossy in the alpha layer. And the normal is the regular setup, teh wiki page for the PBR conversion process is kinda borked at the moment.
As for .dds conversion I have been using the intel photoshop plugin https://software.intel.com/en-us/articles/intel-texture-works-plugin (https://software.intel.com/en-us/articles/intel-texture-works-plugin) it has worked faily well for me so far. c:
-
I must be doing something wrong then. If I use the asteriod -reflect texture (renamed as ship-texture) it works, but if I use my own texture it doesn't do anything.
Is your -reflect map originally greyscale? I'm exporting via texture works as texture type:color, compression:BC1, autogen mipmap
-
I must be doing something wrong then. If I use the asteriod -reflect texture (renamed as ship-texture) it works, but if I use my own texture it doesn't do anything.
Is your -reflect map originally greyscale? I'm exporting via texture works as texture type:color, compression:BC1, autogen mipmap
You'll need to include the alpha layer as well in the -reflect map (glossy) to make it work.
-
I must be doing something wrong then. If I use the asteriod -reflect texture (renamed as ship-texture) it works, but if I use my own texture it doesn't do anything.
Is your -reflect map originally greyscale? I'm exporting via texture works as texture type:color, compression:BC1, autogen mipmap
You'll need to include the alpha layer as well in the -reflect map (glossy) to make it work.
Ahh ha! That was it, don't think I would have figured that one out in a million years. Looks like I'm going to be writing some small Substance Designer materials to autofix that.
-
To make things a little easier, you can set up export configurations in Substance Painter to align to how FreeSpace will expect textures. Make sure your project is set to Specular/Glossiness and then throw the below preset into your "...Documents\Allegorithmic\Substance Painter\shelf\export-presets" folder.
It handles everything, including the setup for the normal map channels so you just need to convert straight to DXT1 or DXT5.
EDIT: See later post for updated presets
-
To make things a little easier, you can set up export configurations in Substance Painter to align to how FreeSpace will expect textures. Make sure your project is set to Specular/Glossiness and then throw the below preset into your "...Documents\Allegorithmic\Substance Painter\shelf\export-presets" folder.
It handles everything, including the setup for the normal map channels so you just need to convert straight to DXT1 or DXT5.
I don't see how to set the spec/gloss in Painter. I know how to do it in Designer though. I can however create additional spec/gloss channels in Painter.
BTW that script gave me some weird results, perhaps how we set things up differently. Yours uses diffuse, while mine uses base for the albido. And the "converted maps" normal opengl produces no results. However replacing it with the regular normal worked (or at least it seemed, could be flipped). Also I'm kinda confused with the reflective export. According to the exporter you're using the Specular as RGB and Glossiness as alpha, but when I import it into photoshop alpha is missing.
Ok a little more success, but I have one thing bugging me right now, the lack of real metal. Worn nikked edges have a whitish appearance rather than the steel/alum/nickel appearance. What am I missing?
-
Not sure if this would help but, heres a quick and dirty tutorial about PBR gloss/spec maps. Might be useful for understanding those two better. https://forums.unrealengine.com/community/community-content-tools-and-tutorials/23244-pbr-tutorial-series?52529-PBR-Tutorial-Series=&highlight=PBR+tutorial (https://forums.unrealengine.com/community/community-content-tools-and-tutorials/23244-pbr-tutorial-series?52529-PBR-Tutorial-Series=&highlight=PBR+tutorial)
-
If you've started out in Metal/Roughness and you switch to the Specular/Glossiness shader you'll need to go to TextureSet settings and add the maps typically associated with the Specular/Glossiness workflow (diffuse, specular, glossiness), otherwise you'll just be getting that white material because it's now just not using the old metal and roughness maps. All of the default materials should be set up for either way, but user made materials might just be for Metal/Rough since that's what things like UE4 and Unity use.
I'm not sure what's up with the normal map. OpenGL and DirectX use very slightly different normal maps (or expect the data in a different way) and since FSO uses OpenGL, that's why it refers to the converted OpenGL normal map.
Also are you exporting to png? Photoshop sees transparency and alpha as two completely different things. If you're not seeing an alpha channel, export your maps to TGA then convert to DDS.
-
-unlit doesnt exist anymore fyi. Just put the albedo as your diffuse, reminder that Albedo should have no lighting information either.
-
If you've started out in Metal/Roughness and you switch to the Specular/Glossiness shader you'll need to go to TextureSet settings and add the maps typically associated with the Specular/Glossiness workflow (diffuse, specular, glossiness), otherwise you'll just be getting that white material because it's now just not using the old metal and roughness maps. All of the default materials should be set up for either way, but user made materials might just be for Metal/Rough since that's what things like UE4 and Unity use.
I'm not sure what's up with the normal map. OpenGL and DirectX use very slightly different normal maps (or expect the data in a different way) and since FSO uses OpenGL, that's why it refers to the converted OpenGL normal map.
Also are you exporting to png? Photoshop sees transparency and alpha as two completely different things. If you're not seeing an alpha channel, export your maps to TGA then convert to DDS.
Yup I just added those two maps to the list. BTW back when I was working with unreal I actually had a several extra maps (User1, user2....) for extra information like paint color, toggling scratches...etc.
And as for the png, that would explain why I don't see the alpha channel.
-
I basicly wanted to ask the same question as Scooby, as another Painter user but due to lack of time for establishing proper Painter -> FSO workflow, well... I guess it's about time to join the discussion.
Normalmaps from Painter are inverted by default in FSO, as they are in DirectX normalmap format. Export them with no alpha, disassemble on separate red, green and blue channels, than invert green and blue. Set red as alpha, and assemble normal again. As for DDS formats, everything with alpha is DXT5 and without alpha is DXT1. I'm not sure if FSO handles any mipmapping.
Additional maps like team colors may be handled by -misc by FSO engine.
Is there any easy way to convert metal/rough to spec/gloss? DahBlount was explaining me this on discord channel, but I was tired as hell and now I remember nothing o___O.
-
There's a metalness to specular conversion tutorial here.
https://www.marmoset.co/posts/pbr-texture-conversion/#metaltospec
The reason I discourage people from using metalness workflows is because they are inferior to specular workflows when it comes to sampling. The metalness texture has issues at material transitions that can only be fixed using a selective filter that smooths and dithers the edges or you get aliasing in the reflection. Specular materials do not have this issue as the metallicity is implicitly held in the magnitude of the specular color and the transitions between materials are thus smoother and dont affect the reflection.
-
Ahhhh I remember noticing that too. I just thought it was something I was doing wrong.
I also found the pbr-spec-gloss shader. That at least brings the metallic look back into Painter, however there's only a slight problem I see at least with Painter, a lot of the presets are based around metal (base color, metal).
-
Okay so Substance Painter has a method that can export Spec/Glossiness from a Metal/Roughness project. I've updated my presets, see if they work for you guys. You select "FS2 - MetalRough" if you started out in a Metal Rough template and "FS2 - SpecGloss" for Specular Gloss template.
EDIT: See later post for updated files
-
Okay so Substance Painter has a method that can export Spec/Glossiness from a Metal/Roughness project. I've updated my presets, see if they work for you guys. You select "FS2 - MetalRough" if you started out in a Metal Rough template and "FS2 - SpecGloss" for Specular Gloss template.
Well... I like woman. But this time I may say I love you :P
(http://oi67.tinypic.com/2hrjrcg.jpg)
and Painter
(https://cdn.discordapp.com/attachments/319576035626844162/389178192155377665/Przechwytywanie.JPG)
Pardon me crazy bloom settings. Anyway, it preserves all reflectivity of the surfaces well. I can confirm that this presets are working almost flawless. The only problem is lack of exported albedo/diffuse so I needed to export it via different preset. This thing is great!
-
Oh right, I forgot that metal/rough uses base color not diffuse! You should use the converted diffuse if you haven't already. I've also updated my presets (now in a more permanent place)
Slightly updated files: https://sectorgame.com/fsfiles/repo/data/Axem/Other/SP_FreeSpace2_Presets3.rar
-
Oh right, I forgot that metal/rough uses base color not diffuse! You should use the converted diffuse if you haven't already. I've also updated my presets (now in a more permanent place)
Slightly updated files: https://sectorgame.com/fsfiles/repo/data/Axem/Other/SP_FreeSpace2_Presets3.rar
I used basecolor from standard metalness preset, but albedo and basecolor are the same in both metal/rough and spec/gloss workflows. Basicly diffuse too, but it used to contain some additional reflectivity information if used inappropriately.
Thanks for updated presets!
-
:bump:
I'm reconverting the Schrodinger for proper -reflect format and I've noticed that albedo from this presets is incredibly dark:
(http://oi64.tinypic.com/2wdyqeg.jpg)
Is this intended? Comparing to my previous exported textures, this results will be deffinitly darker ingame than desired result.
-
I really don't know... Would it be possible to get a hold of the project file?
-
Shure (http://www.mediafire.com/file/f8halpdeq8cowta/schrodinger_source.rar)
I used some custom alphas here and I have no idea if they are contained in .spp. I will provide them too if necessary.
Also I tried to reproduce this issue with recent request for Scroll, and albedo maps were darker too. Both in PS and ingame. Manual adjusting was required.
-
In Metal/Rough, there's just 1 texture for color information (the base color/albedo), and the metalness map (the roughness map) determines in effect, how the lighting will behave. In Spec/Glossy there's two, one for diffuse lighting (stuff that isn't shiny) and one for specular lighting (stuff that is shiny). If you look at your -reflect map, you'll see how its very similar to your base color map.
Look at the image below and you can see how the maps differ between the two workflows. The base color map has the colors you expect, but the diffuse map has none of the shiny blue color info, and likewise, the specular map has none of the dull dirt color info.
(https://i.imgur.com/xcGxaZt.jpg)
So on our typically shiny spaceships, the diffuse map may seem darker, but both diffuse and specular would be working together to make it look right.
When you put the textures in game, do you find the ship is noticably darker? Do you have any side by side pictures from your older exports to using my presets?
EDIT: Actually no matter what you'll probably find it brighter because no matter what, diffuse is going to be different from your original exports. If you're comparing images from SP to FreeSpace, don't do it in the F3 lab since F3 lighting is apparently different than a normal mission.
(Note I'm not a graphics wizard, but I did read a web article or two)
-
I'm not a PBR master, but my results were indeed darker ingame. I recently converted object with gray, dusty areas and they are basicly black ingame. Both in F3 lab and in mission. Also no other presets produce that darkened albedo maps.
I will do some more testing next monday. I need to check this the issue on other models.
-
I've been using decal layers and I've noticed the opposite, things are much brighter in the F3 viewer than in Painter. Probably something I'm doing wrong...
-
Ok another weird question.... Bump maps are -height right? For some weird reason they're not showing up at all.
-
The shaders dont currently support bumpmapping but it can be added if there is demand for it.
-
Bumpmapping is the same thing as normal mapping so the shaders definitely do support it. I think you need to use textures that end in -normal.
-
I guess he messed bumpmapping with heightmapping. Yeah, height would be welcome. I requested it once, but I guess I am the only one who wants to use it.
As for presets, I made some testing with new model:
(http://oi67.tinypic.com/10mimo3.jpg)
In-mission result is similar. A little brighter but still. Current presets basicly darkened all my grays. They are almost black now. White and other colors stays the same.
-
Ah ok... so I wasn't doing something wrong. I'll have to see if I can combine them in Designer/Painter. Some of the other engines support having both of them.
Or at least strengthen the normals, they appear way too weak/light.
-
Height and normal are often cooperating. Normal is responsible for proper reflection of light, while height is setting depth of reflections and details at all. Unity and [AFAIK] Unreal both have customizable "height depth" factor. Other advanced engines are likely to have them too. It's hard to strenghten already painted normals in SP, so you can use your height, stranghten it 2-3 times and generate new normalmap from it in PS.
-
Height and normal are often cooperating. Normal is responsible for proper reflection of light, while height is setting depth of reflections and details at all. Unity and [AFAIK] Unreal both have customizable "height depth" factor. Other advanced engines are likely to have them too. It's hard to strenghten already painted normals in SP, so you can use your height, stranghten it 2-3 times and generate new normalmap from it in PS.
In Designer you can use the height to normal map converter, it has a an Intensity setting for strengthening the output. I'ts not great, but it does help. And yes unreal let's you use both, hence my issue right now.
-
Quick question, I've setup a quick little normal + bump map combiner in Designer. Now which of the RGBA channels get swapped? I've been ages since I've had to deal with that.
-
Red goes to Alpha, Green stays the same, Red and Blue then get cleared.
-
Thanks, that's weird.. don't remember alpha being part of it. Maybe WC Saga used different shaders.
-
Actually I think I'm having similar issues that Nyctaeus had. Materials like pure silver, titanium etc are showing up as shiny black. Probably because the diffuse is set to black. I think the lack of good environment maps is hurting it, plus while it might be correct, it certainly doesn't look it.
I'm going to try the metal to spec converter and see if I can get better results.
Edit: no go, same results. I must be doing something wrong. I can't seem to get a silver-ish looking material that isn't a mirror.
-
That's because metals have very little to no diffuse influence, they (mostly) just have specular information. You need to convert your metalness texture set to specular or it won't work with FSO. Also, the F3 lab is not well suited to examining ships at the moment as the pure black background and skybox associated with it are in no way like a mission in FSO. The_E is currently working on an upgrade that allows the F3 Lab to load mission environments that will hopefully get merged soon.
Also, you need to copy your Roughness texture to the alpha of the -reflect map and invert it.
-
Ya I was thinking the lack of environment was causing the problems. Hence all you're seeing is the black background and not the actually silverish,grey tint that you normally see with metals.
Ahhh ha! There's a couple of environment maps (specifically studio_03) [a series of 4 small suns dots] that produces similar effects to the F3 viewer.
Double Edit: There is an environment entry in FRED, but when I try putting anything in there, it just crashes. Is this what needs to be set and how?
-
I was actually referring to Axem's Substance Painter presets. This is converting metal/rough to spec/gloss with excellent effect, but all color information of grays on basecolor/albedo is lost in conversion process [these are just black]. It is not F3 Lab issue as I made tests in both F3 Lab and in mission with custom background and lighting. Lack of environment is not problem here. Ingame result is just "shiny black"
Everything is fine if I combine -reflect [and other submaps] from Axem's presets with basecolor from standard SP exporter.
-
Awww ok. So let me get this correct. If I want a metallic silverish surface, diffuse must be black and without a proper environment map it'll appear shiny black ingame? If that's case at least I know I'm not doing something wrong then.
BTW how would you do a dull non reflective metal, best example I can think of off hand would be a stop sign pole. It's galvanized and has a slight blueish tone to it (probably from the sky).
-
Awww ok. So let me get this correct. If I want a metallic silverish surface, diffuse must be black and without a proper environment map it'll appear shiny black ingame? If that's case at least I know I'm not doing something wrong then.
BTW how would you do a dull non reflective metal, best example I can think of off hand would be a stop sign pole. It's galvanized and has a slight blueish tone to it (probably from the sky).
Yes. You are right. After some long [and probably exhausting for them, due to my retardness xD] Discord talk with Axem and DahBlount, the issue is actually not lack of environment itself, but lack of enviromnent lightning. I admit I was wrong. Presets are fully okay.
Still we need to find to compensate it somehow until we get proper implementation of enviro lightning.
-
Thank you, I can now resume my work.
-
Talked with Swifty over Discord today about more advanced environment lighting. Might be a future project at least.
-
So I guess it's the same problem as pale black HTL Leviathan, but with dusts and painting it's not that noticable on Anteros.
I will make more testing with GGX lighting model, but still I guess I shall wait with updating my models until proper environment lighting is implemented. As majority of models used by community are non-PBR textured, differences are and will be quite noticable.
-
Off topic questions, but might as well keep it nice and tidy in one place.
First how are player turrets handled now? Do they still only lock onto whatever you've got targeted or have they gotten smarter?
Second how are fighter beam weapons handle now? Can you treat them as basic fighter weapons or do they still need to be scripted?
-
Off topic questions, but might as well keep it nice and tidy in one place.
First how are player turrets handled now? Do they still only lock onto whatever you've got targeted or have they gotten smarter?
Second how are fighter beam weapons handle now? Can you treat them as basic fighter weapons or do they still need to be scripted?
Fighter beam weapons works perfectly fine from a long time. You may find a working examples in Tides of Darkness or Dawn of Sol. Also in Exile modpack [thus unused].
-
Good to hear, last I remember hearing it required scripting or something of that nature.
Also have you ran into any problems with transparency? I'm getting strange holes in the map. It looks like a geometry issue, but isn't. And I don't see anything wrong with the opacity map. If I disable the diffuse map via render options, the issue goes away. And if I remove the opacity settings it won't appear either. So it seems to be coming from the texture map.
(https://i.imgur.com/2RDEJL6.jpg)
-
Make sure your texture has "-trans" addon in filename. Some time ago code of transparent textures was reworked, and now to tell the engine which texture is transparent, you must include "-trans" in filename. For example, default cockpit glass texture in old MediaVPs was just "glass", and now it's "glass-trans". Unlike -glow, -normal or other additional texture channels, filenames with "-trans" works as diffuse map itself so "glass-trans" does not require just "glass" to work. This may be confusing.
If I remember correctly, you used to include glass texture in your combined textures which contans various details [confed_details_1 and 2]. Now if you include any transparent element with non-transparent ones like you did before, this glass won't be displayed correctly. If you add "-trans" to filename of such texture, rest of elements is also likely to appear transparent ingame.
-
Ah good to know... what's weird was I was using just the alpha map for transparencies and it was mostly working, perhaps a left-over remnant of the old coding.
-
Next question!
Let's assume you're having a pulsating glowing texture. You will need the animated diffuse texture and the animated glow/emissive texture correct? Any gotcha's I need to worry about with APNG file formats?
-
apng is not ideal for ship textures because the image data has to be sent to the graphics card uncompressed. An EFF with DDS frames is a better choice because DDS images can be sent to the GPU compressed and that saves memory. i.e. it's a performance thing
Sorry, I have no idea about your other questions :)
-
And it appears I can make the EFF files easier than the APNGs. So there's that too.
-
Yo PBR power users, there were recent changes to PBR in the engine (all thanks to uber power coder Swifty). It now uses the GGX lighting model, (https://www.hard-light.net/forums/index.php?topic=94257.0) specular lighting is now properly gamma corrected, (https://github.com/scp-fs2open/fs2open.github.com/pull/1576) and less glossy things now blur the env map. (https://github.com/scp-fs2open/fs2open.github.com/pull/1578) So take a nightly for a spin and give feedback to how things look. Better? Worse? Some of these things do help non-PBR assets as well, so take a look at a lot of things!
-
(http://oi68.tinypic.com/8vrg5k.jpg)
Judge yourself :]
I finally found a moment to play with new builds. I guess it's about time to reconvert all of my PBR models to proper PBR color profiles. Thank you, guys! New builds are insanely good!
-
Which build do you use? There were several recent ones with bug reports and the warning "at least one of the builts has failed".
-
The most recent one downloaded 10 minutes ago.