Is there any way possible to compress the geometry object

after creating an mesh my geometry object size is 100 mb appx i want to compress it to very small like 10 mb is it possible

The following example might be interesting for you:

However, GeometryCompressionUtils won’t be able to reduce the size by factor 10.

@Alex please share more details. Is the data all geometry, or textures and animation too? Do you need to compress it within the webpage, or would offline compression tools work for you? Does the geometry need to be 100% lossless, or is lossy compression OK as long as the final result still looks the same?

@donmccurdy i have only one terrain mesh i want to compress its geometry object and than i do toJSON to store in DB and when i parse and recreate the mesh nothing should be change the terrain mesh should be similar as before please suggest me how i can achieve this.


Is it a flat heightmap / terrainmap, or does it include complex stuff like caves / boulders / trees etc. ?

For what you described, the best approach would be to divide the entire mesh into tiles and load / stream only the visible parts. Something like this approach shown on the screenshots.

You can also then store the tiles in the DB separately, indexed by their position.

Can you show a sample of how exactly the geometry looks like? Maybe compression wouldn’t even be needed.

Hello @mjurczyk its a dxf terrain so i think it does not have complex caves and all but still i want to go for geometry compression upto a very good extent
i also find this DRACOLoader but how i can compress the geometry only i dont have any drc file how compression is possible and decompression of objects

Thanks to all who respond on this ticket because some time responding is also a motivation a developer feel some one is there to help this issue is fixed.
I used the zipson package that compressed the mesh json form and it is working fine according to my need

1 Like