nagyistoce / webgl-loader

Automatically exported from code.google.com/p/webgl-loader
0 stars 0 forks source link

Simple 3D model textured to open-3d-viewer #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create 3D model with Blender 2.61, export to obj with this options
- Apply Modifiers
- Include Edges
- Include Normals
- Include UVs
- Write Materials
- Objects as OBJ Groups 
2. open-3d-viewer + webgl-loader -> create UTF8, JS, JSON
3. See in open-3D-viewer, but texture don't see

What is the expected output? What do you see instead?
3D model with texture. I see 3D model with white material.

What version of the product are you using? On what operating system?
Last revision of product and Ubuntu 11.10

Original issue reported on code.google.com by fernando...@gmail.com on 16 Feb 2012 at 7:18

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry the right attach is this.

Original comment by fernando...@gmail.com on 16 Feb 2012 at 7:27

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Fernando. I'm about to go on vacation this weekend, so it will take me a 
little while to get to it.

Original comment by wonchun on 16 Feb 2012 at 9:33

GoogleCodeExporter commented 9 years ago
Care with the exported obj. Must be corrected absolute paths with relative 
paths, and add the correct texturePath to models.js
With this, the result material is black, no white and no texture. ¿?

Original comment by fernando...@gmail.com on 10 Mar 2012 at 12:11

GoogleCodeExporter commented 9 years ago
PROBLEM SOLVED!

Texture image file should be a power of 2

Original comment by fernando...@gmail.com on 15 Mar 2012 at 3:38

Attachments:

GoogleCodeExporter commented 9 years ago
Solution is here:

http://learningwebgl.com/cookbook/index.php/WebGL:_Frequently_Asked_Questions

Abstract:

Why won't my textures work?
NPOT problems

A common problem is that you're using a non-power-of-two (NPOT) texture -- that 
is a texture whose width, height or both is not two-to-the-power-of-something 
long. These often won't work as expected with WebGL. For example, 100x100 pixel 
textures will not generally work; 128x128 will work, as will 128x512. In theory 
4096x8192-pixel images would work as textures, though your viewers might run 
out of memory on their graphics cards, particularly if they're using 
smartphones!

Kenneth Russell has written a more detailed explanation of the situation with 
NPOT textures on the WebGL Wiki.

Original comment by fernando...@gmail.com on 15 Mar 2012 at 3:45

GoogleCodeExporter commented 9 years ago
Great! Sorry I didn't get to this before you figured it out yourself.

Original comment by wonchun on 9 Apr 2012 at 10:47