Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal Map not exported - 3DSMax 2018 #288

Closed
keyoss opened this issue Aug 7, 2018 · 9 comments
Closed

Normal Map not exported - 3DSMax 2018 #288

keyoss opened this issue Aug 7, 2018 · 9 comments
Labels
working on Someone is currently working on this issue

Comments

@keyoss
Copy link

keyoss commented Aug 7, 2018

Using standard materials in Max:

Diffuse
Specular
Glossiness
Bump - NormalBump - NormalMap.jpg

the Normal Map.jpg will not be exported at all.

Expected Result would be:
I use the "Normal Bump" inside the Bump Slot and select a norrmal map with Tangent space - The Texture should be exported as vaild normal map.

@deltakosh
Copy link
Contributor

Do you have a warning message at exportation time?
Can you share your model?

@keyoss
Copy link
Author

keyoss commented Aug 7, 2018

https://www.dropbox.com/s/l0d8auoa8eaxe6e/FBP_HeadOnly_2018.zip?dl=0

You may use this file for testing - iits quit large but an actual WIP model for Production.
Model and Textures are ©.

This file contains a biped and Head + Hair + Textures.
The Material for the Head is : hlava22 and the Bump slot is not exported for any version 2015-2018.

In the Message log for the Babylon.JS i cant spot anything about the normal map a all.. the others got exported... write image, create sampler, create image, create texture for BaseColor and metallicRoughness.
export_2018

@noalak noalak added the working on Someone is currently working on this issue label Aug 13, 2018
@noalak
Copy link
Contributor

noalak commented Aug 13, 2018

Hi keyoss,

The normal map texture provided is a 'Normal bump', not a 'Bitmap' (see issue #289). You should have a warning displayed in the window. Scroll up to see it, before any gltf export.

normalbump

The Normal Bump you are using is quite simple, with all default parameters. Using a simple Bitmap would lead to same result in 3ds Max, isn't it?
Anyway, Babylon and glTF formats don't have advanced bump parameters like 3ds max does. Those advanced features won't be taken into account when exporting. Only a simple bump texture is expected.

@deltakosh When facing a 'Normal Bump' type, we can export a simple Bitmap instead, only using the field 'Normal' of the 'Normal Bump'.

@sebavan
Copy link
Member

sebavan commented Aug 13, 2018

I guess this would be a good first step :-)

@echadwick-artist
Copy link

I'm getting a different error with normal maps.

Exporting texture <filepath and filename> failed: System.IO.IOException: The process cannot access the file "<filepath and filename [truncated]

I'm using a Bitmap Node wired into the Bump Map input of a Physical Material. Similar error when using JPG or PNG format for the normal map.

It does seem to be rendering the normal map correctly despite the error, at least for a tiled normal map.

I haven't tried one baked from high-res geometry, so I don't know if the tangent basis is correctly matched.
( what tangent basis is BabylonJS using? Mikktspace?
https://gamedev.stackexchange.com/questions/128023/how-does-mikktspace-work-for-calculating-the-tangent-space-during-normal-mapping )

image

image

@noalak
Copy link
Contributor

noalak commented Aug 17, 2018

Can you share a new repro scene for the access issue ?
Was the .jpg being edited in another software like substance or photoshop ?

About tangent basis in Babylon i will let @bghgary answer :)
He's quite busy right now with the SIGGRAPH though. For a quick answer, you may have a look at this thread.

@bghgary
Copy link
Contributor

bghgary commented Aug 17, 2018

The tangent space for glTF is MikkTSpace if they are not specified (see second implementation note of https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes). BabylonJS does not currently do this properly, but in a lot of cases, it isn't really noticeable. There is an issue to investigate doing this properly.

That said, @noalak please correct me if I'm wrong, the exporter does export tangents. So, whatever tangent space you use will be fine since it is specified in the glTF asset.

@echadwick-artist
Copy link

Ok thank you both. I will create a new thread with a repro case.

@sebavan
Copy link
Member

sebavan commented Aug 21, 2018

No problem closing this one then

@sebavan sebavan closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
working on Someone is currently working on this issue
Projects
None yet
Development

No branches or pull requests

6 participants