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.

Rendering OBJ/MTL breaks when texture image is NPOT

See original GitHub issue

Here’s the code: https://github.com/abdielou/npot-bug-demo

When rendering models with NPOT texture images, the app breaks with the following stack trace:

Can't find variable: HTMLImageElement
makePowerOfTwo
uploadTexture three.js:18101:25
setTexture2D
setTexture2D
setValueT1 three.js:4971:2
...

Version:

  "dependencies": {
    "expo": "^25.0.0",
    "expo-graphics": "^0.0.3",
    "expo-three": "^2.2.2-alpha.1",
    "react": "16.2.0",
    "react-native": "0.52.0",
    "three": "^0.90.0"
  }

screenshot_20180226-170502

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
EvanBaconcommented, Mar 1, 2018

I think this might be an android bug, will test and get back to you.

0reactions
EvanBaconcommented, Apr 18, 2018

I fixed this in @expo/browser-polyfill should work for you now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing OBJ with MTL and Image not working properly
1. Check the obj file. In your case the obj is not exported correctly. Obj is a human readable file format it is...
Read more >
html - .mtl file not rendering properly - Stack Overflow
I have .obj file and .mtl file and I'm trying to render those file using THREE.JS. But obj was loaded but colors and...
Read more >
When I import a .obj from formit into a renderer, some texture ...
Solved: When I import a .obj from formit into a renderer, some texture are broken. How to solve this problem.
Read more >
MTL file in Rhino - Rendering - McNeel Forum
How to render the .obj file with .mtl(or as in the picture) ... If you have a model that is not coming over...
Read more >
usdz texture issue (using usdz_converter) - Apple Developer
It might be the usdz_converter itself is still kind of buggy? Some OBJ just does not convert to proper USDZ with texture. I...
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