xxv / jsc3d

Automatically exported from code.google.com/p/jsc3d
31 stars 20 forks source link

Texture file are not loading #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
HI,

   I have download the jsc3d-full-1.6.5.zip and check with our .obj file
the object file is loading correctly but the texture files not loading, i 
displays as black object

   and i open the same file with maya it's working good and texture files also loading

   i have attached the screen shot with this

Original issue reported on code.google.com by krishnar...@gmail.com on 4 Mar 2014 at 7:57

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not sure what's the matter according to the screenshot. Could you upload 
this model here so that I can make a quick test?

Original comment by Humu2...@gmail.com on 4 Mar 2014 at 12:48

GoogleCodeExporter commented 9 years ago
I have attached the sample module with this, same issue is producing for the 
below file also

Original comment by krishnar...@gmail.com on 4 Mar 2014 at 1:25

Attachments:

GoogleCodeExporter commented 9 years ago
I see. The issue lies in the material definition in your mtl file. Open 
broccoli.mtl in a text editor, you'll see these lines:

  Kd 0.00 0.00 0.00
  ...
  Kd 0.00 0.00 0.00

A Kd statement defines the diffuse color for a material. According to Jsc3d's 
lighting equation, if the diffuse color is zero, the corresponding mesh will be 
completely dark.

Try to replace these fields with more meaningful values such as:

  Kd 0.80 0.80 0.80

And it will be ok.

To improve the quality of the redering, you may also need to add the following 
lines to the initialization section:

  viewer.setParameter('CreaseAngle', 30);
  viewer.setParameter('MipMapping', 'on');

which help to release aliasing artifacts.

Besides, it seems that your model has some faces whose vertices are not 
described in correct (counterclockwise) order. This will result in improper 
face culling. Try to repair your model using a modelling software. Both 3DSMAX 
and Blender can make it automatically.

Original comment by Humu2...@gmail.com on 4 Mar 2014 at 4:04

Attachments:

GoogleCodeExporter commented 9 years ago
It's really Help full, I am so thank full to u...

Original comment by krishnar...@gmail.com on 4 Mar 2014 at 4:31