Giter Club home page Giter Club logo

Comments (4)

sdfgeoff avatar sdfgeoff commented on May 29, 2024 1

This may not be possible due to the way the files are stored. Blend files are a binary format, so a floating point number occupies 32 bits. The .escn format is a text based format, so numbers are stored in ASCII, eg: 2.98023e-08, Including the comma and space, this is 88 bits, more than double the space, just for a single number.
Additionally, in blender, normal and tangents are automatically calculated on teh fly, and aren't stored in the blend file. In the escn file, they are stored for each shapekey to lower computation time when displaying the model. This alone will double or triple the filesize.

Question: What are you comparing the "increased loading time" to?
It could be related to file size on disc, but after converting to the binary scn format (inside the .import folder) this shouldn't have much difference to other formats.

I'm not sure what could be causing visual glitches. Do you have a blend you can share?

from godot-blender-exporter.

Jason0214 avatar Jason0214 commented on May 29, 2024 1

The shape keys do have a lot of duplicating vertex data (as well as bone data), every shape key is stored as the whole mesh data merely without vertex indices, thinking about you have a large mesh and only use shape key to change an expression, the duplication is huge.
The problem is that the format of shape key being stored is decided by Godot engine, it is not likely to change in this add-on side.

However, a small issue is that this exporter is using an old format of Godot to store mesh (I mentioned in #29 ), I didn't look through the new format yet but I suppose it is possible that the new format use a more space-saving way, I will go to check it when I have some available time.

from godot-blender-exporter.

mysticfall avatar mysticfall commented on May 29, 2024

Thanks for the explanation. I was hoping that the problem was caused by duplicating vertex data without checking if they are affected by each shapekey or something similar, because in that case there could be a room for future improvements.

It seems that the only way to mitigate the problem is to reduce the number of shapekeys, if I understood the situation correctly.

The increased loading time I mentioned was that compared to how it was before I exported the mesh with shapekeys. It's understandable why it became so slower, since now I have 200mb .tscn + 30mb *.mesh files, whereas it was merely 6.4k .tscn + 523k .mesh before. I just didn't realize having shapekeys would have such a drasitic impact on file size.

As to the visual glitchy, I opened a separate issue here: godotengine/godot#19880, and you can find my Blender file here :

from godot-blender-exporter.

Terkwood avatar Terkwood commented on May 29, 2024

Hi, my apologies if this takes the ticket off topic --

I found that using the decimate modifier helped me reduce the file size of the ESCN export. Taking away some of the faces in the object didn't detract from my particular use case, and I was able to shrink the output size by a lot

from godot-blender-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.