using three.js how to add texture to .OBJ object

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

using three.js how to add texture to .OBJ object

Postby vijay1 » Thu Oct 13, 2016 1:43 pm

Hi all,

We have exported sample human model(.obj) from makehuman.org along with textures(shirts/trousers as img) and tried to run the same from browser using three.js
Using MeshPhongMaterial tried to add texture(dress) to the human model but it went into indefinite error. pls suggest the way forward.

var material = new THREE.MeshPhongMaterial( { map: THREE.ImageUtils.loadTexture('female_casualsuit01_diffuse.png') } );
var geometry = new THREE.SphereGeometry(1000, 20, 20);
var meshFaceMaterial = new THREE.MeshFaceMaterial( material);
var mesh = new THREE.Mesh(geometry, meshFaceMaterial);
scene.add(mesh);

FYI:
The following is the code snippet being used: https://jsfiddle.net/84fu6f7m/1/

Thanks
ASH
vijay1
 
Posts: 3
Joined: Thu Oct 06, 2016 10:23 am

Return to General discussions about makehuman

Who is online

Users browsing this forum: No registered users and 1 guest