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

  • SEARCH
  • Home
  • 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 7187469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:51:07+00:00 2026-05-28T18:51:07+00:00

I’m looking after this for a long time now. I just can’t find any

  • 0

I’m looking after this for a long time now.
I just can’t find any solution, anywhere.
I’m trying to apply 3 different textures on a cylinder (2 caps, and side)
But I have absolutely no idea on how to achieve this.
Can you orient me?
Here’s what I’m doing for now :

var coin1_geo = new THREE.CylinderGeometry( 100, 100, 10, 100, 100, false );
var coin1_texture = THREE.ImageUtils.loadTexture("./assets/avers.png");
var coin1_mat = new THREE.MeshLambertMaterial({map:coin1_texture});
var coin1 = new THREE.Mesh( coin1_geo, coin1_mat );
coin1.rotation.x = 20;
coin1.position.set(0,0,0);
coin1.castShadow = true;
coin1.receiveShadow = false;
scene.add( coin1 );

As you can see here, I only apply one texture on all faces.
But even on caps, it’s not really displaying, I only have a piece of the full circle.
Please help, I’m achieving a coin, if you didn’t figure out.
Even if you just give me a link to a tutorial I would be really thanksfull.
I can’t find anything, and my knowledge in 3D/OpenGL programming is quite limited.
Thanks a lot.

  • 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-05-28T18:51:09+00:00Added an answer on May 28, 2026 at 6:51 pm

    [edit] Three cylinders didn’t work since the cap UVs are bogus.
    You need to roll your own cap geometries. Not a lot of work, just annoying. Here’s how to do an uncapped cylinder with custom caps:

    var coin_sides_geo =
      new THREE.CylinderGeometry( 10.0, 10.0, 1.0, 100.0, 10.0, true );
    var coin_cap_geo = new THREE.Geometry();
    var r = 10.0;
    for (var i=0; i<100; i++) {
      var a = i * 1/100 * Math.PI * 2;
      var z = Math.sin(a);
      var x = Math.cos(a);
      var a1 = (i+1) * 1/100 * Math.PI * 2;
      var z1 = Math.sin(a1);
      var x1 = Math.cos(a1);
      coin_cap_geo.vertices.push(
        new THREE.Vertex(new THREE.Vector3(0, 0, 0)),
        new THREE.Vertex(new THREE.Vector3(x*r, 0, z*r)),
        new THREE.Vertex(new THREE.Vector3(x1*r, 0, z1*r))
      );
      coin_cap_geo.faceVertexUvs[0].push([
        new THREE.UV(0.5, 0.5),
        new THREE.UV(x/2+0.5, z/2+0.5),
        new THREE.UV(x1/2+0.5, z1/2+0.5)
      ]);
      coin_cap_geo.faces.push(new THREE.Face3(i*3, i*3+1, i*3+2));
    }
    coin_cap_geo.computeCentroids();
    coin_cap_geo.computeFaceNormals();
    
    var coin_sides_texture =
      THREE.ImageUtils.loadTexture("./coin_sides.png");
    var coin_cap_texture =
      THREE.ImageUtils.loadTexture("./coin_face.png");
    
    var coin_sides_mat =
      new THREE.MeshLambertMaterial({map:coin_sides_texture});
    var coin_sides =
      new THREE.Mesh( coin_sides_geo, coin_sides_mat );
    
    var coin_cap_mat = new THREE.MeshLambertMaterial({map:coin_cap_texture});
    var coin_cap_top = new THREE.Mesh( coin_cap_geo, coin_cap_mat );
    var coin_cap_bottom = new THREE.Mesh( coin_cap_geo, coin_cap_mat );
    coin_cap_top.position.y = 0.5;
    coin_cap_bottom.position.y = -0.5;
    coin_cap_top.rotation.x = Math.PI;
    
    var coin = new THREE.Object3D();
    coin.add(coin_sides);
    coin.add(coin_cap_top);
    coin.add(coin_cap_bottom);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.