Jump to content
3DCoat Forums

Normal maps as well as bump/height maps


Hastouki
 Share

Recommended Posts

  • Member

Hi, really hoping to get a conversation going here. Over the last few days I've been playing around with texture painting in 3DCoat and have hit a bit of a wall when dealing with PBR normal maps. This is odd considering normal maps are standard practice with PBR materials, especially when preparing assets for real-time rendering / game engines. I've reached out and discussed this with a number of people, including 3DCoat staff who consistently repeat to me the following:

  1. Normal maps are supported, select your normal map in the "Depth" field when making your smart material and it will convert it for you.
  2. Height/depth maps are "better" and I should be using those instead of normals.
    1. They are different things and both have their place. Especially when using heightmaps to displace geometry.
  3. Normal maps don't make sense when texture painting directly because of tiling or something?

I've put together a few screenshots of what my one of my paid PBR materials looks like when used in 3DCoat in a couple of ways, as well as what it looks like when used via Marmoset Toolbag 4 for reference. I can correctly use this PBR material using ArmorPaint, Substance and Marmoset and Quixel, all of which allow me to apply a normal texture along with albedo, rough, metal etc. You basically just create a fill layer and provide a normal map as part of the material you are filling the layer with. I had a response from support@3dcoat.com which basically told me to convert the map, when I asked for some more details I basically got silence/ignored. Is this something that the 3DCoat dev team is looking to add at some point? Is there an actual technical reason why you can't sample from normal maps when painting? I used the shader materials to bake in the normals prior to texturing but vertex painting those details is just not a solution.

 

3DCoat - Using PBR provided height map

No surface scratches, only general bump information. Scratches may be only slightly visible because they are present in albedo and roughness details.

image.thumb.png.943945885634a74748b8d6d85285a358.png

3DCoat - Using generated depth map from normal map source

This is just wrong, looks like a normal map I would have generated from a colour image or something in GIMP. Notice the weird warping artifacts around the plates where they connect, this is unusable.

image.thumb.png.4a75a59d928fd5e16cecd402d058bc77.png

 

 

Marmoset - No normals, No Depth/Bump (Just for reference)

 

image.thumb.png.9a1d2661e2ee6fa8a0df318ba096c640.png

 

Marmoset - Depth/Bump Only

Take a look at what details the texture artist captured in the height map, scratches are not accentuated in this map, just general material bumpiness. The scratches seen only because they are present in the albedo and roughness textures details.

image.thumb.png.751a2c7a8fa70db82e89590ce9c21f83.png

 

Marmoset - Normals Only

Scratches and other small details are accentuated in the normal map. These are completely different artistic details that are present in this PBR material that are to be replicated using lighting/normals rather than height/displacement or bump.

image.thumb.png.14e0cfb52194c788c666be07cd2fe73a.png

 

Marmoset - Height and Normals

image.thumb.png.66e016f75d46dc2327d9c98db0d5e1ce.png

Edited by Hastouki
  • Like 1
  • Member

Thanks for the reply, I've attached the ZIP file to this comment, hope that's ok since I've purchased these.

black_metal_plating_28_73.zip

  • Member

Just also wanted to quickly add, I'm not hung up on surface scratches, just used that as an example of where artists may put certain details in a PBR material. Here is a material that uses the normal map to clearly define the crystalline structure of the PBR material, which can't be reproduced with the height map.

Normal Map

image.thumb.png.64ba434805350d9898bd75fa63a24bf1.png

Height/Bump Map

image.thumb.png.6b2d662e36818528f0969610991dd84a.png

  • Like 1
  • Member

Correct me if I'm wrong, but you created the exact same depth map I demonstrated in my 2nd screenshot by simply letting 3DC convert the normal map. This isn't correct, you simply cannot take a normal map which holds XYZ vector information per texel, flatten it down to a height map value and expect correct light shading to occur as if you had the original normal map. I write a lot of graphics/vulkan/engine code and can tell you from experience that during a lighting subpass, the normals are required to get the correct details on the surface. If you destructively remove the direction information from a material and replace it with a depth/height value, you can no longer shade it correctly.

 

Has this not come up in other posts or discussions? I'm honestly quite surprised that this doesn't exist or that more people aren't discussing it. Did you see the last screenshots I posted?

  • Thanks 1
  • Advanced Member

I agree with you Hostouki, bump maps and normal maps are differents. The same with displacements and vector displacements. I think they need to put your observation in a wish list to develop a solution. 

  • Like 2
  • Advanced Member
2 hours ago, Hastouki said:

[...]

Has this not come up in other posts or discussions? I'm honestly quite surprised that this doesn't exist or that more people aren't discussing it. Did you see the last screenshots I posted?

I was, and still am, a bit confused about the absence of the normal map channel in the 3D Coat workflow.

Not sure if it's something simply being ignored, missing for whatever reason, or if there's a way to get a proper normal map which still eludes me.

 

  • Like 2

Looks like displacement recovering algorithm chosen incorrect type of normalmap (of two), so produced incorrect result. I will add checkbox to the dialog to force channel invertion before recovering.  

Will be available in 2023.03

image.png

  • Like 2
  • Member

Hey @Andrew Shpagin, thank you for taking the time to reply. I know this is a lot of text and sorry for all the screenshots, but I think this is an important topic and I imagine many people would benefit from a true normal input channel in 3DC. I hope this post is more helpful overall than a chore to deal with.

Looking at your image, it still looks quite strange due to the conversion, I don't believe the issues stem just from the normal map format. The normal maps I provided are D3D format (I think Substance painter format in 3DC), but I choose OGL as my bake type in 3DC because that's what I want to ultimately export for my own game engine. Btw, even if I purposely choose the wrong handedness direction in Substance, the normal maps look better and less artifacty. Of course they look inverted, but still do not have the weird fading/bending than the converted maps in 3DC (see below).

 

How can we expect correct shading with a simple depth value. In my own GLSL shader code there is texture sampler with per-fragment vec3 available for dot products and other calculations, I can't just replace that with a simple depth value. If you could do that, I'd save on quite a bit of video memory in my own deferred renderer, but I absolutely can't. Perhaps its my own ignorance, but I don't know what mathematics one can use to correctly calculate lighting using a depth/scalar value. Perhaps you generate the height map, then regenerate the normals during painting with some procedural (incorrect) normals that weren't what the original PBR material contained.

 

3DC Generated Depth Map (from Normals)

There is no way this information is sufficient or correct, look at the fading where the bolts are, I don't think this is just from Y direction.

image.thumb.png.b2d9b4910e6afbef24a2100b58676db8.png

 

Original height map provided with PBR Material Pack

This map would be useful for geometry displacement, but not really not that interesting for surface details.

image.thumb.png.15a758dce669ab51c075544403dfd16e.png

 

Further Testing

I just created a box similar to what you posted and applied the material using a fill layer in Substance Painter. The difference in the way the normals are presented is quite evident:

image.thumb.png.df0945df01c50034945aa50c74dbfcf6.png

image.thumb.png.b86531486b102606de49773a2ec34d66.png

 

3DCoat Zoom from your image

image.png.dba3ac947b86b00fa0d7c860e1e8d9f5.png

 

3DCoat box I just created

I understand that there was an incorrect normal map format, just pointing out the strange bending look at the junction points on top of the inverted looking lighting.

image.thumb.png.b866992652559fce72e7411389da9ad1.png

 

Substance Painter w/ Normal Map

image.thumb.png.db7dc2a762906717abe7ea96bde7a704.png

image.thumb.png.7f1528f4810412bea95aebbbac9da35a.png

 

image.thumb.png.f79bbac30d6544cf9ddb0cbe90c30223.png

 

Substance Painter, choosing incorrect normal format  on purpose (for reference)

Inverted and wrong, still no weird bending at junctions/bolts as seen in 3DC converted map.

image.thumb.png.1b3eb76a308165614fa0fbef5d0304ca.png

 

  • Like 2
  • Thanks 1
  • Member

Just adding some examples using Marmoset.

Correct Normal Format

image.thumb.png.6e50e774d23382dffc2480cf4412d05d.png

 

Incorrect Normal Format

Scratches look inverted, etc

image.thumb.png.75eb91b29c0d1cd366ca82e47f506b83.png

  • Thanks 2
  • Member
Carlosan
This post was recognized by Carlosan!

Hastouki was awarded the badge 'Great Support' and 1 points.

Hey Andrew, just finished more testing and put together some more screen grabs. Things definitely look better than what 3DC was generating before, but there seem to be issues. I spent a lot of time putting together my previous posts, I would really appreciate if perhaps you can touch on why I should be expecting an accurate given the conversion of the normals.

 

 

New 3DC Generated Depth Map

Looks much better, can still see warping near bolts. You can see in my previous comments how this material looks in other software packages.

image.thumb.png.9663fd38c40a96e026c7bb15d51803e2.png

 

Close-up of the new 3DC generated map

Much better than the previous result posted above, but there should not be fading/gradient/warping present, but its clearly in the generated depth map.

image.thumb.png.b983b097a33aba178b4f93de3679ef5b.png

Another example, using Marmoset and the actual normal map

image.png.d2f4374510b742fcbdbd12649db62ef6.png

 

And now the 3DC generated bump map, please notice the circular artifacts inside the crevices, probably caused by the banding seen below:

image.png.de73c2d78c7bee208d5f78873d1306ef.png

and this is the bump map it generated, its hard to see the banding, but its there.

image.thumb.png.cc8f9ccb44af64909c7e64c92a99d374.png

image.png

  • Thanks 1

Why 3DCoat need depth? Because you may paint with different materials over each other even on same layer and 3DCoat may mix them. To mix them I need depth. From that summary depth I generate normalmap that you see as the final render. So, if you have depth channel, use depth for the smart material. The "ladder" problem really may be improved, look for the upcoming 06 build.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...