Using UV Mappings created in Blender

I’ve create a 3D model, along with UV Mappings in Blender:

Using the Blender to Three exporter, I then export my geometry to Three: (

After doing that, I can then import my JSON:

It looks like:


I can then pull that into Three.js

const json = jsonLoader.parse(json);
const geometry = json.geometry; // The only thing in the parsed json is `geometry`

What I’d like to do now, is take an image and apply it to this geometry, using the same UV Mappings I set up in blender.

Note that when I say “an image”, I don’t mean the exact image that was used in blender. User’s of this application will be filling in details of that particular template image and uploading it to my application. However, since it follows the same template from Blender, the same UV Mappings will apply.

I’m stuck on this piece of it … what would the code look like to use UV Mappings from blender, to create and apply a texture to this geometry given a provided image?

Right now, I do this, but the UV Mappings from Blender seem to have no bearing on how this is rendered:

const loader = new THREE.TextureLoader();
loader.load('', artworkTexture => {

  const json = jsonLoader.parse(json); // The JSON from blender
  const geometry = json;
  // Most likely unrelated code ommitted here

  artworkTexture.anisotropy = renderer.getMaxAnisotropy();

  const artworkMaterial = new THREE.MeshBasicMaterial({
     side: THREE.FrontSide,
     map: artworkTexture,
     depthWrite: false,
     depthTest: false


   const mainObject = THREE.SceneUtils.createMultiMaterialObject(


I figured this one out. This WAS actually working. However, in the code I provide, I have a section commented out that says // Most likely unrelated code ommitted here. Turned out to be relevant. I was doing some transformation to the texture that was actually throwing this off. By simply removing those transformations, I solved my problem.


Hi Jason,

This looks amazing! After searching for months online I think I have finally found someone with exactly the same project that I have been trying to do… except you succeded!!!

Is there any way I could download your project resources to help me out?


Hey DDsmoove,

I unfortunately don’t think I could send you the project resources for download. However, the site is public, it can be found here:

If you have any specific questions I’d be happy to give you some guidance.

1 Like

Hi Jason,

Thanks for the quick response.

My first hurdle is the uv mapping itself on blender. At the moment I just can’t understand why it is not working for me.

Either it is the model itself or I have made the wrong seams in the cup.

Could you give me any pointers?


That looks almost certainly to be a problem with your seams.

You want your seams to look like this:
1 On the lip.
2 On the bottom.
3 Down the side.


Once you’ve marked the seams correctly, select all on the left side, select “Unwrap”, and it should look like this:


Ok so i’ve managed to quickly remodel the cup and im getting a bit closer now but only by taking out the bottom of the cup. (will go over this at a later stage once i understand the whole process)

So from here, I just convert the blend file to three?(three.js/utils/exporters/blender at master · mrdoob/three.js · GitHub)

Does the code already understand what the UV map is or are there further steps to take? Also, if an image is uploaded how do I link user uploaded images to the UV map (provided i have already build an upload button funtion)?

Thanks again for all the help again :slight_smile:

When you export to three, make sure you have “UVs” checked. The UV map will be part of your Geometry that gets exported.


After you export it, you’ll have a .json file, which you’ll need to read in the geometry for your scene.

Look above at my original post for how you might read this in, along with the artwork.