question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PLY Loader & Textures

See original GitHub issue

As it said in this issue https://github.com/mrdoob/three.js/issues/3382

the PLYLoader does not support texture coordinates.

Is it still the same ?

code:

var loader = new PLYLoader()
    loader.load(path,(geometry) => {
      geometry.computeVertexNormals();

      new THREE.TextureLoader().load( `${url}` (texture) => {
        let material = new THREE.MeshStandardMaterial({
          map: texture,
        })

        let mesh = new THREE.Mesh(geometry, material)
        mesh.position.x = 0
        mesh.position.y = 0
        mesh.position.z = 0
        mesh.rotation.x = -Math.PI / 2
        mesh.scale.multiplyScalar(1.2)
        mesh.castShadow = false
        mesh.receiveShadow = false
        this.scene.add(mesh)
        this.camera.position.set(15, 15, 121)

        this.preloaderRoot.querySelector('progress').setAttribute('value', '100')
        this.preloaderRoot.style.display = 'none'
      })
    }, onProgress, onError)

three.js - 0.93.0 Chrome latest macOs Sierra 10.12.6

screenshot of the result in attachment screen shot 2018-08-17 at 16 09 47

Three.js version
  • Dev
  • r95
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
AndreySukhovcommented, Aug 17, 2018

yes, it can be downloaded with this link https://yadi.sk/d/FYvKvmo53aKoKQ Textures are in .jpg , if this matters

0reactions
Mugen87commented, Sep 16, 2018

@AndreySukhov Can you please verify if your model loads correctly with the new PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

PLY Loader - Three.js Tutorials - sbcode.net
PLY Model Loader ... import { PLYLoader } from 'three/examples/jsm/loaders/PLYLoader' import Stats from 'three/examples/jsm/libs/stats.module' const scene ...
Read more >
How can I load an image as texture to a ply model in three.js
this is in an html file where I use three.js with the plyloader.js to load the model, but I have not managed to...
Read more >
Load PLY with multiple textures - Questions - three.js forum
I'm trying to load a PLY file with multiple PNG textures. I'm able to load the PLY with one texture, but fail to...
Read more >
Texture support for PLY format - Irrlicht Engine
I am trying to add texture support to PLY loader by copying relevant parts of the OBJ loader. https://github.com/acyildirimer/irrlich .
Read more >
PLYLoader - loaders.gl
PLYLoader. The PLYLoader parses simple meshes in the Polygon File Format or the Stanford Triangle Format. Loader, Characteristic. File Extension .ply.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found