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

added support for meshes with diffuse AND normal map #51

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

charly-perspectives
Copy link
Contributor

@charly-perspectives charly-perspectives commented Aug 9, 2023

Hey there.

Following the issue #47, I modified obj2tiles in order tu support normal maps.

If you add the norm attribute in the .mtl file, the output 3DTiles will contain the normal map in its material.
Example:

newmtl default
Kd 0.5000000000 0.5000000000 0.5000000000
Ks 1.0000000000 1.0000000000 1.0000000000
Tr 0.0000000000
d 1.0000000000
Tf 1.0000000000 1.0000000000 1.0000000000
Pr 0.0000000000
Pm 0.0000000000
Pc 0.0000000000
Pcr 0.0000000000
Ni 1.5199999809
Ke 0.0000000000 0.0000000000 0.0000000000
illum 2
map_Kd textures\trap.png
norm textures\Box002NormalsMap.tga.png
  • For some reason though, the normal map is showing only when there is also a diffuse map. I can't figure out why, as the normal map texture is indeed present in the 3D Tile. It might not even be related to Obj2Tile, but if you have an idea...
  • The normal texture and diffuse have the be the same size for obj2tiles to function correctly.

Thank you for reading me, I'd like to know what do you expect for this PR to be mergeable.

@pierotofy
Copy link
Member

Hi @charly-perspectives 👋 thanks for the PR (and sorry for the late review). This is certainly an interesting addition. I have no insights into the issue of needing both a diffuse and normal map, perhaps this is something glTF specific.

@pierotofy pierotofy merged commit bfdecb5 into OpenDroneMap:master Oct 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants