question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrating from 2.01 to 2.03

See original GitHub issue

A year ago i started working on a glTF converter tool (custom format -> glTF and vice versa) and it was fairly easy to do using this library, i never fully finished the project and decided to start working on it again now. Last time i simply referred to jgltf-obj and built it based on that. However now i decided to upgrade to the latest jgltf model (at least latest in mavenrepository) and seems like a lot has changed. To be more specific, one specific class BufferStructureBuilder which i used heavily no longer exists, so code like this:

    public void exportJointsAndWeights() {
        List<ByteBuffer> buffers = writeJointsAndWeights(bones);
        int jointsAccessorIndex = bufferStructureBuilder.getNumAccessorModels();
        bufferStructureBuilder.createAccessorModel("jointsAccessor_" + jointsAccessorIndex,
                GltfConstants.GL_UNSIGNED_SHORT, "VEC4", buffers.get(0));
        meshPrimitive.addAttributes("JOINTS_0", jointsAccessorIndex);

        bufferStructureBuilder.createArrayElementBufferViewModel(
                "joints_bufferView");

        int weightsAccessorIndex = bufferStructureBuilder.getNumAccessorModels();
        bufferStructureBuilder.createAccessorModel("weightsAccessor_" + weightsAccessorIndex,
                GltfConstants.GL_FLOAT, "VEC4", buffers.get(1));
        meshPrimitive.addAttributes("WEIGHTS_0", weightsAccessorIndex);

        bufferStructureBuilder.createArrayElementBufferViewModel(
                "weights_bufferView");
    }

no longer compiles.

Edit: im aware that BufferStructureBuilder was only supposed to be used internally as i remember you mentioning it in an issue i made a while ago: https://github.com/javagl/JglTF/issues/55#issuecomment-980072858

So i believe my main question is what’s the easiest way currently to construct a glTF file from a set of data (vertices, indices, normals, materials, joints/bones etc) as im aware that i probably have to rewrite most of my current code (probably best bet would be to just start from scratch). I also don’t mind using ‘non-released modules’ like the jgltf-model-builder (at least i didn’t find a release of it in maven repo) or any other branches that are more up to date but just isn’t released yet as i can just clone these easily rather easily and include in my project if it does make it any easier

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
javaglcommented, Oct 22, 2022

The jgltf-model-builder library should already be published, as of https://repo1.maven.org/maven2/de/javagl/jgltf-model-builder/2.0.3/ .

I guess the relevant point here is: This library is not part of jgltf-model. (It only depends on jgltf-model). The reason behind that is that some people might want to use jgltf-model, but may not need jgltf-model-builder.

Try adding the following dependency to your pom.xml:

    <dependency>
      <groupId>de.javagl</groupId>
      <artifactId>jgltf-model-builder</artifactId>
      <version>2.0.3</version>
    </dependency>

Is there any way to support you/this project? some github repos have a ‘sponsor’ option for example.

I haven’t looked into the details of possible sponsorship, and somehow doubt that there’s soooo much interest in what I’m doing: Nearly everything that I’m doing also exists as a *Script-npm library, often backed by large companies and many contributors (yes, sometimes sponsored). Setting up the infrastructure for sponsoring (including tax forms and whatnot) would probably not be worth the hassle. (I’m a freelancer, though. Wrapping a certain task into a fixed-price, fixed-time work contract could be much easier and goal-oriented…)

0reactions
Suicolencommented, Oct 22, 2022

Thanks, everything works exactly as before now.

Nearly everything that I’m doing also exists as a *Script-npm library, often backed by large companies

at least for this project i don’t think that’s the case as this is the only library i found that allowed me to easily construct glTF models in java from a set of data(positions, vertices, tex coords, joints, weights etc) and reading a glTF was very easy as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate from ASP.NET Core 2.0 to 2.1 - Microsoft Learn
This article covers the basics of migrating an ASP.NET Core 2.0 app to 2.1.
Read more >
Migrating from versions 1.x to version 2.01 - iatistandard.org
As 2.01 of the IATI Standard was being prepared there was a decimal upgrade to version 1.05 that ran in parallel. All changes...
Read more >
Aurora MySQL database engine updates 2018-10-24 (version ...
2.01.*, 2.02.*, and 2.03 into Aurora MySQL 2.03.1. ... For more information, see Migrating data from MySQL by using an Amazon S3 bucket...
Read more >
Quick Answers—Formatting (6th edition) - APA Style
Find answers to common questions about running heads, margins, heading levels, lists, tables, figures, tables of contents, title pages, serial commas, ...
Read more >
Aurora MySQL database engine updates 2018-03-13 (version ...
Aurora MySQL 2.01.1 is generally available. Aurora MySQL 2.x versions are compatible with MySQL ... Upgrade to Aurora 2.03 for performance schema support....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found