Giter Site home page Giter Site logo

Comments (2)

Dancovich avatar Dancovich commented on September 26, 2024

The exporter doesn't support keyframes directly set in the mesh object because G3D format also doesn't support this. The G3D format only supports bone animation.

To achieve what you want, create a new armature with a single bone (Shift+A > Armature > Single Bone), attach it to the cube object (select the object first then Shift+RMB on the armature object > Ctrl+P > Armature With Automatic Weights) and do the exact steps you just did (keyframe on frame 1, go to last frame, scale and keyframe again) but on the bone instead of the mesh object. Remember to scale the bone in pose mode, not in object or edit mode.

Below is an example file with this setup for you to test. Notice that when exporting this file you'll just see two keyframes on the resulting file (as expected) but a new file on Blender will produce 250 keyframes. That's because by default Blender uses a bezier curve to ease animations and since LibGDX only supports linear interpolation we have to generate multiple keyframes to simulate the easing effect. If you set the animation interpolation to linear in Blender this will produce the same keyframes you set on your file.

animated_cube.zip

from libgdx_blender_g3d_exporter.

dilom avatar dilom commented on September 26, 2024

Thank you! First time playing with G3D and it wasn't very clear it has to bone only animation from all the places I was reading. Thanks again

from libgdx_blender_g3d_exporter.

Related Issues (18)

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.