Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Hi community o/

First of all, apologies if this has been talked before. I found useful information in some old threads, but there are some big changes from dos1.

Old reference, but still useful to understand how nodes works (thanks Norbyte); http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=545431

Now I'm trying to learn the workflow/pipeline Larian used for dos2. If any technical artist from Larian or the community is reading this, plz tell me if I'm correct with the naming of the textures/maps.

Exploring the material editor I found they are using now a PBR rough/metallic workflow. This is what I found for now;

BM = Basecolor map (Albedo)

BMA = Basecolor Map + Alpha

NM = Normal map

PM = Physical map (this texture contains different maps for PBR represensation);

* Red channel = Metal Mask (metalness workflow)
* Green channel = Roughness (microsurface)
* Blue channel = Cavinity/AO? not confirmed yet.

GM = Glow map (confirmed)


If there is anyone else working on this, we could try to keep all the information together on the forums or keep the wiki updated.

/wave
ISVRaDa

Last edited by Rada Torment; 17/09/17 11:38 PM.
Joined: Sep 2017
R
stranger
Offline
stranger
R
Joined: Sep 2017
I'm very interested in understanding this as well. Usually with PBR based texturing you have a diffuse, normal, metalness or specular and ao maps. But as you mentioned they are using PM which seems to be several maps combined which makes it very hard to understand and replicate without more knowledge. I also have trouble just saving a new material, and if we could get some info about what type of dds settings they use would also help to create textures.

Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
I believe PM stands for "Physical Map", i.e. a texture for all PBR parameters.
The R,G,B channels might be MetalMask, Roughness and Reflectance.
(Speculation based on the shader code in Shaders\DX11\PBR.shdh)

Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Weird to see they are not using a separate texture for AO. The post-process AO works well but most of the times you need a texture for micro-occlusion for small cracks. Some games combines the ao mask with the diffuse map but I really don't like this method (you save memory space but it's not good for PBR workflow).

@Norbyte if you want update the thread for DOS2 standards I'm willing to help if needed.

I'll continue checking things. Thanks for posting guys!

Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
Originally Posted by Rada Torment
Weird to see they are not using a separate texture for AO. The post-process AO works well but most of the times you need a texture for micro-occlusion for small cracks. Some games combines the ao mask with the diffuse map but I really don't like this method (you save memory space but it's not good for PBR workflow).


Apparently they're using this algorithm for AO:
http://research.nvidia.com/sites/de...able-Ambient-Obscurance/McGuire12SAO.pdf
It doesn't use any additional texture inputs, so that's probably why there is no AO texture.


Originally Posted by Rada Torment
@Norbyte if you want update the thread for DOS2 standards I'm willing to help if needed.

It should probably go in a new thread (or the wiki), as the old one is for D:OS which uses a different rendering pipeline. Not sure when I'll have time to set it up though.
I'd say that the UE4 reference could be a good starting point: https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/
Their material editor is similar to the D:OS 2 one, and the docs explain the concepts quite well.

Joined: Sep 2017
R
stranger
Offline
stranger
R
Joined: Sep 2017
I use Quixel for PBR texturing and they have a UE4 RMA packed export setting, I'm gonna test and see if it works.

Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
I would recommend these links for PBR documentation;

https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/

https://www.allegorithmic.com/pbr-guide




Originally Posted by Norbyte
Originally Posted by Rada Torment
Weird to see they are not using a separate texture for AO. The post-process AO works well but most of the times you need a texture for micro-occlusion for small cracks. Some games combines the ao mask with the diffuse map but I really don't like this method (you save memory space but it's not good for PBR workflow).


Apparently they're using this algorithm for AO:
http://research.nvidia.com/sites/de...able-Ambient-Obscurance/McGuire12SAO.pdf
It doesn't use any additional texture inputs, so that's probably why there is no AO texture.


That's similar to others SSAO techniques, but with some differences. But my doubt comes because the blue channel map looks like a Cavity map (reflectance discarded. Reflectance can be controlled, usually not needed, by a constant value, default 0.5).

These days modern AO texture is more of a cavity map. Using SSAO the large AO is taken care of and you just need to worry about the smaller scale stuff in the cavities and such. What I'm trying to figure out is how they are using this map. Is most of the materials I'm exploring the blue channel is not being used.


Originally Posted by RektyRektford
I use Quixel for PBR texturing and they have a UE4 RMA packed export setting, I'm gonna test and see if it works.


Quixel is good too. I use Substance Painter/Designer usually, and PS if I need do something simple or hand painted.

Last edited by Rada Torment; 18/09/17 12:24 AM.
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
I just got the details from one of our technical artists. I'll format it later for the wiki, but here it is already:
Quote

BM is indeed base colour/albedo
NM is our normal maps and we move our red channel to the alpha so rather than RGB we have XGBR this is to circumvent some compression details (red tends to get the least of the bytes)
PM is also indeed 3 combined grey scale maps with an optional alpha


R= Metal Mask
G = Roughness
B = Ambient Occlusion (actually unused we never got a AO slot in our shader model)
A= Optional reflectance value used for glass and unusual materials like some of the Eternal stuff

there are also 4 types of masks depending on their use
MSK1 MSK2 MSK MSKA

the number indicates number of available channels in the masks and considers 3 as a default in the naming

most FX maps are single channel with some occasional exceptions if colouring via the effect tool isn't sufficient

We use Block Compression
BC1 for RGB
BC3 for our normal maps and RGBA maps

BC4 for Single channel maps (R)
BC5 for double channel maps (RB)

Last edited by Tinkerer; 18/09/17 03:10 PM.
Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Originally Posted by Tinkerer
I just got the details from one of our technical artists. I'll format it later for the wiki, but here it is already:
Quote

BM is indeed base colour/albedo
NM is our normal maps and we move our red channel to the alpha so rather than RGB we have XGBR this is to circumvent some compression details (red tends to get the least of the bytes)
PM is also indeed 3 combined grey scale maps with an optional alpha


R= Metal Mask
G = Roughness
B = Ambient Occlusion (actually unused we never got a AO slot in our shader model)
A= Optional reflectance value used for glass and unusual materials like some of the Eternal stuff

there are also 4 types of masks depending on their use
MSK1 MSK2 MSK MSKA

the number indicates number of available channels in the masks and considers 3 as a default in the naming

most FX maps are single channel with some occasional exceptions if colouring via the effect tool isn't sufficient

We use Block Compression
BC1 for RGB
BC3 for our normal maps and RGBA maps

BC4 for Single channel maps (R)
BC5 for double channel maps (RB)


Ok, I was right about the blue channel but not having a shader supporting AO texture was unexpected. Maybe they created this map for another purpose, but it's not common to include this one in the final texture if you won't use it.

Thank you so much @Tinkerer for asking, really appreciated.

Last edited by Rada Torment; 18/09/17 10:14 PM.
Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
Hello there. Looks like this is the place of people messing around to geek out.

Back in the days (10 years ago) i was re-texturing a lot for NWN2. (Armors, Weapons, shields, placeables) My workflow was mainly Photoshop, text editor and later custom content community tools (mdb cloner), but most of the time without any 3D Editor. Now I try to understand the workflow for D:OS. I was reading partly the old reference from Norbyte, but would like to ask in my words HOWTO do this. (so maybe i get some answer, that is more easily understandable for me)

Description of NWN2 re-texturing workflow to understand where I come from:

There is

  • a mesh file (.mdb for NWN)
  • A diffuse map (main texture)
  • a normal map (i was generating from greyscale heightmas a lot of normal maps with that NVIDIA plugin for PS with good results)
  • a tint map (what is called MSK here. a texture where each channel (RGB) is one slot for tinting / coloring the model.

To bring it into the game (without overriding) you had to copy the mesh file and change inside this one via text editor (or "mdb cloner") the associated textures.

As far as I remember the game recognized the new content by a naming concention (like: F_HUMAN_CHAINMAIL_##)


MY QUESTIONS to understand the D:OS workflow:
  • As far as i get it, D:OS handles the association of textures and mesh models via material editor (RIGHT?)
    Here are my attempts with the material editor so far:
  • How do I add a tintmap / MSK to a model which doesnt have one yet?
  • How, once a got a new texture, i do include / pak it into a mod without overriding anything?
  • I messed with some BM-Texture and although I couldn't see any Alpha channel included, i obviously messed with the alpha as some body parts were invisible
    hardly visible because of lack of colors (WHY in this case just cycling few colors instead of all 35?), but the red margin i included by adding some blue in the MSK!
    [img:left]https://www.dropbox.com/s/1gg2vjb0u4prd4f/retexture01.png?dl=0[/img]
  • How do i have to OPEN / SAVE the .dds in Photoshop (DXT1, DXT5, etc...)

I would like to do a tutorial / Howto but still lacking the understanding of an efficent clean workflow for D:OS. Any help. How to make easy retextures of the BM map and tint map to make a start
Any answers for my questions?

Last edited by morez; 19/09/17 02:44 AM.
Joined: Sep 2017
Location: Belgium, Ghent
addict
Offline
addict
Joined: Sep 2017
Location: Belgium, Ghent
Hmm I enjoyed reading this smile
Been a while since I worked on the PBR system, refreshing my memory on it was a fun exercise!

@Norbyte
You'd still need data to cover AO. Specifically AO on a microscopic scale such as cracks in stone or tree bark.

@Rada Torment,
Good links and decomposition of the textures. If anyone wants more in-depth knowledge on PBR systems I would also suggest looking at Frostbite's notes and several short Unreal papers on PBR lighting. Not for the faint of heart, though smile

You're right that macro-occlusions are handled by the SSAO techniques.
Specular micro-occlusions can be handled by a slight modification on the Fresnel coefficient in a PBR system. This leaves diffuse micro-occlusions. You're right that this is currently not used. We opted to put other data in our free GBuffer spots for gameplay related features. Also not a fan of putting diffuse micro AO in the texture itself, but for now that's how artists work if they truly want some specific AO adjustments, but generally it's not needed.

The free channel in Tinkerer's post is just labeled AO because it's empty and supposed to be used for that. Not now, then maybe later. Our engine keeps evolving from game to game, so looking to the future is often not a bad idea during development smile

Last edited by Larian_KVN; 19/09/17 09:55 AM.

CTRL+K the elf
Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Originally Posted by Larian_KVN
You're right that macro-occlusions are handled by the SSAO techniques.
Specular micro-occlusions can be handled by a slight modification on the Fresnel coefficient in a PBR system. This leaves diffuse micro-occlusions. You're right that this is currently not used. We opted to put other data in our free GBuffer spots for gameplay related features.


I had no idea about this :O there is always something new to learn and I love it smile

Thank you so much @Larian_KVN for coming here and talk about it. I'm excited to start working with my assets and see how they looks ingame.


Last edited by Rada Torment; 19/09/17 12:56 PM.
Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
Any updates on figuring out the workflow for texture/material creation? I've hit a bit of a snag trying to create a new staff weapon, which is just a simple elongated cylinder.

My model/texture in Blender:
[Linked Image]

The visual resource in game, with the material applied:
[Linked Image]
[Linked Image]

As you can see, there's some weirdness happening from point A to point B.

I'm missing the normal map / physical map, mainly because I don't know the steps required to create those. The normal map in particular seems a bit unnecessary for just a singularly red pole, so perhaps the physical map is what I need to get the texture to look right?

Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Hey LaughingLeader!

It's all a bit more.. complex than that smile. Did you created the staff? looks bit too heavy for that simple shape (252 triangles). Triangles optimization is important, even more vertices account nowadays. Once we have a good optimized mesh we need create our custom UVs, then start texturing, etc.

If I have time I would try to write a tutorial or something about the "art workflow" oriented to DOS2 (basically it works for lot of other games/engines). I'm gonna do some tests this week.

You can also contact me in Discord (Isvrada).


Last edited by Rada Torment; 24/09/17 05:06 AM.
Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
Originally Posted by Rada Torment
Did you created the staff? looks bit too heavy for that simple shape (252 triangles). Triangles optimization is important, even more vertices account nowadays.

Ah, good call. I wasn't worried about optimizing yet, since I've been trying to figure out how to make the material look correct.

I'm still not sure what's causing this weird discoloration. No textures applied:
[Linked Image]
With textures (base, normal, physical):
[Linked Image]

In-game there's this weird dark part on the staff:
[Linked Image][Linked Image][Linked Image]
The third image here is the high poly model. Still has a darker part of the pole, though less noticable.

Short screencapture when turning around

The fact that this dark part of the staff remains when turning off the textures leads me to think it's an issue either in the mesh or my settings when exported from Blender / the GR2 Converter tool.

Any ideas?

Joined: Sep 2017
Location: Finland
journeyman
Offline
journeyman
Joined: Sep 2017
Location: Finland
Uhm.. it's been a LONG TIME since I last even touched a 3D modeling program(don't even know if I can use 3DS Max 2012 for anything anymore). But I'm thinking some of the triangles are perhaps flipped the wrong way, giving that weird discoloration? I remember vividly of Max doing that to me on export, or even when doing certain actions in the program and always having to flip them back. It was never the whole mesh either, just a certain part.

Seeing as nearly one side if affected, you should check out that the faces are facing(lol) the right way.

Last edited by Rasikko; 24/09/17 03:23 PM.
Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Originally Posted by LaughingLeader
Originally Posted by Rada Torment
Did you created the staff? looks bit too heavy for that simple shape (252 triangles). Triangles optimization is important, even more vertices account nowadays.



Any ideas?


I see. Lets make a test. Whisper me in Discord and I'll export a mesh and see if my mesh has same issues ok? if not, then we will need to take a look deeper.

Last edited by Rada Torment; 24/09/17 03:26 PM.
Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
Originally Posted by Rasikko
But I'm thinking some of the triangles are perhaps flipped the wrong way, giving that weird discoloration? I remember vividly of Max doing that to me on export, or even when doing certain actions in the program and always having to flip them back. It was never the whole mesh either, just a certain part.

Seeing as nearly one side if affected, you should check out that the faces are facing(lol) the right way.

Good idea. I went ahead and re-made the cylinder. This mesh is as easy as can be - I just created a new cylinder in Blender and scaled it to fit the size of the original staff. Then I exported it to DAE, converted that GR2 with Norbyte's export tool, and checked it in the resource manager. Seems to have the same problem.

Blender vs. in the editor:
[Linked Image][Linked Image]


Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
Here's some comparison gifs of toggling the different textures for both the high poly version and normal:

Normal Mesh
High Poly Mesh

The textures definitely seem to hide the discoloration better on the high poly mesh, though it's still there, and is more easily visible when you move the camera around.

Joined: Jun 2017
apprentice
OP Offline
apprentice
Joined: Jun 2017
Managed to get my own mesh with smoothing groups working properly! laugh

Thanks to @Norbyte for all the talks we had about the topic and the support with gr2 converter.

[Linked Image]




Last edited by Rada Torment; 26/09/17 04:36 PM.
Page 1 of 2 1 2

Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5