Jump to content

[1.8] Error when loading a B3D model.


Kappucino

Recommended Posts

Hello, I'm experiencing with the new Rendering Registry for Forge 1.8

And I'm trying to load a B3D model file generated by Blender using the add-on provided by RainWarrior https://github.com/RainWarrior/B3DExport

But the B3DLoader is giving me this error:

[XX:XX:XX] [Client thread/ERROR] [FML]: No root mesh in model tests:models/item/Test.b3d and no mesh name in location, skipping

 

Does anyone have a clue on how to fix it?

I checked everywhere on github for a mod using this method and apparently no one is using it.

I looked at the source and the error seems to come from here:

        if(!(model.getRoot().getKind() instanceof Mesh))
        {
            FMLLog.severe("No root mesh in model %s and no mesh name in location, skipping", modelLocation);
            return ModelLoaderRegistry.getMissingModel();
        }

 

Here's the code which is loading the model in my proxy:

IModel model = ModelLoaderRegistry.getModel(new ResourceLocation(BaseReferences.MODID+":item/Test.b3d"));

 

Any help is appreciated!  :)

Link to comment
Share on other sites

  • 7 months later...
  • 9 months later...

Sorry to resurrect an old thread, but this is the first search result for that error and I think it's good to keep the info in one place.

 

I think the problem is not the name of the mesh, but whether the exported model contains a single object. The B3DLoader expects the root node to be a mesh, but if you export several mesh objects together, you get something like this

 

BB3D
  NODE
    name=ROOT
    NODE
      name=Body
      MESH
      ANIM
      NODE
        <bones>
    NODE
      name=LeftArm
      MESH
      ANIM
      NODE
        <bones>
    <etc>

 

However if you join the objects into one mesh (ctrl+J), you get

 

BB3D
  NODE
    name=Body
    MESH
    ANIM
    NODE
      <bones>

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.