Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8779601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:49:52+00:00 2026-06-13T19:49:52+00:00

Using the blender exporter packaged with Three.js I exported the .blend file from this

  • 0

Using the blender exporter packaged with Three.js I exported the .blend file from this tutorial. I’m a huge noob when it comes to blender so what I did was simple:

  1. Open the file, and export it with the exporter
  2. Open the UV/Image Editor
  3. Save a copy of each texture next to the exported JSON (using the correct names)
  4. Modify the images to have dimensions that are a power of 2

So I just wanted to see if I could load this object as the level to walk around on in an experiment I am working on. The mesh loads fine, but there are no textures. I modified the Three.js source to do a console.log when it creates the texture images (in Loader source) to make sure the URL is right and that the images do actually load, which they do.

Here is the code:

var jLoader = new THREE.JSONLoader();
jLoader.createModel(map.data, function(geometry) {
    var material = new THREE.MeshFaceMaterial(),
    mesh = new THREE.Mesh(geometry, material);

    mesh.scale.set(50, 50, 50);

    scene.add(mesh);
}, map.texturePath);

I use createModel since I load the JSON data myself using my own loader. map.data contains the exported JSON, map.texturePath contains the path (no trailing slash) to the directory with the textures; specifically 'js/game/maps/subway'. The JSON is 30MB so I will not post it here, but I can tell you that the materials are listed, as well as the uvs. Here is the metadata:

"metadata" :
{
    "formatVersion" : 3.1,
    "generatedBy"   : "Blender 2.63 Exporter",
    "vertices"      : 474135,
    "faces"         : 236963,
    "normals"       : 168623,
    "colors"        : 0,
    "uvs"           : [3117],
    "materials"     : 1,
    "morphTargets"  : 0,
    "bones"         : 0
},

"scale" : 1.000000,

I do notice that it says "materials": 1 when the materials array is actually length 74. I don’t know enough about the format to know if this is an issue or not.

Now when rendered you can see places there should be textures are just blank.

Subway - No Textures
(source: pantherdev.com)

I tried waiting to ensure they didn’t just take a long time to load, tried changing the material I instantiate, tried not scaling the mesh, tried putting logs in three.js to ensure the images are loading (they are).

Looking closer I can see that at least 1 texture does show up:

Subway - Texture Loaded
(source: pantherdev.com)

I’m not sure what I am doing wrong, or what to try next.

If it would help to see a live demo, you can try it here though it may take a minute or two to load the subway JSON as my server is just a box in my living room; not exactly a network speed demon.

Any help is appreciated, sorry for such a long post; just wanted to give all the information I had.


Edit

I tried to use absolute paths to the textures, and even went so far as to modify the mapDifuse properties of the materials in the JSON to try and fix the issue, to no avail.


Edit 2

After doing some more debugging with WebGL-Inspector I found the following errors in my Web Console:

[18:36:35.395] Error: WebGL: DrawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:1933
[18:36:35.751] Error: WebGL: No further warnings will be reported for this WebGL context (already reported 32 warnings) @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:1933

When I capture a frame, I get even more information:

[18:38:12.349] Frame 791 errors: @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9780
[18:38:12.349] ---------------------- @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9781
[18:38:12.349]  INVALID_OPERATION <= drawElements(TRIANGLES, 306, UNSIGNED_SHORT, 0) @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9787
[18:38:12.349]    - @http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:4155 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.349]    - @http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:403 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.350]    - n@http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:346 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.350]    - @http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:408 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.350]    - animate@http://static.pantherdev.com/dev/arena/client/isolate.html:108 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.350]    - @http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:2307 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
  ... A WHOLE LOT OF THIS ...
[18:38:12.358]  INVALID_OPERATION <= drawElements(TRIANGLES, 6, UNSIGNED_SHORT, 0) @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9787
[18:38:12.358]    - @http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:4155 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.358]    - @http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:403 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.358]    - n@http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:346 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.358]    - @http://static.pantherdev.com/dev/arena/client/js/game/vendor/three/three.min.js:408 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.358]    - animate@http://static.pantherdev.com/dev/arena/client/isolate.html:108 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.358]    - @http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:2307 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9792
[18:38:12.359]   @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:9796

[18:38:12.126] Error: WebGL: bindBuffer: target: invalid enum value 0x0 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:4163
[18:38:12.133] Error: WebGL: generateMipmap: Level zero of texture is not defined. @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:3668
[18:38:12.927] Error: WebGL: bindBuffer: target: invalid enum value 0x0 @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:4163
[18:38:14.156] Error: WebGL: DrawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array @ http://static.pantherdev.com/dev/arena/client/lib/gli.all.js:2745

I think it is right to assume that my JSON has some incorrect or missing values, however I am not sure how to remedy the situation. Like I mentioned in a comment (and at the start of this post), I exported the .blend file using the exporter packaged with Three.js; what else would I need to do?


Edit 3

Using the WebGL-Inspector I have pulled a little more info about the actual calls that are failing. Here is the debug info for the working "649" texture and the broken "rust" texture though the texture doesn’t show on the linked pages the data is all there if it helps someone (the textures do show on the WebGL-Inspector on the isolate page, just not on the exported pages I linked).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:49:53+00:00Added an answer on June 13, 2026 at 7:49 pm

    I ended up abandoning try to get this to work, I think the model itself was improperly created. The UVs didn’t seem to map to the model correctly, and was broken on export. I never managed to get it working, but was able to load other textured models that were obviously different even when just loaded into Blender.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using OpenGL ES to display some objects exported from Blender. Blender provides a
I have some .js files exported from Blender and load them with THREE.JSONLoader(); my
I've made an exporter (in Python) from Blender (2.5+) to a custom format. What
I'm creating a little game using Three.js and everything is going well apart from
I have a blender image exported using Jeff LaMarche .h export script. I am
I'm using Blender v.2.6.1: is there a way to export my project (.blend) to
I'm using OpenGL ES 1.1 and working on converting an OBJ export from Blender
i wanna ask you about how to display a 3d model exported from blender/3d
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.