BabylonJS / BabylonToolkit

Home of the community maintained Unity & Unreal exporters for Babylon.js
173 stars 46 forks source link

Deduplicate exports #66

Closed nicolasayotte closed 3 months ago

nicolasayotte commented 1 year ago

I have a few assets that, when exported, will generate more than 3 copies of the exact same texture file bit for bit with a different name. AND then it just regenerates a brand new copy of each of the copies on every export with a new hash.

  1. There must be a way to simply reference the same file as a texture in multiple places (I have to deploy and then make people DOWNLOAD this, this is awful).
  2. Why keep on creating different copies of the same file on every export if they are the same... Maybe create the an actual hash from the binary contents of the file so that, if the hash is the same it will not duplicate it?

Thanks

MackeyK24 commented 1 year ago

You would have to show me this... We use the toolkit (a newer version) everyday at work. Have created many commercial projects for clients for the past few years. I have never seen this issue

MackeyK24 commented 8 months ago

You must show me this error. Are you using newer builds of the toolkit ?

MackeyK24 commented 4 months ago

I found this issue. It was not actually making duplicates. It was using a HASH as the file suffix for the texture. That has was supposed to be unique. But it was not. So the old files was sticking around when the GetInstanceID and HASH changed.

But as far as loading it was only trying to load the latest one texture whos filename was saved in the gltf..

Issue is fixed in latest Babylon Toolkit 7.3.2 HAVOK R1

MackeyK24 commented 4 months ago

Yo @nicolasayotte ^^^

nicolasayotte commented 4 months ago

Yo @nicolasayotte ^^^

Thank you! I will test this and come back to you

MackeyK24 commented 3 months ago

Fixed