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

Lightmaps are duplicated on export when referenced by multiple materials #41

Closed
rawnsley opened this issue Sep 23, 2021 · 2 comments
Closed

Comments

@rawnsley
Copy link
Contributor

In this example project there are three materials that share a common HDR lightmap. The GLTF export contains the same HDR file three times, which is obviously inefficient:

   28630 23 Sep 08:41 hubhenge.gltf
  873692 23 Sep 08:41 hubhenge_data.bin
 1517504 23 Sep 08:41 hubhenge_img0.bin
 3085418 23 Sep 08:41 hubhenge_img1.bin      <----
   16302 23 Sep 08:41 hubhenge_img10.png
 3085418 23 Sep 08:41 hubhenge_img11.bin     <----
 4613777 23 Sep 08:41 hubhenge_img12.png
  236837 23 Sep 08:41 hubhenge_img13.jpg
  918912 23 Sep 08:41 hubhenge_img14.png
 4633415 23 Sep 08:41 hubhenge_img2.png
  688083 23 Sep 08:41 hubhenge_img3.jpg
 1051643 23 Sep 08:41 hubhenge_img4.png
 3085418 23 Sep 08:41 hubhenge_img5.bin      <----
 4773183 23 Sep 08:41 hubhenge_img6.png
  666655 23 Sep 08:41 hubhenge_img7.jpg
 1018979 23 Sep 08:41 hubhenge_img8.png
   35701 23 Sep 08:41 hubhenge_img9.png
@netpro2k
Copy link
Contributor

Will test your scene out tomorrow more in depth but I pushed some changes to that branch earlier today that might fix this (I cleaned up all the HDR image handling code so that its all the same codepath and all also handles SDR images)

@rawnsley
Copy link
Contributor Author

@netpro2k Confirmed fixed by those changes :-) Feel free to close or leave it open until you merge the PR.

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

No branches or pull requests

2 participants